freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] units_per_em in CFF/CID FDArray


From: Dirck Blaskey
Subject: [ft-devel] units_per_em in CFF/CID FDArray
Date: Thu, 14 Apr 2005 22:49:45 -0700
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Hi Werner & Co.

Today I ran across a CFF CID font in a PDF file where the FontMatrix / units_per_em is 2048 instead of 1000, except FontMatrix is specified in the FDArray for the subfont,
not in the top dict.

Here is the patch against the latest CVS (ignore the revision numbers)
This may not be correct in the general case (multiple sub fonts) but it works fine for this font.

Index: cffobjs.c
===================================================================
RCS file: /cvsroot/freetype2/src/cff/cffobjs.c,v
retrieving revision 1.1.1.1
diff -w -u -r1.1.1.1 cffobjs.c
--- cffobjs.c    2005/04/15 00:13:25    1.1.1.1
+++ cffobjs.c    2005/04/15 05:41:23
@@ -537,6 +537,10 @@

        if ( dict->units_per_em )
          cffface->units_per_EM = dict->units_per_em;
+        else if (cff->num_subfonts &&
+                 cff->subfonts[0] &&
+                 cff->subfonts[0]->font_dict.units_per_em)
+          cffface->units_per_EM = cff->subfonts[0]->font_dict.units_per_em;
        else
          cffface->units_per_EM = 1000;





reply via email to

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