Home > Back-end >  Is there a way to enumerate the individual CHARACTERS in a True Type Font file(TTF)?
Is there a way to enumerate the individual CHARACTERS in a True Type Font file(TTF)?

Time:12-22

I'm trying to figure out how to enumerate ALL of the characters in a True Type Font.

I have a TTF font - "Pangolin" which is comprised of the COMPONENTS of Japanese Kanji, NOT the Kanji themselves. These are the elements that make up kanji...

I believe it was created based on a basic ASCII "abcdefABCDEF123" etc., as I can create a text file using the above alpha numeric characters, change the font to Pangolin and I see the individual components displayed as kanji bushuu in the same order as what is displayed by the Windows settings Font control, but I need to see ALL of the characters.

I'm sure this is doable...

???

CodePudding user response:

You can use utilities like BabelMap or ViewGlyph to see all of the characters in a font.

For APIs, IDWriteFontFace1::GetUnicodeRanges is recommended. There's also the legacy GDI API GetFontUnicodeRanges, but that is limited in that it can't report when a font supports characters beyond the Unicode Basic Multilingual Plane. See this topic for more discussion of the APIs.

CodePudding user response:

Thank you for the info.

I ended up downloading a few "FontViewer" utilities and it turns out that all I needed was a text file with all 256 of the ASCII codes, not just the alpha numerics.

Changing the font type then provided the mapping to the characters I needed to see.

  • Related