[mpeg-OTspec] CFF data guidelines
Manlio Perillo
manlio.perillo at gmail.com
Wed Dec 16 19:55:51 CET 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thomas Phinney ha scritto:
> I agree with you on points 1, 2 and 11 for sure.
>
Ok.
Unfortunately in fonts I have converted with FontForge, I got
underlineThickness set to 0, in the "post" table, and a non zero value
in the Top DICT.
What is the reason why you are not sure about 6 and (and 7)?
The Open Font Format explicitly says that the "loca" table MUST contain
numGlyphs + 1 entries; so it seems natural for me that there MUST be
numGlyphs charstrings entries.
> I DISagree on points 3 and 4. Transformation matrix has been used in
> real fonts, though arguably not needed.Non-1000-unit em squares,
> although unusual, are used in shipping fonts. Sometimes they are a
> near-necessity.
>
I have changed my code, so that now it only checks that
font_matrix == [1 / x, 0, 0, 1 / x, 0, 0]
and
unitsPerEm == x
Non uniform scaling should be disallowed, IMHO.
As for generic tranformation matrix (like a rotation), I have some
doubts about how OpenType metrics should be interpreted.
> Most of your other points seem reasonable, but would require some
> homework to verify. If I recall correctly in regards to point 10, the
> two entries should be EQUIVALENT, but in one case underline position is
> calculated from the middle and the other is calculated from... it's
> either the top or the bottom.
>
Ok.
As for point 5, it seems that FontForge has some rounding problem; it is
very strange, however, since it seems that two different computations
are used to compute the two values.
> Cheers,
>
> T
>
Thanks for the feedback
Manlio
> On Wed, Dec 16, 2009 at 8:37 AM, Manlio Perillo
> <manlio.perillo at gmail.com <mailto:manlio.perillo at gmail.com>> wrote:
> [...]
> In my implementation I'm enforcing the following constraints:
>
> 1) The Name INDEX *must* contain only one entry;
> that is, there *must* be only one font in the FontSet.
>
> I think that this is an important constratint, and should be added in
> the CFF specification, in the CFF table description.
>
> The following restrictions, instead, should be added in a separate
> Annex.
>
> 2) CharstringType entry in the Top DICT *must* be 2.
>
> 3) FontMatrix entry in the Top DICT *must* be [0.001 0 0 0.001 0].
>
> Note that I'm not sure about this.
> The Type 1 specification highly recommends this value, and I would
> like to know if other values are actually being used.
>
> I would also like to know if the FontMatrix can define more complex
> transformation, instead of a simple scaling; and if this can cause
> problems for an OpenType font.
>
> 4) unitsPerEm parameter in the "head" table *must* be equal to 1000.
>
> In this case, as long as the FontMatrix is in the form
> [1/x 0 0 1/x 0],
> this parameter can take any value.
> I'm not sure, however, that a font maker would like to use different
> scales for the font metrics; so this value *should* be the same as x.
>
> 5) xMin, yMin, xMax and yMax parameters in the "head" table *must* be
> the same as the FontBBox entry in the Top DICT.
>
> 6) numGlyphs parameter in the "maxp" table *must* be the same as the
> number of entries in the CharStrings INDEX.
>
> 7) The Postscript name in the "name" table *must* be the same as the
> font name found in the Name INDEX.
>
> I'm not sure how the PostscriptCIDName should be handled, if defined.
> In the CIDFonts from Adobe Acrobat Reader, this name is never
> defined.
>
> 8) There should be some simple algorithm for build some of the names in
> the "name" table, starting from FullName and FamilyName entries in
> the Top DICT.
>
> 9) The value of the italicAngle parameter in the "post" table *must* be
> the same as the ItalicAngle entry in the Top DICT.
>
> 10) The value of underlinePosition parameter in the "post" table,
> computed as described in the Open Font Format specification, *must*
> be the same as the UnderlinePosition entry in the Top DICT.
>
> 11) The value of the underlineThickness parameter in the "post" table
> *must* be the same as the UnderlineThickness entry in the Top DICT.
>
> 12) The value of the isFixedPitch parameter in the "post" table
> *must* be the same as the isFixedPitch entry in the Top DICT.
>
> 13) The value of the usWeightClass parameter in the "OS/2" table
> *should* be compatible with the Weight entry in the Top DICT.
>
> A precise restriction can not be written, since in Type 1 fonts the
> Weight is a string, and these string names are not standardized.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkspLTcACgkQscQJ24LbaUQESgCeKDOPWdziopSKF07CXBhR+7V5
WL4AnjnmvVJBdxZt4yu1HpQ0nP37NnUc
=JuEL
-----END PGP SIGNATURE-----
More information about the mpeg-otspec
mailing list