mgh: fix for default HDD DMA mode, that wasn't correctly set
[open-ps2-loader.git] / thirdparty / freetype-2.3.12 / src / gxvalid / gxvfgen.c
blobe48778a2a155b372cacac0f8640313bd6cd6e13f
1 /***************************************************************************/
2 /* */
3 /* gxfgen.c */
4 /* */
5 /* Generate feature registry data for gxv `feat' validator. */
6 /* This program is derived from gxfeatreg.c in gxlayout. */
7 /* */
8 /* Copyright 2004, 2005, 2006 by Masatake YAMATO and Redhat K.K. */
9 /* */
10 /* This file may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
15 /* */
16 /***************************************************************************/
18 /***************************************************************************/
19 /* */
20 /* gxfeatreg.c */
21 /* */
22 /* Database of font features pre-defined by Apple Computer, Inc. */
23 /* http://developer.apple.com/fonts/Registry/ */
24 /* (body). */
25 /* */
26 /* Copyright 2003 by */
27 /* Masatake YAMATO and Redhat K.K. */
28 /* */
29 /* This file may only be used, */
30 /* modified, and distributed under the terms of the FreeType project */
31 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
32 /* this file you indicate that you have read the license and */
33 /* understand and accept it fully. */
34 /* */
35 /***************************************************************************/
37 /***************************************************************************/
38 /* */
39 /* Development of gxfeatreg.c is supported by */
40 /* Information-technology Promotion Agency, Japan. */
41 /* */
42 /***************************************************************************/
45 /***************************************************************************/
46 /* */
47 /* This file is compiled as a stand-alone executable. */
48 /* This file is never compiled into `libfreetype2'. */
49 /* The output of this file is used in `gxvfeat.c'. */
50 /* ----------------------------------------------------------------------- */
51 /* Compile: gcc `pkg-config --cflags freetype2` gxvfgen.c -o gxvfgen */
52 /* Run: ./gxvfgen > tmp.c */
53 /* */
54 /***************************************************************************/
56 /*******************************************************************/
57 /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */
58 /*******************************************************************/
61 * If you add a new setting to a feature, check the number of settings
62 * in the feature. If the number is greater than the value defined as
63 * FEATREG_MAX_SETTING, update the value.
65 #define FEATREG_MAX_SETTING 12
67 /*******************************************************************/
68 /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */
69 /*******************************************************************/
72 #include <stdio.h>
73 #include <string.h>
76 /*************************************************************************/
77 /*************************************************************************/
78 /***** *****/
79 /***** Data and Types *****/
80 /***** *****/
81 /*************************************************************************/
82 /*************************************************************************/
84 #define APPLE_RESERVED "Apple Reserved"
85 #define APPLE_RESERVED_LENGTH 14
87 typedef struct GX_Feature_RegistryRec_
89 const char* feat_name;
90 char exclusive;
91 char* setting_name[FEATREG_MAX_SETTING];
93 } GX_Feature_RegistryRec;
96 #define EMPTYFEAT {0, 0, {NULL}}
99 static GX_Feature_RegistryRec featreg_table[] = {
100 { /* 0 */
101 "All Typographic Features",
104 "All Type Features",
105 NULL
107 }, { /* 1 */
108 "Ligatures",
111 "Required Ligatures",
112 "Common Ligatures",
113 "Rare Ligatures",
114 "Logos",
115 "Rebus Pictures",
116 "Diphthong Ligatures",
117 "Squared Ligatures",
118 "Squared Ligatures, Abbreviated",
119 NULL
121 }, { /* 2 */
122 "Cursive Connection",
125 "Unconnected",
126 "Partially Connected",
127 "Cursive",
128 NULL
130 }, { /* 3 */
131 "Letter Case",
134 "Upper & Lower Case",
135 "All Caps",
136 "All Lower Case",
137 "Small Caps",
138 "Initial Caps",
139 "Initial Caps & Small Caps",
140 NULL
142 }, { /* 4 */
143 "Vertical Substitution",
146 /* "Substitute Vertical Forms", */
147 "Turns on the feature",
148 NULL
150 }, { /* 5 */
151 "Linguistic Rearrangement",
154 /* "Linguistic Rearrangement", */
155 "Turns on the feature",
156 NULL
158 }, { /* 6 */
159 "Number Spacing",
162 "Monospaced Numbers",
163 "Proportional Numbers",
164 NULL
166 }, { /* 7 */
167 APPLE_RESERVED " 1",
169 {NULL}
170 }, { /* 8 */
171 "Smart Swashes",
174 "Word Initial Swashes",
175 "Word Final Swashes",
176 "Line Initial Swashes",
177 "Line Final Swashes",
178 "Non-Final Swashes",
179 NULL
181 }, { /* 9 */
182 "Diacritics",
185 "Show Diacritics",
186 "Hide Diacritics",
187 "Decompose Diacritics",
188 NULL
190 }, { /* 10 */
191 "Vertical Position",
194 /* "Normal Position", */
195 "No Vertical Position",
196 "Superiors",
197 "Inferiors",
198 "Ordinals",
199 NULL
201 }, { /* 11 */
202 "Fractions",
205 "No Fractions",
206 "Vertical Fractions",
207 "Diagonal Fractions",
208 NULL
210 }, { /* 12 */
211 APPLE_RESERVED " 2",
213 {NULL}
214 }, { /* 13 */
215 "Overlapping Characters",
218 /* "Prevent Overlap", */
219 "Turns on the feature",
220 NULL
222 }, { /* 14 */
223 "Typographic Extras",
226 "Hyphens to Em Dash",
227 "Hyphens to En Dash",
228 "Unslashed Zero",
229 "Form Interrobang",
230 "Smart Quotes",
231 "Periods to Ellipsis",
232 NULL
234 }, { /* 15 */
235 "Mathematical Extras",
238 "Hyphens to Minus",
239 "Asterisk to Multiply",
240 "Slash to Divide",
241 "Inequality Ligatures",
242 "Exponents",
243 NULL
245 }, { /* 16 */
246 "Ornament Sets",
249 "No Ornaments",
250 "Dingbats",
251 "Pi Characters",
252 "Fleurons",
253 "Decorative Borders",
254 "International Symbols",
255 "Math Symbols",
256 NULL
258 }, { /* 17 */
259 "Character Alternatives",
262 "No Alternates",
263 /* TODO */
264 NULL
266 }, { /* 18 */
267 "Design Complexity",
270 "Design Level 1",
271 "Design Level 2",
272 "Design Level 3",
273 "Design Level 4",
274 "Design Level 5",
275 /* TODO */
276 NULL
278 }, { /* 19 */
279 "Style Options",
282 "No Style Options",
283 "Display Text",
284 "Engraved Text",
285 "Illuminated Caps",
286 "Tilling Caps",
287 "Tall Caps",
288 NULL
290 }, { /* 20 */
291 "Character Shape",
294 "Traditional Characters",
295 "Simplified Characters",
296 "JIS 1978 Characters",
297 "JIS 1983 Characters",
298 "JIS 1990 Characters",
299 "Traditional Characters, Alternative Set 1",
300 "Traditional Characters, Alternative Set 2",
301 "Traditional Characters, Alternative Set 3",
302 "Traditional Characters, Alternative Set 4",
303 "Traditional Characters, Alternative Set 5",
304 "Expert Characters",
305 NULL /* count => 12 */
307 }, { /* 21 */
308 "Number Case",
311 "Lower Case Numbers",
312 "Upper Case Numbers",
313 NULL
315 }, { /* 22 */
316 "Text Spacing",
319 "Proportional",
320 "Monospaced",
321 "Half-width",
322 "Normal",
323 NULL
325 }, /* Here after Newer */ { /* 23 */
326 "Transliteration",
329 "No Transliteration",
330 "Hanja To Hangul",
331 "Hiragana to Katakana",
332 "Katakana to Hiragana",
333 "Kana to Romanization",
334 "Romanization to Hiragana",
335 "Romanization to Katakana",
336 "Hanja to Hangul, Alternative Set 1",
337 "Hanja to Hangul, Alternative Set 2",
338 "Hanja to Hangul, Alternative Set 3",
339 NULL
341 }, { /* 24 */
342 "Annotation",
345 "No Annotation",
346 "Box Annotation",
347 "Rounded Box Annotation",
348 "Circle Annotation",
349 "Inverted Circle Annotation",
350 "Parenthesis Annotation",
351 "Period Annotation",
352 "Roman Numeral Annotation",
353 "Diamond Annotation",
354 NULL
356 }, { /* 25 */
357 "Kana Spacing",
360 "Full Width",
361 "Proportional",
362 NULL
364 }, { /* 26 */
365 "Ideographic Spacing",
368 "Full Width",
369 "Proportional",
370 NULL
372 }, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 27-30 */
373 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 31-35 */
374 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 36-40 */
375 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 40-45 */
376 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 46-50 */
377 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 51-55 */
378 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 56-60 */
379 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 61-65 */
380 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 66-70 */
381 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 71-75 */
382 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 76-80 */
383 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 81-85 */
384 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 86-90 */
385 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 91-95 */
386 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, /* 96-98 */
387 EMPTYFEAT, /* 99 */ { /* 100 => 22 */
388 "Text Spacing",
391 "Proportional",
392 "Monospaced",
393 "Half-width",
394 "Normal",
395 NULL
397 }, { /* 101 => 25 */
398 "Kana Spacing",
401 "Full Width",
402 "Proportional",
403 NULL
405 }, { /* 102 => 26 */
406 "Ideographic Spacing",
409 "Full Width",
410 "Proportional",
411 NULL
413 }, { /* 103 */
414 "CJK Roman Spacing",
417 "Half-width",
418 "Proportional",
419 "Default Roman",
420 "Full-width Roman",
421 NULL
423 }, { /* 104 => 1 */
424 "All Typographic Features",
427 "All Type Features",
428 NULL
434 /*************************************************************************/
435 /*************************************************************************/
436 /***** *****/
437 /***** Generator *****/
438 /***** *****/
439 /*************************************************************************/
440 /*************************************************************************/
443 main( void )
445 int i;
448 printf( " {\n" );
449 printf( " /* Generated from %s */\n", __FILE__ );
451 for ( i = 0;
452 i < sizeof ( featreg_table ) / sizeof ( GX_Feature_RegistryRec );
453 i++ )
455 const char* feat_name;
456 int nSettings;
459 feat_name = featreg_table[i].feat_name;
460 for ( nSettings = 0;
461 featreg_table[i].setting_name[nSettings];
462 nSettings++)
463 ; /* Do nothing */
465 printf( " {%1d, %1d, %1d, %2d}, /* %s */\n",
466 feat_name ? 1 : 0,
467 ( feat_name &&
468 ( ft_strncmp( feat_name,
469 APPLE_RESERVED, APPLE_RESERVED_LENGTH ) == 0 )
470 ) ? 1 : 0,
471 featreg_table[i].exclusive ? 1 : 0,
472 nSettings,
473 feat_name ? feat_name : "__EMPTY__" );
476 printf( " };\n" );
478 return 0;
482 /* END */