sibmei icon indicating copy to clipboard operation
sibmei copied to clipboard

Conversion of `text.character.musictext` character style

Open th-we opened this issue 5 years ago • 1 comments

When I have a text item with the following content, how should that be converted?

Allegro \ctext.character.musictext\q.\f_\=120

"q." signifies a dotted quarter. The guidelines suggest to use <rend> with the font name. But this:

rend = libmei.Rend();
libmei.AddAttribute(rend, 'fontname', score.MusicTextFontName);
libmei.SetText(rend, 'q.');

...is not really satisfactory for a consuming application. However, this output:

<tempo>Allegro <rend fontname="Opus Text Std">&#xE1D5;&#xE1E7;</rend>=120</tempo>

...is weird as well because those SMuFL codepoints do not exist in that font. My favourite solution would be something font agnostic like this:

<tempo>Allegro <symbol 
    glyph.name="noteQuarterUp" glyph.num="#xE1D5" glyph.auth="smufl"
/><symbol 
    glyph.name="augmentationDot" glyph.num="#xE1E7" glyph.auth="smufl"
/>=120</tempo>

Agree/disagree?

th-we avatar Jun 16 '20 05:06 th-we

Agree 👍 (to font agnostic solution)

annplaksin avatar Jun 16 '20 11:06 annplaksin