> When loading with DejaVuSans.ttf with FT_LOAD_NO_RECURSE there are > glyphs that have format as FT_GLYPH_FORMAT_COMPOSITE, but the > metrics are the same as when loaded without FT_LOAD_NO_RECURSE. On > the other hand in that .ttc file loading with FT_LOAD_NO_RECURSE > makes all the metrics as zero even for glyphs that are NOT > FT_GLYPH_FORMAT_COMPOSITE. > > What I am seeing is that depending on the file (or file type I > guess) the metrics are or are not zero when loading with > FT_LOAD_NO_RECURSE.
Yes. The Noto font is a CFF (inspite of having the file name extension `.ttc'), while DejavuSans is a TTF. For the former, FreeType only returns rudimentary metrics information if you are using FT_LOAD_NO_RECURSE, mainly for debugging purposes. Actually, CFFs don't have composite glyphs at all, and the only meaningful metrics value returned for the FT_LOAD_NO_RECURSE case is the `horiAdvance' field (if FT_LOAD_VERTICAL_LAYOUT is not set). Note also that pure CFFs[*] always have a left bearing value of zero, IIRC. The `horiBearingX' values that you get for `normal' calls to `FT_Load_Glyph' come from the font's `hmtx' table. Thanks for the report; I've updated the documentation. Werner [*] A `pure CFF' is a PostScript resource file that doesn't have an SFNT wrapper. _______________________________________________ Freetype mailing list Freetype@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype