freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to know the exact number of glyphs for CID keyed fonts?


From: Francesco Pretto
Subject: How to know the exact number of glyphs for CID keyed fonts?
Date: Mon, 30 Dec 2024 10:32:22 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]