Merge lp:~jincreator/ubuntu/trusty/freetype/trusty-proposed-lp1310017 into lp:ubuntu/trusty-proposed/freetype

Proposed by Jinkyu Yi
Status: Merged
Merge reported by: Brian Murray
Merged at revision: not available
Proposed branch: lp:~jincreator/ubuntu/trusty/freetype/trusty-proposed-lp1310017
Merge into: lp:ubuntu/trusty-proposed/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/trusty/freetype/trusty-proposed-lp1310017
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+218319@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

I've already uploaded this via some other branch and merge proposal. I think it was to trusty and not trusty-proposed, trusty-proposed is the correct destination.

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: