~3v1n0/ubuntu/trusty/freetype/multithread-safe

« back to all changes in this revision

Viewing changes to debian/patches-freetype/0001-Fix-Savannah-bug-40997.patch

  • Committer: Marco Trevisan (Treviño)
  • Date: 2015-01-23 02:49:41 UTC
  • mfrom: (58.1.2 trusty-proposed)
  • Revision ID: mail@3v1n0.net-20150123024941-nrma6p2s6lhjozif
Merging with lp:ubuntu/trusty-updates/freetype

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 5f577462bd7cc8e2ca6fe4a1efecee6d8a95e7be Mon Sep 17 00:00:00 2001
 
2
From: Werner Lemberg <wl@gnu.org>
 
3
Date: Wed, 25 Dec 2013 08:50:50 +0100
 
4
Subject: [PATCH] Fix Savannah bug #40997.
 
5
 
 
6
* src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to
 
7
adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already
 
8
be set.
 
9
* src/cff/cffobjs.c (cff_face_init): Ditto.
 
10
* src/cid/cidobjs.c (cid_face_init): Ditto.
 
11
* src/pcf/pcfread.c (pcf_load_font): Ditto.
 
12
* src/pfr/pfrobjs.c (pfr_face_init): Ditto.
 
13
* src/type1/t1objs.c (T1_Face_Init): Ditto.
 
14
* src/type42/t42objs.c (T42_Face_Init): Ditto.
 
15
* src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
 
16
---
 
17
 src/bdf/bdfdrivr.c    |  7 ++++---
 
18
 src/cff/cffobjs.c     |  2 +-
 
19
 src/cid/cidobjs.c     |  7 ++++---
 
20
 src/pcf/pcfread.c     |  7 ++++---
 
21
 src/pfr/pfrobjs.c     |  3 ++-
 
22
 src/type1/t1objs.c    |  8 ++++----
 
23
 src/type42/t42objs.c  |  6 +++---
 
24
 src/winfonts/winfnt.c |  4 ++--
 
25
 9 files changed, 39 insertions(+), 20 deletions(-)
 
26
 
 
27
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
 
28
index caa142b..71150d7 100644
 
29
--- a/src/bdf/bdfdrivr.c
 
30
+++ b/src/bdf/bdfdrivr.c
 
31
@@ -400,9 +400,10 @@ THE SOFTWARE.
 
32
 
 
33
       bdfface->num_faces  = 1;
 
34
       bdfface->face_index = 0;
 
35
-      bdfface->face_flags = FT_FACE_FLAG_FIXED_SIZES |
 
36
-                            FT_FACE_FLAG_HORIZONTAL  |
 
37
-                            FT_FACE_FLAG_FAST_GLYPHS;
 
38
+
 
39
+      bdfface->face_flags |= FT_FACE_FLAG_FIXED_SIZES |
 
40
+                             FT_FACE_FLAG_HORIZONTAL  |
 
41
+                             FT_FACE_FLAG_FAST_GLYPHS;
 
42
 
 
43
       prop = bdf_get_font_property( font, "SPACING" );
 
44
       if ( prop && prop->format == BDF_ATOM                             &&
 
45
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
 
46
index 29c3691..cac4ac2 100644
 
47
--- a/src/cff/cffobjs.c
 
48
+++ b/src/cff/cffobjs.c
 
49
@@ -866,7 +866,7 @@
 
50
           flags |= FT_FACE_FLAG_KERNING;
 
51
 #endif
 
52
 
 
53
-        cffface->face_flags = flags;
 
54
+        cffface->face_flags |= flags;
 
55
 
 
56
         /*******************************************************************/
 
57
         /*                                                                 */
 
58
diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c
 
59
index 46555e2..5932ffa 100644
 
60
--- a/src/cid/cidobjs.c
 
61
+++ b/src/cid/cidobjs.c
 
62
@@ -355,9 +355,10 @@
 
63
       cidface->num_charmaps = 0;
 
64
 
 
65
       cidface->face_index = face_index;
 
66
-      cidface->face_flags = FT_FACE_FLAG_SCALABLE   | /* scalable outlines */
 
67
-                            FT_FACE_FLAG_HORIZONTAL | /* horizontal data   */
 
68
-                            FT_FACE_FLAG_HINTER;      /* has native hinter */
 
69
+
 
70
+      cidface->face_flags |= FT_FACE_FLAG_SCALABLE   | /* scalable outlines */
 
71
+                             FT_FACE_FLAG_HORIZONTAL | /* horizontal data   */
 
72
+                             FT_FACE_FLAG_HINTER;      /* has native hinter */
 
73
 
 
74
       if ( info->is_fixed_pitch )
 
75
         cidface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
 
76
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
 
77
index ee41c5d..d936c58 100644
 
78
--- a/src/pcf/pcfread.c
 
79
+++ b/src/pcf/pcfread.c
 
80
@@ -1153,9 +1153,10 @@ THE SOFTWARE.
 
81
 
 
82
       root->num_faces  = 1;
 
83
       root->face_index = 0;
 
84
-      root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
 
85
-                         FT_FACE_FLAG_HORIZONTAL  |
 
86
-                         FT_FACE_FLAG_FAST_GLYPHS;
 
87
+
 
88
+      root->face_flags |= FT_FACE_FLAG_FIXED_SIZES |
 
89
+                          FT_FACE_FLAG_HORIZONTAL  |
 
90
+                          FT_FACE_FLAG_FAST_GLYPHS;
 
91
 
 
92
       if ( face->accel.constantWidth )
 
93
         root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
 
94
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
 
95
index 8d3cd29..194d2df 100644
 
96
--- a/src/pfr/pfrobjs.c
 
97
+++ b/src/pfr/pfrobjs.c
 
98
@@ -137,7 +137,8 @@
 
99
 
 
100
       pfrface->face_index = face_index;
 
101
       pfrface->num_glyphs = phy_font->num_chars + 1;
 
102
-      pfrface->face_flags = FT_FACE_FLAG_SCALABLE;
 
103
+
 
104
+      pfrface->face_flags |= FT_FACE_FLAG_SCALABLE;
 
105
 
 
106
       /* if all characters point to the same gps_offset 0, we */
 
107
       /* assume that the font only contains bitmaps           */
 
108
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
 
109
index 837b791..e11770f 100644
 
110
--- a/src/type1/t1objs.c
 
111
+++ b/src/type1/t1objs.c
 
112
@@ -364,10 +364,10 @@
 
113
       root->num_glyphs = type1->num_glyphs;
 
114
       root->face_index = 0;
 
115
 
 
116
-      root->face_flags = FT_FACE_FLAG_SCALABLE    |
 
117
-                         FT_FACE_FLAG_HORIZONTAL  |
 
118
-                         FT_FACE_FLAG_GLYPH_NAMES |
 
119
-                         FT_FACE_FLAG_HINTER;
 
120
+      root->face_flags |= FT_FACE_FLAG_SCALABLE    |
 
121
+                          FT_FACE_FLAG_HORIZONTAL  |
 
122
+                          FT_FACE_FLAG_GLYPH_NAMES |
 
123
+                          FT_FACE_FLAG_HINTER;
 
124
 
 
125
       if ( info->is_fixed_pitch )
 
126
         root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
 
127
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
 
128
index f5aa2ca..798ebdb 100644
 
129
--- a/src/type42/t42objs.c
 
130
+++ b/src/type42/t42objs.c
 
131
@@ -218,9 +218,9 @@
 
132
     root->num_charmaps = 0;
 
133
     root->face_index   = 0;
 
134
 
 
135
-    root->face_flags = FT_FACE_FLAG_SCALABLE    |
 
136
-                       FT_FACE_FLAG_HORIZONTAL  |
 
137
-                       FT_FACE_FLAG_GLYPH_NAMES;
 
138
+    root->face_flags |= FT_FACE_FLAG_SCALABLE    |
 
139
+                        FT_FACE_FLAG_HORIZONTAL  |
 
140
+                        FT_FACE_FLAG_GLYPH_NAMES;
 
141
 
 
142
     if ( info->is_fixed_pitch )
 
143
       root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
 
144
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
 
145
index 6843243..fd6fc55 100644
 
146
--- a/src/winfonts/winfnt.c
 
147
+++ b/src/winfonts/winfnt.c
 
148
@@ -743,8 +743,8 @@
 
149
 
 
150
       root->face_index = face_index;
 
151
 
 
152
-      root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
 
153
-                         FT_FACE_FLAG_HORIZONTAL;
 
154
+      root->face_flags |= FT_FACE_FLAG_FIXED_SIZES |
 
155
+                          FT_FACE_FLAG_HORIZONTAL;
 
156
 
 
157
       if ( font->header.avg_width == font->header.max_width )
 
158
         root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
 
159
-- 
 
160
1.9.1
 
161