[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] FT_Get_PS_Font_Private in CFF driver
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] FT_Get_PS_Font_Private in CFF driver |
Date: |
Tue, 28 May 2013 20:28:46 +0200 (CEST) |
> 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).
OK.
>> 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 structure of a CIDFont is as follows:
Top DICT: version
Notice
Copyright
FontName
...
FDArray
FDArray: Font DICT 0
Font DICT 1
...
Font DICT 0: Font Dict data
Private Dict data
Font DICT 1: Font Dict data
Private Dict data
...
For example, the `FontName' entry is present in the Top DICT and in
all Font DICT entries indexed in the FDArray.
> 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.
Well, FT_Get_PS_Font_Info isn't bad at all, since it correctly returns
the Top DICT data of a CIDFont which represents the `public'
dictionary data. However, the FDArray data is *completely internal*
to FreeType and not publicly visible. It is *not* possible to
directly access a CIDFont's subfont. In other words, your suggestion
of using a subfont index doesn't work.
I'll ask someone from Adobe which value is used for StemV if the
particular font is a CIDFont.
Werner