Hello Werner,

Thank you for the speedy merge request and the pointers. I managed to switch to a different typeface for now with the FC setup files (though I don't know much about it so my approach could be problematic), but the Pango issue seems to not be active anymore.

Thanks everyone for all the help!

On 17/01/2024 9:07, Werner LEMBERG wrote:
I want to use emoji within markup, and I can see in the output log
that Lilypond can't find a character in its default emoji font
(Symbola). I can't figure out how to override the default font.
LilyPond does *not* have a default emoji font!  It is Pango and
FontConfig which choose the font.

Emojis are an especially nasty thing to select.  Or to be more
precise, you actually can't select them at all within LilyPond, since
any setting of a font for an Emoji character is completely ignored.
This is due to a Pango problem:

   https://gitlab.gnome.org/GNOME/pango/-/issues/289

It is necessary to modify the FontConfig setup files (usually in
`/etc/fonts/conf.d` or something similarly named) to enforce a certain
Emoji font.

BTW, I can reproduce your problem, and it is due to `Symbola.ttf`
being buggy: (Almost) all of its glyph names are empty – this is
technically valid[*] but doesn't work for us: Contrary to many
applications, LilyPond selects a glyph by its name if such a name is
available.  Since this font effectively lies to the application, i.e.,
providing incorrect glyph names, it fails.

Fortunately, it's easy to fix:

   https://gitlab.com/lilypond/lilypond/-/merge_requests/2235


     Werner


[*] For TrueType fonts it is normally expected to access glyphs by
     character code only; glyph names are considered a bonus
     information.

Reply via email to