- Is there any existing API that I can hack to retrieve the real number of contiguous glyphs in the font? - why isn't there simply a couple of specialized methods to retrieve the real glyph count and to load the glyph by contiguous indices?
I don't understand what you mean by "real glyph count", and I don't understand what you mean by "contiguous indices". Please could you give another explanation with a concrete usecase showing the reason why you need such? Regards, mpsuzuki On 2024/12/30 18:32, Francesco Pretto wrote:
Hello, I noticed there exists FT_Get_CID_From_Glyph_Index[1] that allows you to access glyphs by a contiguous random index, albeit it may be suboptimal because it still ends requiring glyphs to be accessed with the fetched CID. While this works, I am still missing a method that can return the exact number of contiguous glyphs in a CID keyed font, which can be quite informative. FT_FaceRec.num_glyphs for CID keyed fonts is really the number of last CID - 1, so it's not the correct number. Questions are: - Is there any existing API that I can hack to retrieve the real number of contiguous glyphs in the font? - why isn't there simply a couple of specialized methods to retrieve the real glyph count and to load the glyph by contiguous indices? Cheers, Francesco [1] https://freetype.org/freetype2/docs/reference/ft2-cid_fonts.html#ft_get_cid_from_glyph_index [2] https://freetype.org/freetype2/docs/reference/ft2-face_creation.html#ft_facerec