[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] CID keyed fonts in sfnt wrappers in 2.3.8
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] CID keyed fonts in sfnt wrappers in 2.3.8 |
Date: |
Wed, 11 Mar 2009 07:40:35 +0100 (CET) |
> [...] Another would be the one that I have ended up implementing by
> adding two methods to the cid service interface (pardon my FT
> vocabular -- I haven't spent more that one or two days in the source
> by now). One method to tell me whether a given font really is a CID
> keyed font, in the sense that we've agreed upon in the above. And
> one method to map unicodes to cids for a given font. The mapping
> information is already present in the charset.sids array on the
> internal cff font class, as far as I can tell. So I just had to
> make sure that the sids array wasn't free'd too early and make
> export the mapping via my the cid service.
This sounds like the right solution to me. Can you post patches?
>> I suppose the change was introduced on 2008-07-16.
Yes. The old behaviour was not `correct' in the sense that fonts
wrapped in SFNT only expose the cmap. Unwrapping for different
purposes must be handled differently.
>> If I'm asked to implement the compatibility feature to ignore
>> "cmap" in CFF OpenType, I will modify cffobjs.c:cff_face_init(),
>> and insert a hook to skip calling sfnt->load_cmap(). I can pass
>> some parameters to cff_face_init() by num_params and params[], so I
>> should discuss the introduction of new tag name to ignore "cmap" in
>> CFF OpenType, something like FT_PARAM_TAG_IGNORE_SFNT_CMAP.
This is a different solution to the problem -- however, there might be
situations where you need both the cmap and CID-keyed mappings. With
your suggestion you have to load the font twice, as far as I can see,
whereas Michael's idea avoids that.
Werner