[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] plan to support sfnt-wrapped CID-keyed font
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] plan to support sfnt-wrapped CID-keyed font |
Date: |
Sun, 31 Aug 2008 07:21:16 +0200 (CEST) |
> Recently, sfnt-wrapped CID-keyed font support is discussed in
> fontforge-users list (yet sf.net has not updated archive - please
> find posts titled "Mac CID Fonts"). It made me interested in the
> support by FreeType2, and today I tried to add the feature.
Nice!
> + if ( 0 != tt_face_lookup_table( face, ttag_TYP1 ) )
Pleae write this as
if ( foo != 0 )
> While I was writing the patch in above, I had a few questions:
>
> Q1) There are 2 tag checks in tt_face_init() and sfnt_open_font().
> The purposes would be slightly different, they should not be
> unified?
Is it worth the trouble?
> Q2) For the earliest phase, it would be reasonable to parse "CID "
> or "TYP1" table only and ignore other contents for simplicity.
> Considering such strategy, ftobjs.c would be the right place to
> implement the functionalities to skip unrequired parts (as
> Yamato-san implemented resource fork accessing routines). It is
> not essential to down to TrueType driver and jump to CID-keyed
> font driver.
>
> But, in next phase, possibly the support of "cmap" table would
> be important (I'm not sure if "ALMX", "ROTA", "HFMX", "VFMX"
> tables are still important when the content of "CID " is already
> parsed). In such case, utilization of TrueType font parser
> would be important.
>
> I wish I can implement the first phase within 2008, but I think
> I cannot finish the second phase within 2008. Can I leave
> unused "trampolines" in TrueType drivers until the second phase?
> Or, should I restrict the modifications in ftobjs.c, until when
> I start the work for the second phase?
You could surround your code with #ifdef ... #endif, then you can do
whatever you like. The rudimentary support of the first phase is
probably of no great use and shouldn't be announced, right? Please
select the variant which makes it easiest for you to continue the work
as soon as you have time again.
Werner