[FREETYPE] Update to v2.6.1. CORE-10378
[reactos.git] / reactos / lib / 3rdparty / freetype / src / autofit / afblue.dat
1 // afblue.dat
2 //
3 // Auto-fitter data for blue strings.
4 //
5 // Copyright 2013-2015 by
6 // David Turner, Robert Wilhelm, and Werner Lemberg.
7 //
8 // This file is part of the FreeType project, and may only be used,
9 // modified, and distributed under the terms of the FreeType project
10 // license, LICENSE.TXT. By continuing to use, modify, or distribute
11 // this file you indicate that you have read the license and
12 // understand and accept it fully.
13
14
15 // This file contains data specific to blue zones. It gets processed by
16 // a script to simulate `jagged arrays', with enumeration values holding
17 // offsets into the arrays.
18 //
19 // The format of the file is rather simple: A section starts with three
20 // labels separated by whitespace and followed by a colon (everything in a
21 // single line); the first label gives the name of the enumeration template,
22 // the second the name of the array template, and the third the name of the
23 // `maximum' template, holding the size of the largest array element. The
24 // script then fills the corresponding templates (indicated by `@'
25 // characters around the name).
26 //
27 // A section contains one or more data records. Each data record consists
28 // of two or more lines. The first line holds the enumeration name, and the
29 // remaining lines the corresponding array data.
30 //
31 // There are two possible representations for array data.
32 //
33 // - A string of characters in UTF-8 encoding enclosed in double quotes,
34 // using C syntax. There can be only one string per line, thus the
35 // starting and ending double quote must be the first and last character
36 // in the line, respectively, ignoring whitespace before and after the
37 // string. Space characters within the string are ignored too. If there
38 // are multiple strings (in multiple lines), they are concatenated to a
39 // single string. In the output, a string gets represented as a series of
40 // singles bytes, followed by a zero byte. The enumeration values simply
41 // hold byte offsets to the start of the corresponding strings.
42 //
43 // - Data blocks enclosed in balanced braces, which get copied verbatim and
44 // which can span multiple lines. The opening brace of a block must be
45 // the first character of a line (ignoring whitespace), and the closing
46 // brace the last (ignoring whitespace also). The script appends a comma
47 // character after each block and counts the number of blocks to set the
48 // enumeration values.
49 //
50 // A section can contain either strings only or data blocks only.
51 //
52 // A comment line starts with `//'; it gets removed. A preprocessor
53 // directive line (using the standard syntax of `cpp') starts with `#' and
54 // gets copied verbatim to both the enumeration and the array. Whitespace
55 // outside of a string is insignificant.
56 //
57 // Preprocessor directives are ignored while the script computes maximum
58 // values; this essentially means that the maximum values can easily be too
59 // large. Given that the purpose of those values is to create local
60 // fixed-size arrays at compile time for further processing of the blue zone
61 // data, this isn't a problem. Note the the final zero byte of a string is
62 // not counted. Note also that the count holds the number of UTF-8 encoded
63 // characters, not bytes.
64
65
66 // The blue zone string data, to be used in the blue stringsets below.
67
68 AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
69
70 AF_BLUE_STRING_ARABIC_TOP
71 "ا إ ل ك ط ظ"
72 AF_BLUE_STRING_ARABIC_BOTTOM
73 "ت ث ط ظ ك"
74 // We don't necessarily have access to medial forms via Unicode in case
75 // Arabic presentational forms are missing. The only character that is
76 // guaranteed to have the same vertical position with joining (this is,
77 // non-isolated) forms is U+0640, ARABIC TATWEEL, which must join both
78 // round and flat curves.
79 AF_BLUE_STRING_ARABIC_JOIN
80 "ـ"
81
82 AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP
83 "БВЕПЗОСЭ"
84 AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM
85 "БВЕШЗОСЭ"
86 AF_BLUE_STRING_CYRILLIC_SMALL
87 "хпншезос"
88 AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER
89 "руф"
90
91 // we separate the letters with spaces to avoid ligatures;
92 // this is just for convenience to simplify reading
93 AF_BLUE_STRING_DEVANAGARI_BASE
94 "क म अ आ थ ध भ श"
95 AF_BLUE_STRING_DEVANAGARI_TOP
96 "ई ऐ ओ औ ि ी ो ौ"
97 // note that some fonts have extreme variation in the height of the
98 // round head elements; for this reason we also define the `base'
99 // blue zone, which must be always present
100 AF_BLUE_STRING_DEVANAGARI_HEAD
101 "क म अ आ थ ध भ श"
102 AF_BLUE_STRING_DEVANAGARI_BOTTOM
103 "ु ृ"
104
105 AF_BLUE_STRING_GREEK_CAPITAL_TOP
106 "ΓΒΕΖΘΟΩ"
107 AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM
108 "ΒΔΖΞΘΟ"
109 AF_BLUE_STRING_GREEK_SMALL_BETA_TOP
110 "βθδζλξ"
111 AF_BLUE_STRING_GREEK_SMALL
112 "αειοπστω"
113 AF_BLUE_STRING_GREEK_SMALL_DESCENDER
114 "βγημρφχψ"
115
116 AF_BLUE_STRING_HEBREW_TOP
117 "בדהחךכםס"
118 AF_BLUE_STRING_HEBREW_BOTTOM
119 "בטכםסצ"
120 AF_BLUE_STRING_HEBREW_DESCENDER
121 "קךןףץ"
122
123 AF_BLUE_STRING_LAO_TOP
124 "າ ດ ອ ມ ລ ວ ຣ ງ"
125 AF_BLUE_STRING_LAO_BOTTOM
126 "າ ອ ບ ຍ ຣ ຮ ວ ຢ"
127 AF_BLUE_STRING_LAO_ASCENDER
128 "ປ ຢ ຟ ຝ"
129 AF_BLUE_STRING_LAO_LARGE_ASCENDER
130 "ໂ ໄ ໃ"
131 AF_BLUE_STRING_LAO_DESCENDER
132 "ງ ຊ ຖ ຽ ໆ ຯ"
133
134 AF_BLUE_STRING_LATIN_CAPITAL_TOP
135 "THEZOCQS"
136 AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM
137 "HEZLOCUS"
138 AF_BLUE_STRING_LATIN_SMALL_F_TOP
139 "fijkdbh"
140 AF_BLUE_STRING_LATIN_SMALL
141 "xzroesc"
142 AF_BLUE_STRING_LATIN_SMALL_DESCENDER
143 "pqgjy"
144
145 // we assume that both the subscript and superscript ranges
146 // don't contain oldstyle digits (actually, most fonts probably
147 // have digits only in those ranges)
148 AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP
149 "₀₃₅₇₈"
150 AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM
151 "₀₁₂₃₈"
152 AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP
153 "ᵢⱼₕₖₗ"
154 AF_BLUE_STRING_LATIN_SUBS_SMALL
155 "ₐₑₒₓₙₛᵥᵤᵣ"
156 AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER
157 "ᵦᵧᵨᵩₚ"
158
159 AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP
160 "⁰³⁵⁷ᵀᴴᴱᴼ"
161 AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM
162 "⁰¹²³ᴱᴸᴼᵁ"
163 AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP
164 "ᵇᵈᵏʰʲᶠⁱ"
165 AF_BLUE_STRING_LATIN_SUPS_SMALL
166 "ᵉᵒʳˢˣᶜᶻ"
167 AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER
168 "ᵖʸᵍ"
169
170 // we separate the letters with spaces to avoid ligatures;
171 // this is just for convenience to simplify reading
172 AF_BLUE_STRING_TELUGU_TOP
173 "ఇ ఌ ఙ ఞ ణ ఱ ౯"
174 AF_BLUE_STRING_TELUGU_BOTTOM
175 "అ క చ ర ఽ ౨ ౬"
176
177 AF_BLUE_STRING_THAI_TOP
178 "บ เ แ อ ก า"
179 AF_BLUE_STRING_THAI_BOTTOM
180 "บ ป ษ ฯ อ ย ฮ"
181 AF_BLUE_STRING_THAI_ASCENDER
182 "ป ฝ ฟ"
183 AF_BLUE_STRING_THAI_LARGE_ASCENDER
184 "โ ใ ไ"
185 AF_BLUE_STRING_THAI_DESCENDER
186 "ฎ ฏ ฤ ฦ"
187 AF_BLUE_STRING_THAI_LARGE_DESCENDER
188 "ญ ฐ"
189 AF_BLUE_STRING_THAI_DIGIT_TOP
190 "๐ ๑ ๓"
191
192
193 #ifdef AF_CONFIG_OPTION_CJK
194
195 AF_BLUE_STRING_CJK_TOP
196 "他们你來們到和地"
197 "对對就席我时時會"
198 "来為能舰說说这這"
199 "齊 |"
200 "军同已愿既星是景"
201 "民照现現理用置要"
202 "軍那配里開雷露面"
203 "顾"
204 AF_BLUE_STRING_CJK_BOTTOM
205 "个为人他以们你來"
206 "個們到和大对對就"
207 "我时時有来為要說"
208 "说 |"
209 "主些因它想意理生"
210 "當看着置者自著裡"
211 "过还进進過道還里"
212 "面"
213
214 #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
215
216 AF_BLUE_STRING_CJK_LEFT
217 "些们你來們到和地"
218 "她将將就年得情最"
219 "样樣理能說说这這"
220 "通 |"
221 "即吗吧听呢品响嗎"
222 "师師收断斷明眼間"
223 "间际陈限除陳随際"
224 "隨"
225 AF_BLUE_STRING_CJK_RIGHT
226 "事前學将將情想或"
227 "政斯新样樣民沒没"
228 "然特现現球第經谁"
229 "起 |"
230 "例別别制动動吗嗎"
231 "增指明朝期构物确"
232 "种調调費费那都間"
233 "间"
234
235 #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
236
237 #endif /* AF_CONFIG_OPTION_CJK */
238
239
240 // The blue zone stringsets, as used in the script styles, cf. `afstyles.h'.
241 //
242 // The AF_BLUE_PROPERTY_XXX flags are defined in `afblue.h'; here some
243 // explanations.
244 //
245 // A blue zone in general is defined by a reference and an overshoot line.
246 // During the hinting process, all coordinate values between those two lines
247 // are set equal to the reference value, provided that the blue zone is not
248 // wider than 0.75 pixels (otherwise the blue zone gets ignored). All
249 // entries must have `AF_BLUE_STRING_MAX' as the final line.
250 //
251 // During the glyph analysis, edges are sorted from bottom to top, and then
252 // sequentially checked, edge by edge, against the blue zones in the order
253 // given below.
254 //
255 //
256 // latin auto-hinter
257 // -----------------
258 //
259 // Characters in a blue string are automatically classified as having a flat
260 // (reference) or a round (overshoot) extremum. The blue zone is then set
261 // up by the mean values of all flat extrema and all round extrema,
262 // respectively. Only horizontal blue zones (i.e., adjusting vertical
263 // coordinate values) are supported.
264 //
265 // For the latin auto-hinter, the overshoot should be larger than the
266 // reference for top zones, and vice versa for bottom zones.
267 //
268 // LATIN_TOP
269 // Take the maximum flat and round coordinate values of the blue string
270 // characters for computing the blue zone's reference and overshoot
271 // values.
272 //
273 // If not set, take the minimum values.
274 //
275 // LATIN_NEUTRAL
276 // Ignore round extrema and define the blue zone with flat values only.
277 // Both top and bottom of contours can match. This is useful for
278 // scripts like Devanagari where vowel signs attach to the base
279 // character and are implemented as components of composite glyphs.
280 //
281 // If not set, both round and flat extrema are taken into account.
282 // Additionally, only the top or the bottom of a contour can match,
283 // depending on the LATIN_TOP flag.
284 //
285 // Neutral blue zones should always follow non-neutral blue zones.
286 //
287 // LATIN_X_HEIGHT
288 // Scale all glyphs vertically from the corresponding script to make the
289 // reference line of this blue zone align on the grid. The scaling
290 // takes place before all other blue zones get aligned to the grid.
291 // Only one blue character string of a script style can have this flag.
292 //
293 // LATIN_LONG
294 // Apply an additional constraint for blue zone values: Don't
295 // necessarily use the extremum as-is but a segment of the topmost (or
296 // bottommost) contour that is longer than a heuristic threshold, and
297 // which is not too far away vertically from the real extremum. This
298 // ensures that small bumps in the outline are ignored (for example, the
299 // `vertical serifs' found in many Hebrew glyph designs).
300 //
301 // The segment must be at least EM/25 font units long, and the distance
302 // to the extremum must be smaller than EM/4.
303 //
304 //
305 // cjk auto-hinter
306 // ---------------
307 //
308 // Characters in a blue string are *not* automatically classified. Instead,
309 // first come the characters used for the overshoot value, then the
310 // character `|', then the characters used for the reference value. The
311 // blue zone is then set up by the mean values of all reference values and
312 // all overshoot values, respectively. Both horizontal and vertical blue
313 // zones (i.e., adjusting vertical and horizontal coordinate values,
314 // respectively) are supported.
315 //
316 // For the cjk auto-hinter, the overshoot should be smaller than the
317 // reference for top zones, and vice versa for bottom zones.
318 //
319 // CJK_TOP
320 // Take the maximum flat and round coordinate values of the blue string
321 // characters. If not set, take the minimum values.
322 //
323 // CJK_RIGHT
324 // A synonym for CJK_TOP. If CJK_HORIZ is set, this flag indicates the
325 // right blue zone, taking horizontal maximum values.
326 //
327 // CJK_HORIZ
328 // Define a blue zone for horizontal hinting (i.e., vertical blue
329 // zones). If not set, this is a blue zone for vertical hinting.
330
331
332 AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
333
334 AF_BLUE_STRINGSET_ARAB
335 { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
336 { AF_BLUE_STRING_ARABIC_BOTTOM, 0 }
337 { AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL }
338 { AF_BLUE_STRING_MAX, 0 }
339
340 AF_BLUE_STRINGSET_CYRL
341 { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
342 { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }
343 { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
344 AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
345 { AF_BLUE_STRING_CYRILLIC_SMALL, 0 }
346 { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 }
347 { AF_BLUE_STRING_MAX, 0 }
348
349 AF_BLUE_STRINGSET_DEVA
350 { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
351 { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }
352 { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP |
353 AF_BLUE_PROPERTY_LATIN_NEUTRAL |
354 AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
355 { AF_BLUE_STRING_DEVANAGARI_BASE, 0 }
356 { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 }
357 { AF_BLUE_STRING_MAX, 0 }
358
359 AF_BLUE_STRINGSET_GREK
360 { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
361 { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 }
362 { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
363 { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
364 AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
365 { AF_BLUE_STRING_GREEK_SMALL, 0 }
366 { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 }
367 { AF_BLUE_STRING_MAX, 0 }
368
369 AF_BLUE_STRINGSET_HEBR
370 { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
371 AF_BLUE_PROPERTY_LATIN_LONG }
372 { AF_BLUE_STRING_HEBREW_BOTTOM, 0 }
373 { AF_BLUE_STRING_HEBREW_DESCENDER, 0 }
374 { AF_BLUE_STRING_MAX, 0 }
375
376 AF_BLUE_STRINGSET_LAO
377 { AF_BLUE_STRING_LAO_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
378 AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
379 { AF_BLUE_STRING_LAO_BOTTOM, 0 }
380 { AF_BLUE_STRING_LAO_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
381 { AF_BLUE_STRING_LAO_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
382 { AF_BLUE_STRING_LAO_DESCENDER, 0 }
383 { AF_BLUE_STRING_MAX, 0 }
384
385 AF_BLUE_STRINGSET_LATN
386 { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
387 { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }
388 { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
389 { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
390 AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
391 { AF_BLUE_STRING_LATIN_SMALL, 0 }
392 { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }
393 { AF_BLUE_STRING_MAX, 0 }
394
395 AF_BLUE_STRINGSET_LATB
396 { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
397 { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, 0 }
398 { AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
399 { AF_BLUE_STRING_LATIN_SUBS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
400 AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
401 { AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 }
402 { AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 }
403 { AF_BLUE_STRING_MAX, 0 }
404
405 AF_BLUE_STRINGSET_LATP
406 { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
407 { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, 0 }
408 { AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
409 { AF_BLUE_STRING_LATIN_SUPS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
410 AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
411 { AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 }
412 { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 }
413 { AF_BLUE_STRING_MAX, 0 }
414
415 AF_BLUE_STRINGSET_TELU
416 { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
417 { AF_BLUE_STRING_TELUGU_BOTTOM, 0 }
418 { AF_BLUE_STRING_MAX, 0 }
419
420 AF_BLUE_STRINGSET_THAI
421 { AF_BLUE_STRING_THAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
422 AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
423 { AF_BLUE_STRING_THAI_BOTTOM, 0 }
424 { AF_BLUE_STRING_THAI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
425 { AF_BLUE_STRING_THAI_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
426 { AF_BLUE_STRING_THAI_DESCENDER, 0 }
427 { AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0 }
428 { AF_BLUE_STRING_THAI_DIGIT_TOP, 0 }
429 { AF_BLUE_STRING_MAX, 0 }
430
431
432 #ifdef AF_CONFIG_OPTION_CJK
433
434 AF_BLUE_STRINGSET_HANI
435 { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP }
436 { AF_BLUE_STRING_CJK_BOTTOM, 0 }
437 #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
438 { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ }
439 { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ |
440 AF_BLUE_PROPERTY_CJK_RIGHT }
441 #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
442 { AF_BLUE_STRING_MAX, 0 }
443
444 #endif /* AF_CONFIG_OPTION_CJK */
445
446
447 // END