as requested/discussed in PR #4989, by using size_t or at least
unsigned instead of casting to int when using the size() method of stl
containers (vectors etc.) in for loops.
Doesn't work everywhere though, not without either adding more casts
elsewhere or with massive code changes or with different compiler(s')
warnings.
Tested with MinGW 64-bit, MinGW 32-bit and MSVC 64-bit.
Screenreaders do not generally know how to read music symbols,
so we need to provide our own "translations".
I had added the makeReadable() function for this,
but it only handled accidentals.
I have now added added code to handle all the "common" symbols
from the Special Characters palette.
To avoid code duplication, I moved the definition of the list
from textpalette.cpp to the Sym class.
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.
stringHarmonics and a few fermatas as well as getting these and the ones
from dafb5f3 and ab354df translated. Also getting some of the previously
added articulations to play back properly and import from ove as well as
export to XML (import is missing)
following b5516f8 (for Breaths and Caesuras) and 8c18761, c7f876a
(for Accidentals)
As well as a workaround for Qt lupdate bug #35164,
see bug https://bugreports.qt.io/browse/QTBUG-35164
May need explicit use of compiler option `-finput-charset=utf-8`.
On platforms/implementations not supporting UTF-8 in C++ source code we
may be in trouble.