freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] CID keyed fonts in sfnt wrappers in 2.3.8


From: Michael Toftdal
Subject: [ft-devel] CID keyed fonts in sfnt wrappers in 2.3.8
Date: Tue, 10 Mar 2009 10:46:22 +0100

I am working on a piece of software that is (/was) dependent on the
FT_FACE_FLAG_CID_KEYED flag and the 2.3.7 fact, that glyph index ==
CID for CID keyed fonts (also those in sfnt wrappers). After upgrading
to 2.3.8, I obviously got a small problem.
I need the CIDs for outputting PostScript, where I unwrap OpenType
(CFF) CID keyed fonts and refer to glyphs via the Identity CMaps.
After the upgrade to 2.3.8, I could of course look up the CID flag and
the Unicode to CID mapping in the font file itself (eg. as part of the
unwrapping where I have the information anyway). But I would like to
keep the unwrapping out of output process, as it happens another place
in the software and in principle, unwrapping could just be extraction
of the CFF table of the otf file.
For my own purpose, I solved the problem by implementing two new
functions in the CID service in FreeType. One to get the "internal"
CID flag of the font (result is equal to asking for the CID flag in
2.3.7 -- can by the way be mimicked for (most?) practical purposes by
asking for the ROS and checking the return value). The other function
gives me access to the glyph index to CID mapping that is stored in
the cff->charset.sids array (which I have to suspend the free'ing
of...).

It would of course ease my future FreeType upgrades if corresponding
functionality could be included in new FT versions, or if someone
could help me to a way of getting my information in an easier way in
FT... :-)
Any comments appreciated.

Kind regards,
-Michael




reply via email to

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