freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] FT_Get_PS_Font_Private in CFF driver


From: Michael Toftdal
Subject: Re: [ft-devel] FT_Get_PS_Font_Private in CFF driver
Date: Tue, 28 May 2013 14:54:40 +0000

On 28/05/2013, at 15.05, Werner LEMBERG wrote:

Hi,
and thanks for looking into this, Werner.

>> I need to lookup the StdVW value that is in the Type1 private dict
>> of an OpenType font (with CFF outlines).
> 
> Why?

I need it for filling out a font descriptor in a PDF (it's the StemV value of 
the dictionary).
By requiring that my CFF font files contain exactly one font, they can be 
embedded directly in the PDF (the PDF spec has this requirement, p 468 in the 
1.7 version).


>> And since I already have the font loaded in FreeType, I was looking
>> for a way to get the value from there.  But the
>> FT_Get_PS_Font_Private service is not available in the CFF driver,
>> it appears (-- the comment says "unsupported with CFF fonts").  One
>> problem with CFF fonts is the fact that the font may have several
>> sub fonts, I guess.
> 
> Exactly.  Additionally, in case of subfonts, the private dictionary of
> the top-level font is empty.
> 
>> But on the other hand, the FT_Get_PS_Font_Info service _is_
>> implemented by the CFF driver (by ignoring the sub fonts).
> 
> Yes, sub-fonts are ignored.  However, they aren't needed since only
> the information of the top-level font info dictionary is returned.

Okay, I must have misread the CFF spec then. I thought the font info dict was 
per font as well (and eg UnderlineThickness sounds parallel to StdVW in this 
regard, doesn't it?). The implementation I suggest would then only be as bad as 
the current implementation of FT_Get_PS_Font_Info.
To do better, the api needs to have the sub-font index as a parameter.

Regards,
Michael


reply via email to

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