MuseScore/fonttools/smufl2sym-cmd-symUserNames.jq
mirabilos 81a76ebec4 Provide a script to update in-program glyph description from SMuFL
This was a part of MU3 PR#6742, adjusted for MU4 code style (only
indentation as we are lucky to stay within maximum line length).

Upon running fonttools/smufl2sym.sh (needs jq installed) or
fonttools\smufl2sym.bat (needs dos2unix and jq installed, see
the comment near the beginning), several (gitignored) files
will be created in the fonttools/ directory:

- smufl2sym-out-debug
  Use this to update smufl2sym-in-trans.json (see below)

- smufl2sym-out-sym.h-SymId
  Update the enum in libmscore/sym.h with this

- smufl2sym-out-sym.cpp-symNames
- smufl2sym-out-sym.cpp-symUserNames
  Update the arrays in libmscore/sym.cpp with this

This commit also updates libmscore/sym.* accordingly.

fonttools/*.jq are scripts in jq format used by smufl2sym.{sh,bat}

fonttools/smufl2sym-in-trans.json is a “check map” which lists
those symbols whose symUserNames should become a QT_TRANSLATE_NOOP.
Its format, necessitated by jq capabilities, is an Object whose
values are ignored (but must be present), only keys are used.
2020-11-10 15:10:40 +02:00

7 lines
309 B
Text

to_entries[] | [
" ",
if (.key | in($tr[0])) then "QT_TRANSLATE_NOOP(\"symUserNames\", \"" else "\"" end,
(.value.description | gsub("\""; "\\\"")),
if (.key | startswith("accidentalWyschnegradsky")) then " (Wyschnegradsky)" else "" end,
if (.key | in($tr[0])) then "\")," else "\"," end
] | join("")