> I'd like to detect whether a glyph (e.g. 0x0150) is part of the
> font. Actually detect Hungarian language support of webpages. Font
> file names are extracted from CSS.
You rather want to detect whether Unicode input character U+0150 has a
mapping to a non-zero glyph index.
> Is it OK?
> ftdump -v /usr/share/fonts/truetype/msttcorefonts/verdana.ttf | grep
> 0x0151
No, it isn't, you need flag `-V' for that :-)
> Or should I care about these?
> charmaps
> 0: platform 1, encoding 0, language 0
> 1: platform 3, encoding 1, language 0 (active)
Yes, you normally need a (3,1) encoding, as described in the OpenType
specification. There are other Unicode mappings, but those are very
rare today.
However, I strongly suggest that you use already existing solutions
like the `fontconfig' library, which contains code to scan a font for
detecting the supported scripts and languages. A single glyph doesn't
make up a font for Hungarian...
Werner
_______________________________________________
Freetype mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype