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