Using fontconfig to retrieve FC_Charset for this font tells me the following:
charset=20 23 2a 30-39 a9 ae 200d 203c 2049 20e3 2122 2139 etc..I can FT_LoadGlyph and FT_BitmapConvert the digits, U+0030 through U+0039 fine. But something goes sideways with U+0020 and U+200d. I see the following:
FT_Get_Char_index gives me 1 and 41 for these unicodes, so freetype finds these unicodes acceptable. Looks promising, but FT_Load_Glyph(FT_LOAD_RENDER) initially returned FT_Invalid_Size_Handle. I traced that to the following in ttgload.c:
/* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */ if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid ) { error = FT_THROW( Invalid_Size_Handle ); goto Exit; }Ok, so I try again with FT_Load_Glyph(FT_LOAD_RENDER|FT_LOAD_NO_SCALE). That got me past that point, only to run into a roadblock with FT_Bitmap_Convert. Looking into FT_Face->glyph->bitmap after FT_Load_Glyph, it's all empty, rows and width is 0, pixel_mode is FT_PIXEL_MODE_NONE, there's nothing there.
Looked at the data structure closer, good glyphs' format seems to be FT_GLYPH_FORMAT_BITMAP, and the problematic glyphs' format seems to be FT_GLYPH_FORMAT_OUTLINE. Did some searches, found some long-ish examples that use FT_Outline_Render, but all that does, from the looks of it, is what FT_Render_Glyph() does. Not sure what's the problem with those glyphs, but not the other glyphs in the same font.
pgpPCG1QTfzdm.pgp
Description: PGP signature
_______________________________________________ Freetype mailing list Freetype@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype