1

Is there a way to access opentype glyph names in Windows Presentation Foundation? I want to display a glyph on a canvas, but the glyph is a special glyph in a special font, so there is no standard codepoint (of course there IS a codepoint, but I don't want to remember it for dozens of special glyphs).

The font has names for each glyphs which I want to use (such as "custom.specialsign"). Is it possible to get the character by glyph name?

1
  • Not specific to WPF, so leaving this as (much belated) comment: for OpenType fonts with TrueType or CFF2 glyph data the glyphs names are stored in the post table, and any compatible OpenType library (check to see if harfbuzz/freetype are available for your technology of choice, they almost certainly are) should be able to pull them out. For OpenType fonts with the older CFF glyph data, the names are stored in the CFF block instead (and should still be easily accessed through harfbuzz/freetype/etc). Nov 14, 2020 at 17:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.