Special character do not display properly

• Sep 19, 2018 - 15:37
Reported version
3.0
Priority
P0 - Critical
Type
Graphical (UI)
Severity
S3 - Major
Status
closed
Regression
Yes
Workaround
No
Project

Entering notes from special text leads to this display

notes.PNG

It seems all of the other items display correctly when using the default fonts. This happens in Tempo, Staff and System text. I actually discovered this because there is no half note = dotted half note in the tempo. I tried to make my own, and you know the rest.


Comments

Severity S4 - Minor S3 - Major
Regression No
Workaround No

Seems even existing ones from 2.x scores get lost, Tempo text works, but an e.g. added a quarter note glyph to some staff-or system text doesn't show and trying to adding it (from the F2 palette) fails completely, as does copy/paste it across from a tempo text

Status PR created fixed

Fixed in branch master, commit af5abe41d0

fix #276354: lookup character codes in SMuFL code table if no font-specific symbol is found

This commit does three things:
1) Constructs a code table for SMuFL symbols that is common to all
used fonts. The table is constructed from fonts/smufl/glyphnames.json
2) Replaces repeated calls to the object representing that json file
by a lookup in the code table obtained from that file. This is simpler
to reuse and avoids unnecessary repeated string parsing operations.
3) The fix itself: ScoreFont::toString now looks for a symbol
in the common SMuFL table if nothing is found in the font itself.
That way a correct code for the queried symbol can be returned even
if the font itself is not able to render it.
Previously -1 was returned which led to adding symbols which cannot
be correctly displayed by any font at all.