Skip to content

Commit

Permalink
Don't store prev font size and face when there is no end tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Mar 31, 2024
1 parent f7dbcf4 commit 8f468ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/engraving/dom/textbase.cpp
Expand Up @@ -1929,13 +1929,17 @@ bool TextBase::prepareFormat(const String& token, CharFormat& format, String& pr
} else if (token.startsWith(u"font ")) {
String remainder = token.mid(5);
if (remainder.startsWith(u"size=\"")) {
prevFontSize = format.fontSize();
if (!token.endsWith(u"/")) {
prevFontSize = format.fontSize();
}
format.setFontSize(parseNumProperty(remainder.mid(6)));
return true;
} else if (remainder.startsWith(u"face=\"")) {
String face = parseStringProperty(remainder.mid(6));
face = unEscape(face);
prevFontFace = format.fontFamily();
if (!token.endsWith(u"/")) {
prevFontFace = format.fontFamily();
}
format.setFontFamily(face);
return true;
} else {
Expand Down

0 comments on commit 8f468ac

Please sign in to comment.