Skip to content

Commit

Permalink
Fixed SMuFL anchors
Browse files Browse the repository at this point in the history
Update musescorefonts-Petaluma.qrc, pretty bad ommission from musescore#5381

Backport of musescore#8958 (not a very straight one...), part 2 (part 1 doesn't
apply here at all)
  • Loading branch information
cbjeukendrup authored and Jojo-Schmitz committed Sep 2, 2021
1 parent 98c103f commit 0da1596
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
33 changes: 16 additions & 17 deletions libmscore/sym.cpp
Expand Up @@ -6680,7 +6680,6 @@ void ScoreFont::load()

QJsonObject oo = metadataJson.value("glyphsWithAnchors").toObject();
for (const auto &i : oo.keys()) {
constexpr qreal scale = SPATIUM20;
QJsonObject ooo = oo.value(i).toObject();
SymId symId = Sym::lnhash.value(i, SymId::noSym);
if (symId == SymId::noSym) {
Expand All @@ -6694,42 +6693,42 @@ void ScoreFont::load()
if (j == "stemDownNW") {
qreal x = ooo.value(j).toArray().at(0).toDouble();
qreal y = ooo.value(j).toArray().at(1).toDouble();
sym->setStemDownNW(QPointF(4.0 * DPI_F * x, 4.0 * DPI_F * -y));
sym->setStemDownNW(QPointF(x, -y) * SPATIUM20);
}
else if (j == "stemUpSE") {
qreal x = ooo.value(j).toArray().at(0).toDouble();
qreal y = ooo.value(j).toArray().at(1).toDouble();
sym->setStemUpSE(QPointF(4.0 * DPI_F * x, 4.0 * DPI_F * -y));
sym->setStemUpSE(QPointF(x, -y) * SPATIUM20);
}
else if (j == "stemDownSW") {
qreal x = ooo.value(j).toArray().at(0).toDouble();
qreal y = ooo.value(j).toArray().at(1).toDouble();
sym->setStemDownSW(QPointF(4.0 * DPI_F * x, 4.0 * DPI_F * -y));
sym->setStemDownSW(QPointF(x, -y) * SPATIUM20);
}
else if (j == "stemUpNW") {
qreal x = ooo.value(j).toArray().at(0).toDouble();
qreal y = ooo.value(j).toArray().at(1).toDouble();
sym->setStemUpNW(QPointF(4.0 * DPI_F * x, 4.0 * DPI_F * -y));
sym->setStemUpNW(QPointF(x, -y) * SPATIUM20);
}
else if (j == "cutOutNE") {
qreal x = ooo.value(j).toArray().at(0).toDouble() * scale;
qreal y = ooo.value(j).toArray().at(1).toDouble() * scale;
sym->setCutOutNE(QPointF(x, -y));
qreal x = ooo.value(j).toArray().at(0).toDouble();
qreal y = ooo.value(j).toArray().at(1).toDouble();
sym->setCutOutNE(QPointF(x, -y) * SPATIUM20);
}
else if (j == "cutOutNW") {
qreal x = ooo.value(j).toArray().at(0).toDouble() * scale;
qreal y = ooo.value(j).toArray().at(1).toDouble() * scale;
sym->setCutOutNW(QPointF(x, -y));
qreal x = ooo.value(j).toArray().at(0).toDouble();
qreal y = ooo.value(j).toArray().at(1).toDouble();
sym->setCutOutNW(QPointF(x, -y) * SPATIUM20);
}
else if (j == "cutOutSE") {
qreal x = ooo.value(j).toArray().at(0).toDouble() * scale;
qreal y = ooo.value(j).toArray().at(1).toDouble() * scale;
sym->setCutOutSE(QPointF(x, -y));
qreal x = ooo.value(j).toArray().at(0).toDouble();
qreal y = ooo.value(j).toArray().at(1).toDouble();
sym->setCutOutSE(QPointF(x, -y) * SPATIUM20);
}
else if (j == "cutOutSW") {
qreal x = ooo.value(j).toArray().at(0).toDouble() * scale;
qreal y = ooo.value(j).toArray().at(1).toDouble() * scale;
sym->setCutOutSW(QPointF(x, -y));
qreal x = ooo.value(j).toArray().at(0).toDouble();
qreal y = ooo.value(j).toArray().at(1).toDouble();
sym->setCutOutSW(QPointF(x, -y) * SPATIUM20);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions mscore/musescorefonts-Petaluma.qrc
@@ -1,5 +1,6 @@
<RCC>
<qresource prefix="/">
<file alias="fonts/petaluma/metadata.json">../fonts/petaluma/petaluma_metadata.json</file>
<file alias="fonts/petaluma/Petaluma.otf">../fonts/petaluma/Petaluma.otf</file>
<file alias="fonts/petaluma/PetalumaText.otf">../fonts/petaluma/PetalumaText.otf</file>
<file alias="fonts/petaluma/PetalumaScript.otf">../fonts/petaluma/PetalumaScript.otf</file>
Expand Down

0 comments on commit 0da1596

Please sign in to comment.