Merge lp:~jincreator/ubuntu/utopic/freetype/lp1310017 into lp:ubuntu/utopic/freetype
- Utopic (14.10)
- lp1310017
- Merge into utopic
Proposed by
Jinkyu Yi
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 60 | ||||
Proposed branch: | lp:~jincreator/ubuntu/utopic/freetype/lp1310017 | ||||
Merge into: | lp:ubuntu/utopic/freetype | ||||
Diff against target: |
655 lines (+635/-0) 3 files modified
debian/changelog (+7/-0) debian/patches-freetype/0002-Fix-Savannah-bug-42418.patch (+627/-0) debian/patches-freetype/series (+1/-0) |
||||
To merge this branch: | bzr merge lp:~jincreator/ubuntu/utopic/freetype/lp1310017 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Development Team | Pending | ||
Review via email: mp+218292@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' |
2 | --- debian/changelog 2014-05-01 12:53:39 +0000 |
3 | +++ debian/changelog 2014-05-05 14:39:12 +0000 |
4 | @@ -1,3 +1,10 @@ |
5 | +freetype (2.5.2-1ubuntu4) utopic; urgency=medium |
6 | + |
7 | + * debian/patches-freetype/0002-Fix-Savannah-bug-42418.patch: Cherry-pick |
8 | + upstream patch to fix cjk font rendering issue. (LP: #1310017) |
9 | + |
10 | + -- Jinkyu Yi <jincreator@jincreator.net> Mon, 05 May 2014 23:26:37 +0900 |
11 | + |
12 | freetype (2.5.2-1ubuntu3) utopic; urgency=medium |
13 | |
14 | * debian/patches-freetype/0001-Fix-Savannah-bug-40997.patch: Cherry-pick |
15 | |
16 | === added file 'debian/patches-freetype/0002-Fix-Savannah-bug-42418.patch' |
17 | --- debian/patches-freetype/0002-Fix-Savannah-bug-42418.patch 1970-01-01 00:00:00 +0000 |
18 | +++ debian/patches-freetype/0002-Fix-Savannah-bug-42418.patch 2014-05-05 14:39:12 +0000 |
19 | @@ -0,0 +1,627 @@ |
20 | +From 98e510ee94e552e9e9f80891aa87b2b472d0f276 Mon Sep 17 00:00:00 2001 |
21 | +From: Werner Lemberg <wl@gnu.org> |
22 | +Origin: http://git.savannah.gnu.org/cgit/freetype/freetype2.git/patch/?id=98e510ee94e552e9e9f80891aa87b2b472d0f276 |
23 | +Bug: https://savannah.nongnu.org/bugs/?42148 |
24 | +Bug-Ubuntu: https://launchpad.net/bugs/1310017 |
25 | +Date: Sun, 20 Apr 2014 20:11:27 +0000 |
26 | +Subject: [autofit] Fix Savannah bug #42148. |
27 | + |
28 | +(The original patch is modified to fit in version shipped with Ubuntu.) |
29 | + |
30 | +The adaptation of the cjk auto-hinter module to blue stringsets in |
31 | +2013-08-25 had three severe bugs. Mea culpa. |
32 | + |
33 | +1. Contrary to the latin auto-hinter, characters for reference and |
34 | + overshoot values of a blue zone are specified separately. Due to |
35 | + the screwed-up change it didn't work at all. |
36 | + |
37 | +2. A boolean comparison was erroneously replaced with a cast, |
38 | + causing invalid results with the `^' operator later on. The |
39 | + visual artifact caused by this problem is the topic of the bug |
40 | + report. |
41 | + |
42 | +3. Two flag values were inverted, causing incorrect assignment of |
43 | + reference and overshoot values. |
44 | + |
45 | +* src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new |
46 | +syntax to have both reference and overshoot characters in a single |
47 | +string. This is error #1. |
48 | +Add extensive comments. |
49 | + |
50 | +* src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no |
51 | +longer used. |
52 | +(AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values. |
53 | +This is error #3. |
54 | + |
55 | +* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. |
56 | + |
57 | +* src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1. |
58 | +Use character `|' to separate characters for reference and overshoot |
59 | +values. |
60 | +Improve tracing messages, synchronizing them with the latin |
61 | +auto-hinter. |
62 | +(af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'. |
63 | +This is error #2. |
64 | +(af_cjk_align_linked_edge): Add tracing message. |
65 | + |
66 | +* src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer |
67 | +used. |
68 | +--- a/ChangeLog |
69 | ++++ b/ChangeLog |
70 | +@@ -1,3 +1,46 @@ |
71 | ++2014-04-20 Werner Lemberg <wl@gnu.org> |
72 | ++ |
73 | ++ [autofit] Fix Savannah bug #42148. |
74 | ++ |
75 | ++ The adaptation of the cjk auto-hinter module to blue stringsets in |
76 | ++ 2013-08-25 had three severe bugs. Mea culpa. |
77 | ++ |
78 | ++ 1. Contrary to the latin auto-hinter, characters for reference and |
79 | ++ overshoot values of a blue zone are specified separately. Due to |
80 | ++ the screwed-up change it didn't work at all. |
81 | ++ |
82 | ++ 2. A boolean comparison was erroneously replaced with a cast, |
83 | ++ causing invalid results with the `^' operator later on. The |
84 | ++ visual artifact caused by this problem is the topic of the bug |
85 | ++ report. |
86 | ++ |
87 | ++ 3. Two flag values were inverted, causing incorrect assignment of |
88 | ++ reference and overshoot values. |
89 | ++ |
90 | ++ * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new |
91 | ++ syntax to have both reference and overshoot characters in a single |
92 | ++ string. This is error #1. |
93 | ++ Add extensive comments. |
94 | ++ |
95 | ++ * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no |
96 | ++ longer used. |
97 | ++ (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values. |
98 | ++ This is error #3. |
99 | ++ |
100 | ++ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. |
101 | ++ |
102 | ++ * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1. |
103 | ++ Use character `|' to separate characters for reference and overshoot |
104 | ++ values. |
105 | ++ Improve tracing messages, synchronizing them with the latin |
106 | ++ auto-hinter. |
107 | ++ (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'. |
108 | ++ This is error #2. |
109 | ++ (af_cjk_align_linked_edge): Add tracing message. |
110 | ++ |
111 | ++ * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer |
112 | ++ used. |
113 | ++ |
114 | + 2013-12-08 Werner Lemberg <wl@gnu.org> |
115 | + |
116 | + * Version 2.5.2 released. |
117 | +--- a/src/autofit/afblue.c |
118 | ++++ b/src/autofit/afblue.c |
119 | +@@ -64,8 +64,7 @@ |
120 | + '\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 他们你來們到和地 */ |
121 | + '\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', '\xE5', '\xB8', '\xAD', '\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x83', /* 对對就席我时時會 */ |
122 | + '\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\x83', '\xBD', '\xE8', '\x88', '\xB0', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* 来為能舰說说这這 */ |
123 | +- '\xE9', '\xBD', '\x8A', /* 齊 */ |
124 | +- '\0', |
125 | ++ '\xE9', '\xBD', '\x8A', '|', /* 齊 | */ |
126 | + '\xE5', '\x86', '\x9B', '\xE5', '\x90', '\x8C', '\xE5', '\xB7', '\xB2', '\xE6', '\x84', '\xBF', '\xE6', '\x97', '\xA2', '\xE6', '\x98', '\x9F', '\xE6', '\x98', '\xAF', '\xE6', '\x99', '\xAF', /* 军同已愿既星是景 */ |
127 | + '\xE6', '\xB0', '\x91', '\xE7', '\x85', '\xA7', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\xA8', '\xE7', '\xBD', '\xAE', '\xE8', '\xA6', '\x81', /* 民照现現理用置要 */ |
128 | + '\xE8', '\xBB', '\x8D', '\xE9', '\x82', '\xA3', '\xE9', '\x85', '\x8D', '\xE9', '\x87', '\x8C', '\xE9', '\x96', '\x8B', '\xE9', '\x9B', '\xB7', '\xE9', '\x9C', '\xB2', '\xE9', '\x9D', '\xA2', /* 軍那配里開雷露面 */ |
129 | +@@ -74,8 +73,7 @@ |
130 | + '\xE4', '\xB8', '\xAA', '\xE4', '\xB8', '\xBA', '\xE4', '\xBA', '\xBA', '\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xA5', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', /* 个为人他以们你來 */ |
131 | + '\xE5', '\x80', '\x8B', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\xA4', '\xA7', '\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', /* 個們到和大对對就 */ |
132 | + '\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x89', '\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\xA6', '\x81', '\xE8', '\xAA', '\xAA', /* 我时時有来為要說 */ |
133 | +- '\xE8', '\xAF', '\xB4', /* 说 */ |
134 | +- '\0', |
135 | ++ '\xE8', '\xAF', '\xB4', '|', /* 说 | */ |
136 | + '\xE4', '\xB8', '\xBB', '\xE4', '\xBA', '\x9B', '\xE5', '\x9B', '\xA0', '\xE5', '\xAE', '\x83', '\xE6', '\x83', '\xB3', '\xE6', '\x84', '\x8F', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\x9F', /* 主些因它想意理生 */ |
137 | + '\xE7', '\x95', '\xB6', '\xE7', '\x9C', '\x8B', '\xE7', '\x9D', '\x80', '\xE7', '\xBD', '\xAE', '\xE8', '\x80', '\x85', '\xE8', '\x87', '\xAA', '\xE8', '\x91', '\x97', '\xE8', '\xA3', '\xA1', /* 當看着置者自著裡 */ |
138 | + '\xE8', '\xBF', '\x87', '\xE8', '\xBF', '\x98', '\xE8', '\xBF', '\x9B', '\xE9', '\x80', '\xB2', '\xE9', '\x81', '\x8E', '\xE9', '\x81', '\x93', '\xE9', '\x82', '\x84', '\xE9', '\x87', '\x8C', /* 过还进進過道還里 */ |
139 | +@@ -85,8 +83,7 @@ |
140 | + '\xE4', '\xBA', '\x9B', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 些们你來們到和地 */ |
141 | + '\xE5', '\xA5', '\xB9', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE5', '\xB0', '\xB1', '\xE5', '\xB9', '\xB4', '\xE5', '\xBE', '\x97', '\xE6', '\x83', '\x85', '\xE6', '\x9C', '\x80', /* 她将將就年得情最 */ |
142 | + '\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE7', '\x90', '\x86', '\xE8', '\x83', '\xBD', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* 样樣理能說说这這 */ |
143 | +- '\xE9', '\x80', '\x9A', /* 通 */ |
144 | +- '\0', |
145 | ++ '\xE9', '\x80', '\x9A', '|', /* 通 | */ |
146 | + '\xE5', '\x8D', '\xB3', '\xE5', '\x90', '\x97', '\xE5', '\x90', '\xA7', '\xE5', '\x90', '\xAC', '\xE5', '\x91', '\xA2', '\xE5', '\x93', '\x81', '\xE5', '\x93', '\x8D', '\xE5', '\x97', '\x8E', /* 即吗吧听呢品响嗎 */ |
147 | + '\xE5', '\xB8', '\x88', '\xE5', '\xB8', '\xAB', '\xE6', '\x94', '\xB6', '\xE6', '\x96', '\xAD', '\xE6', '\x96', '\xB7', '\xE6', '\x98', '\x8E', '\xE7', '\x9C', '\xBC', '\xE9', '\x96', '\x93', /* 师師收断斷明眼間 */ |
148 | + '\xE9', '\x97', '\xB4', '\xE9', '\x99', '\x85', '\xE9', '\x99', '\x88', '\xE9', '\x99', '\x90', '\xE9', '\x99', '\xA4', '\xE9', '\x99', '\xB3', '\xE9', '\x9A', '\x8F', '\xE9', '\x9A', '\x9B', /* 间际陈限除陳随際 */ |
149 | +@@ -95,8 +92,7 @@ |
150 | + '\xE4', '\xBA', '\x8B', '\xE5', '\x89', '\x8D', '\xE5', '\xAD', '\xB8', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE6', '\x83', '\x85', '\xE6', '\x83', '\xB3', '\xE6', '\x88', '\x96', /* 事前學将將情想或 */ |
151 | + '\xE6', '\x94', '\xBF', '\xE6', '\x96', '\xAF', '\xE6', '\x96', '\xB0', '\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE6', '\xB0', '\x91', '\xE6', '\xB2', '\x92', '\xE6', '\xB2', '\xA1', /* 政斯新样樣民沒没 */ |
152 | + '\xE7', '\x84', '\xB6', '\xE7', '\x89', '\xB9', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x83', '\xE7', '\xAC', '\xAC', '\xE7', '\xB6', '\x93', '\xE8', '\xB0', '\x81', /* 然特现現球第經谁 */ |
153 | +- '\xE8', '\xB5', '\xB7', /* 起 */ |
154 | +- '\0', |
155 | ++ '\xE8', '\xB5', '\xB7', '|', /* 起 | */ |
156 | + '\xE4', '\xBE', '\x8B', '\xE5', '\x88', '\xA5', '\xE5', '\x88', '\xAB', '\xE5', '\x88', '\xB6', '\xE5', '\x8A', '\xA8', '\xE5', '\x8B', '\x95', '\xE5', '\x90', '\x97', '\xE5', '\x97', '\x8E', /* 例別别制动動吗嗎 */ |
157 | + '\xE5', '\xA2', '\x9E', '\xE6', '\x8C', '\x87', '\xE6', '\x98', '\x8E', '\xE6', '\x9C', '\x9D', '\xE6', '\x9C', '\x9F', '\xE6', '\x9E', '\x84', '\xE7', '\x89', '\xA9', '\xE7', '\xA1', '\xAE', /* 增指明朝期构物确 */ |
158 | + '\xE7', '\xA7', '\x8D', '\xE8', '\xAA', '\xBF', '\xE8', '\xB0', '\x83', '\xE8', '\xB2', '\xBB', '\xE8', '\xB4', '\xB9', '\xE9', '\x82', '\xA3', '\xE9', '\x83', '\xBD', '\xE9', '\x96', '\x93', /* 种調调費费那都間 */ |
159 | +@@ -142,22 +138,14 @@ |
160 | + { AF_BLUE_STRING_HEBREW_DESCENDER, 0 }, |
161 | + { AF_BLUE_STRING_MAX, 0 }, |
162 | + #ifdef AF_CONFIG_OPTION_CJK |
163 | +- { AF_BLUE_STRING_CJK_TOP_FILL, AF_BLUE_PROPERTY_CJK_TOP | |
164 | +- AF_BLUE_PROPERTY_CJK_FILL }, |
165 | +- { AF_BLUE_STRING_CJK_TOP_UNFILL, AF_BLUE_PROPERTY_CJK_TOP }, |
166 | +- { AF_BLUE_STRING_CJK_BOTTOM_FILL, AF_BLUE_PROPERTY_CJK_FILL }, |
167 | +- { AF_BLUE_STRING_CJK_BOTTOM_UNFILL, 0 }, |
168 | ++ { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP }, |
169 | ++ { AF_BLUE_STRING_CJK_BOTTOM, 0 }, |
170 | + #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT |
171 | +- { AF_BLUE_STRING_CJK_LEFT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | |
172 | +- AF_BLUE_PROPERTY_CJK_FILL }, |
173 | +- { AF_BLUE_STRING_CJK_LEFT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ }, |
174 | +- { AF_BLUE_STRING_CJK_RIGHT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | |
175 | +- AF_BLUE_PROPERTY_CJK_RIGHT | |
176 | +- AF_BLUE_PROPERTY_CJK_FILL }, |
177 | +- { AF_BLUE_STRING_CJK_RIGHT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ | |
178 | +- AF_BLUE_PROPERTY_CJK_RIGHT }, |
179 | ++ { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ }, |
180 | ++ { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ | |
181 | ++ AF_BLUE_PROPERTY_CJK_RIGHT }, |
182 | + #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ |
183 | +- { AF_BLUE_STRING_MAX, 0 }, |
184 | ++ { AF_BLUE_STRING_MAX, 0 }, |
185 | + #endif /* AF_CONFIG_OPTION_CJK */ |
186 | + |
187 | + }; |
188 | +--- a/src/autofit/afblue.dat |
189 | ++++ b/src/autofit/afblue.dat |
190 | +@@ -2,7 +2,7 @@ |
191 | + // |
192 | + // Auto-fitter data for blue strings. |
193 | + // |
194 | +-// Copyright 2013 by |
195 | ++// Copyright 2013, 2014 by |
196 | + // David Turner, Robert Wilhelm, and Werner Lemberg. |
197 | + // |
198 | + // This file is part of the FreeType project, and may only be used, |
199 | +@@ -63,6 +63,8 @@ |
200 | + // characters, not bytes. |
201 | + |
202 | + |
203 | ++// The blue zone string data, to be used in the blue stringsets below. |
204 | ++ |
205 | + AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: |
206 | + |
207 | + AF_BLUE_STRING_LATIN_CAPITAL_TOP |
208 | +@@ -105,22 +107,20 @@ |
209 | + |
210 | + #ifdef AF_CONFIG_OPTION_CJK |
211 | + |
212 | +- AF_BLUE_STRING_CJK_TOP_FILL |
213 | ++ AF_BLUE_STRING_CJK_TOP |
214 | + "他们你來們到和地" |
215 | + "对對就席我时時會" |
216 | + "来為能舰說说这這" |
217 | +- "齊" |
218 | +- AF_BLUE_STRING_CJK_TOP_UNFILL |
219 | ++ "齊 |" |
220 | + "军同已愿既星是景" |
221 | + "民照现現理用置要" |
222 | + "軍那配里開雷露面" |
223 | + "顾" |
224 | +- AF_BLUE_STRING_CJK_BOTTOM_FILL |
225 | ++ AF_BLUE_STRING_CJK_BOTTOM |
226 | + "个为人他以们你來" |
227 | + "個們到和大对對就" |
228 | + "我时時有来為要說" |
229 | +- "说" |
230 | +- AF_BLUE_STRING_CJK_BOTTOM_UNFILL |
231 | ++ "说 |" |
232 | + "主些因它想意理生" |
233 | + "當看着置者自著裡" |
234 | + "过还进進過道還里" |
235 | +@@ -128,22 +128,20 @@ |
236 | + |
237 | + #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT |
238 | + |
239 | +- AF_BLUE_STRING_CJK_LEFT_FILL |
240 | ++ AF_BLUE_STRING_CJK_LEFT |
241 | + "些们你來們到和地" |
242 | + "她将將就年得情最" |
243 | + "样樣理能說说这這" |
244 | +- "通" |
245 | +- AF_BLUE_STRING_CJK_LEFT_UNFILL |
246 | ++ "通 |" |
247 | + "即吗吧听呢品响嗎" |
248 | + "师師收断斷明眼間" |
249 | + "间际陈限除陳随際" |
250 | + "隨" |
251 | +- AF_BLUE_STRING_CJK_RIGHT_FILL |
252 | ++ AF_BLUE_STRING_CJK_RIGHT |
253 | + "事前學将將情想或" |
254 | + "政斯新样樣民沒没" |
255 | + "然特现現球第經谁" |
256 | +- "起" |
257 | +- AF_BLUE_STRING_CJK_RIGHT_UNFILL |
258 | ++ "起 |" |
259 | + "例別别制动動吗嗎" |
260 | + "增指明朝期构物确" |
261 | + "种調调費费那都間" |
262 | +@@ -154,6 +152,79 @@ |
263 | + #endif /* AF_CONFIG_OPTION_CJK */ |
264 | + |
265 | + |
266 | ++// The blue zone stringsets, as used in the script styles, cf. `afstyles.h'. |
267 | ++// |
268 | ++// The AF_BLUE_PROPERTY_XXX flags are defined in `afblue.h'; here some |
269 | ++// explanations. |
270 | ++// |
271 | ++// A blue zone in general is defined by a reference and an overshoot line. |
272 | ++// During the hinting process, all coordinate values between those two lines |
273 | ++// are set equal to the reference value, provided that the blue zone is not |
274 | ++// wider than 0.75 pixels (otherwise the blue zone gets ignored). All |
275 | ++// entries must have `AF_BLUE_STRING_MAX' as the final line. |
276 | ++// |
277 | ++// |
278 | ++// latin auto-hinter |
279 | ++// ----------------- |
280 | ++// |
281 | ++// Characters in a blue string are automatically classified as having a flat |
282 | ++// (reference) or a round (overshoot) extremum. The blue zone is then set |
283 | ++// up by the mean values of all flat extrema and all round extrema, |
284 | ++// respectively. Only horizontal blue zones (i.e., adjusting vertical |
285 | ++// coordinate values) are supported. |
286 | ++// |
287 | ++// For the latin auto-hinter, the overshoot should be larger than the |
288 | ++// reference for top zones, and vice versa for bottom zones. |
289 | ++// |
290 | ++// LATIN_TOP |
291 | ++// Take the maximum flat and round coordinate values of the blue string |
292 | ++// characters. If not set, take the minimum values. |
293 | ++// |
294 | ++// LATIN_X_HEIGHT |
295 | ++// Scale all glyphs vertically from the corresponding script to make the |
296 | ++// reference line of this blue zone align on the grid. The scaling |
297 | ++// takes place before all other blue zones get aligned to the grid. |
298 | ++// Only one blue character string of a script style can have this flag. |
299 | ++// |
300 | ++// LATIN_LONG |
301 | ++// Apply an additional constraint for blue zone values: Don't |
302 | ++// necessarily use the extremum as-is but a segment of the topmost (or |
303 | ++// bottommost) contour that is longer than a heuristic threshold, and |
304 | ++// which is not too far away vertically from the real extremum. This |
305 | ++// ensures that small bumps in the outline are ignored (for example, the |
306 | ++// `vertical serifs' found in many Hebrew glyph designs). |
307 | ++// |
308 | ++// The segment must be at least EM/25 font units long, and the distance |
309 | ++// to the extremum must be smaller than EM/4. |
310 | ++// |
311 | ++// |
312 | ++// cjk auto-hinter |
313 | ++// --------------- |
314 | ++// |
315 | ++// Characters in a blue string are *not* automatically classified. Instead, |
316 | ++// first come the characters used for the overshoot value, then the |
317 | ++// character `|', then the characters used for the reference value. The |
318 | ++// blue zone is then set up by the mean values of all reference values and |
319 | ++// all overshoot values, respectively. Both horizontal and vertical blue |
320 | ++// zones (i.e., adjusting vertical and horizontal coordinate values, |
321 | ++// respectively) are supported. |
322 | ++// |
323 | ++// For the cjk auto-hinter, the overshoot should be smaller than the |
324 | ++// reference for top zones, and vice versa for bottom zones. |
325 | ++// |
326 | ++// CJK_TOP |
327 | ++// Take the maximum flat and round coordinate values of the blue string |
328 | ++// characters. If not set, take the minimum values. |
329 | ++// |
330 | ++// CJK_RIGHT |
331 | ++// A synonym for CJK_TOP. If CJK_HORIZ is set, this flag indicates the |
332 | ++// right blue zone, taking horizontal maximum values. |
333 | ++// |
334 | ++// CJK_HORIZ |
335 | ++// Define a blue zone for horizontal hinting (i.e., vertical blue |
336 | ++// zones). If not set, this is a blue zone for vertical hinting. |
337 | ++ |
338 | ++ |
339 | + AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: |
340 | + |
341 | + AF_BLUE_STRINGSET_LATN |
342 | +@@ -195,22 +266,14 @@ |
343 | + #ifdef AF_CONFIG_OPTION_CJK |
344 | + |
345 | + AF_BLUE_STRINGSET_HANI |
346 | +- { AF_BLUE_STRING_CJK_TOP_FILL, AF_BLUE_PROPERTY_CJK_TOP | |
347 | +- AF_BLUE_PROPERTY_CJK_FILL } |
348 | +- { AF_BLUE_STRING_CJK_TOP_UNFILL, AF_BLUE_PROPERTY_CJK_TOP } |
349 | +- { AF_BLUE_STRING_CJK_BOTTOM_FILL, AF_BLUE_PROPERTY_CJK_FILL } |
350 | +- { AF_BLUE_STRING_CJK_BOTTOM_UNFILL, 0 } |
351 | ++ { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP } |
352 | ++ { AF_BLUE_STRING_CJK_BOTTOM, 0 } |
353 | + #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT |
354 | +- { AF_BLUE_STRING_CJK_LEFT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | |
355 | +- AF_BLUE_PROPERTY_CJK_FILL } |
356 | +- { AF_BLUE_STRING_CJK_LEFT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ } |
357 | +- { AF_BLUE_STRING_CJK_RIGHT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | |
358 | +- AF_BLUE_PROPERTY_CJK_RIGHT | |
359 | +- AF_BLUE_PROPERTY_CJK_FILL } |
360 | +- { AF_BLUE_STRING_CJK_RIGHT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ | |
361 | +- AF_BLUE_PROPERTY_CJK_RIGHT } |
362 | ++ { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ } |
363 | ++ { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ | |
364 | ++ AF_BLUE_PROPERTY_CJK_RIGHT } |
365 | + #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ |
366 | +- { AF_BLUE_STRING_MAX, 0 } |
367 | ++ { AF_BLUE_STRING_MAX, 0 } |
368 | + |
369 | + #endif /* AF_CONFIG_OPTION_CJK */ |
370 | + |
371 | +--- a/src/autofit/afblue.h |
372 | ++++ b/src/autofit/afblue.h |
373 | +@@ -7,7 +7,7 @@ |
374 | + /* */ |
375 | + /* Auto-fitter data for blue strings (specification). */ |
376 | + /* */ |
377 | +-/* Copyright 2013 by */ |
378 | ++/* Copyright 2013, 2014 by */ |
379 | + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
380 | + /* */ |
381 | + /* This file is part of the FreeType project, and may only be used, */ |
382 | +@@ -67,7 +67,7 @@ |
383 | + /* At the bottommost level, we define strings for finding blue zones. */ |
384 | + |
385 | + |
386 | +-#define AF_BLUE_STRING_MAX_LEN 25 |
387 | ++#define AF_BLUE_STRING_MAX_LEN 52 |
388 | + |
389 | + /* The AF_Blue_String enumeration values are offsets into the */ |
390 | + /* `af_blue_strings' array. */ |
391 | +@@ -93,17 +93,13 @@ |
392 | + AF_BLUE_STRING_HEBREW_DESCENDER = 203, |
393 | + af_blue_1_1 = 213, |
394 | + #ifdef AF_CONFIG_OPTION_CJK |
395 | +- AF_BLUE_STRING_CJK_TOP_FILL = af_blue_1_1 + 1, |
396 | +- AF_BLUE_STRING_CJK_TOP_UNFILL = af_blue_1_1 + 77, |
397 | +- AF_BLUE_STRING_CJK_BOTTOM_FILL = af_blue_1_1 + 153, |
398 | +- AF_BLUE_STRING_CJK_BOTTOM_UNFILL = af_blue_1_1 + 229, |
399 | +- af_blue_1_1_1 = af_blue_1_1 + 304, |
400 | ++ AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1, |
401 | ++ AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 154, |
402 | ++ af_blue_1_1_1 = af_blue_1_1 + 306, |
403 | + #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT |
404 | +- AF_BLUE_STRING_CJK_LEFT_FILL = af_blue_1_1_1 + 1, |
405 | +- AF_BLUE_STRING_CJK_LEFT_UNFILL = af_blue_1_1_1 + 77, |
406 | +- AF_BLUE_STRING_CJK_RIGHT_FILL = af_blue_1_1_1 + 153, |
407 | +- AF_BLUE_STRING_CJK_RIGHT_UNFILL = af_blue_1_1_1 + 229, |
408 | +- af_blue_1_2_1 = af_blue_1_1_1 + 304, |
409 | ++ AF_BLUE_STRING_CJK_LEFT = af_blue_1_1_1 + 1, |
410 | ++ AF_BLUE_STRING_CJK_RIGHT = af_blue_1_1_1 + 154, |
411 | ++ af_blue_1_2_1 = af_blue_1_1_1 + 306, |
412 | + #else |
413 | + af_blue_1_2_1 = af_blue_1_1_1 + 0, |
414 | + #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ |
415 | +@@ -140,13 +136,12 @@ |
416 | + #define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 1 ) |
417 | + #define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 2 ) |
418 | + |
419 | +-#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 0 ) |
420 | +-#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 1 ) |
421 | +-#define AF_BLUE_PROPERTY_CJK_FILL ( 1 << 2 ) |
422 | ++#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) |
423 | ++#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) |
424 | + #define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP |
425 | + |
426 | + |
427 | +-#define AF_BLUE_STRINGSET_MAX_LEN 9 |
428 | ++#define AF_BLUE_STRINGSET_MAX_LEN 7 |
429 | + |
430 | + /* The AF_Blue_Stringset enumeration values are offsets into the */ |
431 | + /* `af_blue_stringsets' array. */ |
432 | +@@ -160,9 +155,9 @@ |
433 | + af_blue_2_1 = 24, |
434 | + #ifdef AF_CONFIG_OPTION_CJK |
435 | + AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0, |
436 | +- af_blue_2_1_1 = af_blue_2_1 + 4, |
437 | ++ af_blue_2_1_1 = af_blue_2_1 + 2, |
438 | + #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT |
439 | +- af_blue_2_2_1 = af_blue_2_1_1 + 4, |
440 | ++ af_blue_2_2_1 = af_blue_2_1_1 + 2, |
441 | + #else |
442 | + af_blue_2_2_1 = af_blue_2_1_1 + 0, |
443 | + #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ |
444 | +--- a/src/autofit/afblue.hin |
445 | ++++ b/src/autofit/afblue.hin |
446 | +@@ -4,7 +4,7 @@ |
447 | + /* */ |
448 | + /* Auto-fitter data for blue strings (specification). */ |
449 | + /* */ |
450 | +-/* Copyright 2013 by */ |
451 | ++/* Copyright 2013, 2014 by */ |
452 | + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
453 | + /* */ |
454 | + /* This file is part of the FreeType project, and may only be used, */ |
455 | +@@ -100,9 +100,8 @@ |
456 | + #define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 1 ) |
457 | + #define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 2 ) |
458 | + |
459 | +-#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 0 ) |
460 | +-#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 1 ) |
461 | +-#define AF_BLUE_PROPERTY_CJK_FILL ( 1 << 2 ) |
462 | ++#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) |
463 | ++#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) |
464 | + #define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP |
465 | + |
466 | + |
467 | +--- a/src/autofit/afcjk.c |
468 | ++++ b/src/autofit/afcjk.c |
469 | +@@ -221,6 +221,8 @@ |
470 | + FT_Int num_fills; |
471 | + FT_Int num_flats; |
472 | + |
473 | ++ FT_Bool fill; |
474 | ++ |
475 | + AF_CJKBlue blue; |
476 | + FT_Error error; |
477 | + AF_CJKAxis axis; |
478 | +@@ -229,22 +231,6 @@ |
479 | + AF_Blue_Stringset bss = metrics->root.script_class->blue_stringset; |
480 | + const AF_Blue_StringRec* bs = &af_blue_stringsets[bss]; |
481 | + |
482 | +-#ifdef FT_DEBUG_LEVEL_TRACE |
483 | +- FT_String* cjk_blue_name[4] = |
484 | +- { |
485 | +- (FT_String*)"bottom", /* -- , -- */ |
486 | +- (FT_String*)"top", /* -- , TOP */ |
487 | +- (FT_String*)"left", /* HORIZ, -- */ |
488 | +- (FT_String*)"right" /* HORIZ, TOP */ |
489 | +- }; |
490 | +- |
491 | +- FT_String* cjk_blue_type_name[2] = |
492 | +- { |
493 | +- (FT_String*)"unfilled", /* -- */ |
494 | +- (FT_String*)"filled" /* FILL */ |
495 | +- }; |
496 | +-#endif |
497 | +- |
498 | + |
499 | + /* we walk over the blue character strings as specified in the */ |
500 | + /* script's entry in the `af_blue_stringset' array, computing its */ |
501 | +@@ -266,15 +252,29 @@ |
502 | + else |
503 | + axis = &metrics->axis[AF_DIMENSION_VERT]; |
504 | + |
505 | +- FT_TRACE5(( "blue zone %d:\n", axis->blue_count )); |
506 | ++#ifdef FT_DEBUG_LEVEL_TRACE |
507 | ++ { |
508 | ++ FT_String* cjk_blue_name[4] = |
509 | ++ { |
510 | ++ (FT_String*)"bottom", /* -- , -- */ |
511 | ++ (FT_String*)"top", /* -- , TOP */ |
512 | ++ (FT_String*)"left", /* HORIZ, -- */ |
513 | ++ (FT_String*)"right" /* HORIZ, TOP */ |
514 | ++ }; |
515 | ++ |
516 | ++ |
517 | ++ FT_TRACE5(( "blue zone %d (%s):\n", |
518 | ++ axis->blue_count, |
519 | ++ cjk_blue_name[AF_CJK_IS_HORIZ_BLUE( bs ) | |
520 | ++ AF_CJK_IS_TOP_BLUE( bs ) ] )); |
521 | ++ } |
522 | ++#endif /* FT_DEBUG_LEVEL_TRACE */ |
523 | + |
524 | + num_fills = 0; |
525 | + num_flats = 0; |
526 | + |
527 | +- FT_TRACE5(( " cjk blue %s/%s\n", |
528 | +- cjk_blue_name[AF_CJK_IS_HORIZ_BLUE( bs ) | |
529 | +- AF_CJK_IS_TOP_BLUE( bs ) ], |
530 | +- cjk_blue_type_name[!!AF_CJK_IS_FILLED_BLUE( bs )] )); |
531 | ++ fill = 1; /* start with characters that define fill values */ |
532 | ++ FT_TRACE5(( " [overshoot values]\n" )); |
533 | + |
534 | + while ( *p ) |
535 | + { |
536 | +@@ -287,6 +287,14 @@ |
537 | + |
538 | + GET_UTF8_CHAR( ch, p ); |
539 | + |
540 | ++ /* switch to characters that define flat values */ |
541 | ++ if ( ch == '|' ) |
542 | ++ { |
543 | ++ fill = 0; |
544 | ++ FT_TRACE5(( " [reference values]\n" )); |
545 | ++ continue; |
546 | ++ } |
547 | ++ |
548 | + /* load the character in the face -- skip unknown or empty ones */ |
549 | + glyph_index = FT_Get_Char_Index( face, ch ); |
550 | + if ( glyph_index == 0 ) |
551 | +@@ -374,7 +382,7 @@ |
552 | + FT_TRACE5(( " U+%04lX: best_pos = %5ld\n", ch, best_pos )); |
553 | + } |
554 | + |
555 | +- if ( AF_CJK_IS_FILLED_BLUE( bs ) ) |
556 | ++ if ( fill ) |
557 | + fills[num_fills++] = best_pos; |
558 | + else |
559 | + flats[num_flats++] = best_pos; |
560 | +@@ -386,15 +394,15 @@ |
561 | + * we couldn't find a single glyph to compute this blue zone, |
562 | + * we will simply ignore it then |
563 | + */ |
564 | +- FT_TRACE5(( " empty\n" )); |
565 | ++ FT_TRACE5(( " empty\n" )); |
566 | + continue; |
567 | + } |
568 | + |
569 | +- /* we have computed the contents of the `fill' and `flats' tables, */ |
570 | +- /* now determine the reference position of the blue zone -- */ |
571 | +- /* we simply take the median value after a simple sort */ |
572 | +- af_sort_pos( num_flats, flats ); |
573 | ++ /* we have computed the contents of the `fill' and `flats' tables, */ |
574 | ++ /* now determine the reference and overshoot position of the blue -- */ |
575 | ++ /* we simply take the median value after a simple sort */ |
576 | + af_sort_pos( num_fills, fills ); |
577 | ++ af_sort_pos( num_flats, flats ); |
578 | + |
579 | + blue = &axis->blues[axis->blue_count]; |
580 | + blue_ref = &blue->ref.org; |
581 | +@@ -433,7 +441,7 @@ |
582 | + *blue_ref = |
583 | + *blue_shoot = ( shoot + ref ) / 2; |
584 | + |
585 | +- FT_TRACE5(( " [overshoot smaller than reference," |
586 | ++ FT_TRACE5(( " [reference smaller than overshoot," |
587 | + " taking mean value]\n" )); |
588 | + } |
589 | + } |
590 | +@@ -1186,8 +1194,10 @@ |
591 | + /* zone, check for left edges */ |
592 | + /* */ |
593 | + /* of course, that's for TrueType */ |
594 | +- is_top_right_blue = FT_BOOL( blue->flags & AF_CJK_BLUE_TOP ); |
595 | +- is_major_dir = FT_BOOL( edge->dir == axis->major_dir ); |
596 | ++ is_top_right_blue = |
597 | ++ (FT_Byte)( ( blue->flags & AF_CJK_BLUE_TOP ) != 0 ); |
598 | ++ is_major_dir = |
599 | ++ FT_BOOL( edge->dir == axis->major_dir ); |
600 | + |
601 | + /* if it is a top zone, the edge must be against the major */ |
602 | + /* direction; if it is a bottom zone, it must be in the major */ |
603 | +@@ -1484,6 +1494,12 @@ |
604 | + |
605 | + |
606 | + stem_edge->pos = base_edge->pos + fitted_width; |
607 | ++ |
608 | ++ FT_TRACE5(( " CJKLINK: edge %d @%d (opos=%.2f) linked to %.2f," |
609 | ++ " dist was %.2f, now %.2f\n", |
610 | ++ stem_edge - hints->axis[dim].edges, stem_edge->fpos, |
611 | ++ stem_edge->opos / 64.0, stem_edge->pos / 64.0, |
612 | ++ dist / 64.0, fitted_width / 64.0 )); |
613 | + } |
614 | + |
615 | + |
616 | +--- a/src/autofit/afcjk.h |
617 | ++++ b/src/autofit/afcjk.h |
618 | +@@ -4,7 +4,7 @@ |
619 | + /* */ |
620 | + /* Auto-fitter hinting routines for CJK script (specification). */ |
621 | + /* */ |
622 | +-/* Copyright 2006, 2007, 2011-2013 by */ |
623 | ++/* Copyright 2006, 2007, 2011-2014 by */ |
624 | + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
625 | + /* */ |
626 | + /* This file is part of the FreeType project, and may only be used, */ |
627 | +@@ -55,8 +55,6 @@ |
628 | + ( (b)->properties & AF_BLUE_PROPERTY_CJK_TOP ) |
629 | + #define AF_CJK_IS_HORIZ_BLUE( b ) \ |
630 | + ( (b)->properties & AF_BLUE_PROPERTY_CJK_HORIZ ) |
631 | +-#define AF_CJK_IS_FILLED_BLUE( b ) \ |
632 | +- ( (b)->properties & AF_BLUE_PROPERTY_CJK_FILL ) |
633 | + #define AF_CJK_IS_RIGHT_BLUE AF_CJK_IS_TOP_BLUE |
634 | + |
635 | + #define AF_CJK_MAX_WIDTHS 16 |
636 | +--- a/src/autofit/aflatin.c |
637 | ++++ b/src/autofit/aflatin.c |
638 | +@@ -2099,7 +2099,7 @@ |
639 | + |
640 | + FT_TRACE5(( " LINK: edge %d (opos=%.2f) linked to %.2f," |
641 | + " dist was %.2f, now %.2f\n", |
642 | +- stem_edge-hints->axis[dim].edges, stem_edge->opos / 64.0, |
643 | ++ stem_edge - hints->axis[dim].edges, stem_edge->opos / 64.0, |
644 | + stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 )); |
645 | + } |
646 | + |
647 | |
648 | === modified file 'debian/patches-freetype/series' |
649 | --- debian/patches-freetype/series 2014-05-01 12:53:39 +0000 |
650 | +++ debian/patches-freetype/series 2014-05-05 14:39:12 +0000 |
651 | @@ -5,3 +5,4 @@ |
652 | CVE-2014-2240.patch |
653 | CVE-2014-2241.patch |
654 | 0001-Fix-Savannah-bug-40997.patch |
655 | +0002-Fix-Savannah-bug-42418.patch |