shithub: freetype+ttf2subf

Download patch

ref: 5f577462bd7cc8e2ca6fe4a1efecee6d8a95e7be
parent: c7b55a3473f407f1783e37cf9117c26fd9ae0b9c
author: Werner Lemberg <[email protected]>
date: Wed Dec 25 03:50:50 EST 2013

Fix Savannah bug #40997.

* src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
be set.
* src/cff/cffobjs.c (cff_face_init): Ditto.
* src/cid/cidobjs.c (cid_face_init): Ditto.
* src/pcf/pcfread.c (pcf_load_font): Ditto.
* src/pfr/pfrobjs.c (pfr_face_init): Ditto.
* src/type1/t1objs.c (T1_Face_Init): Ditto.
* src/type42/t42objs.c (T42_Face_Init): Ditto.
* src/winfonts/winfnt.c (FNT_Face_Init): Ditto.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2013-12-25  Werner Lemberg  <[email protected]>
+
+	Fix Savannah bug #40997.
+
+	* src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
+	adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
+	be set.
+	* src/cff/cffobjs.c (cff_face_init): Ditto.
+	* src/cid/cidobjs.c (cid_face_init): Ditto.
+	* src/pcf/pcfread.c (pcf_load_font): Ditto.
+	* src/pfr/pfrobjs.c (pfr_face_init): Ditto.
+	* src/type1/t1objs.c (T1_Face_Init): Ditto.
+	* src/type42/t42objs.c (T42_Face_Init): Ditto.
+	* src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
+
 2013-12-21  Werner Lemberg  <[email protected]>
 
 	[autofit] Introduce `coverages'.
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -400,9 +400,10 @@
 
       bdfface->num_faces  = 1;
       bdfface->face_index = 0;
-      bdfface->face_flags = FT_FACE_FLAG_FIXED_SIZES |
-                            FT_FACE_FLAG_HORIZONTAL  |
-                            FT_FACE_FLAG_FAST_GLYPHS;
+
+      bdfface->face_flags |= FT_FACE_FLAG_FIXED_SIZES |
+                             FT_FACE_FLAG_HORIZONTAL  |
+                             FT_FACE_FLAG_FAST_GLYPHS;
 
       prop = bdf_get_font_property( font, "SPACING" );
       if ( prop && prop->format == BDF_ATOM                             &&
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -866,7 +866,7 @@
           flags |= FT_FACE_FLAG_KERNING;
 #endif
 
-        cffface->face_flags = flags;
+        cffface->face_flags |= flags;
 
         /*******************************************************************/
         /*                                                                 */
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -355,9 +355,10 @@
       cidface->num_charmaps = 0;
 
       cidface->face_index = face_index;
-      cidface->face_flags = FT_FACE_FLAG_SCALABLE   | /* scalable outlines */
-                            FT_FACE_FLAG_HORIZONTAL | /* horizontal data   */
-                            FT_FACE_FLAG_HINTER;      /* has native hinter */
+
+      cidface->face_flags |= FT_FACE_FLAG_SCALABLE   | /* scalable outlines */
+                             FT_FACE_FLAG_HORIZONTAL | /* horizontal data   */
+                             FT_FACE_FLAG_HINTER;      /* has native hinter */
 
       if ( info->is_fixed_pitch )
         cidface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -1153,9 +1153,10 @@
 
       root->num_faces  = 1;
       root->face_index = 0;
-      root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
-                         FT_FACE_FLAG_HORIZONTAL  |
-                         FT_FACE_FLAG_FAST_GLYPHS;
+
+      root->face_flags |= FT_FACE_FLAG_FIXED_SIZES |
+                          FT_FACE_FLAG_HORIZONTAL  |
+                          FT_FACE_FLAG_FAST_GLYPHS;
 
       if ( face->accel.constantWidth )
         root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -137,7 +137,8 @@
 
       pfrface->face_index = face_index;
       pfrface->num_glyphs = phy_font->num_chars + 1;
-      pfrface->face_flags = FT_FACE_FLAG_SCALABLE;
+
+      pfrface->face_flags |= FT_FACE_FLAG_SCALABLE;
 
       /* if all characters point to the same gps_offset 0, we */
       /* assume that the font only contains bitmaps           */
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -364,10 +364,10 @@
       root->num_glyphs = type1->num_glyphs;
       root->face_index = 0;
 
-      root->face_flags = FT_FACE_FLAG_SCALABLE    |
-                         FT_FACE_FLAG_HORIZONTAL  |
-                         FT_FACE_FLAG_GLYPH_NAMES |
-                         FT_FACE_FLAG_HINTER;
+      root->face_flags |= FT_FACE_FLAG_SCALABLE    |
+                          FT_FACE_FLAG_HORIZONTAL  |
+                          FT_FACE_FLAG_GLYPH_NAMES |
+                          FT_FACE_FLAG_HINTER;
 
       if ( info->is_fixed_pitch )
         root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -218,9 +218,9 @@
     root->num_charmaps = 0;
     root->face_index   = 0;
 
-    root->face_flags = FT_FACE_FLAG_SCALABLE    |
-                       FT_FACE_FLAG_HORIZONTAL  |
-                       FT_FACE_FLAG_GLYPH_NAMES;
+    root->face_flags |= FT_FACE_FLAG_SCALABLE    |
+                        FT_FACE_FLAG_HORIZONTAL  |
+                        FT_FACE_FLAG_GLYPH_NAMES;
 
     if ( info->is_fixed_pitch )
       root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -743,8 +743,8 @@
 
       root->face_index = face_index;
 
-      root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
-                         FT_FACE_FLAG_HORIZONTAL;
+      root->face_flags |= FT_FACE_FLAG_FIXED_SIZES |
+                          FT_FACE_FLAG_HORIZONTAL;
 
       if ( font->header.avg_width == font->header.max_width )
         root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;