00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #define FEATREG_MAX_SETTING 12
00066
00067
00068
00069
00070
00071
00072 #include <stdio.h>
00073 #include <string.h>
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 #define APPLE_RESERVED "Apple Reserved"
00085 #define APPLE_RESERVED_LENGTH 14
00086
00087 typedef struct GX_Feature_RegistryRec_
00088 {
00089 const char* feat_name;
00090 char exclusive;
00091 char* setting_name[FEATREG_MAX_SETTING];
00092
00093 } GX_Feature_RegistryRec;
00094
00095
00096 #define EMPTYFEAT {0, 0, {NULL}}
00097
00098
00099 static GX_Feature_RegistryRec featreg_table[] = {
00100 {
00101 "All Typographic Features",
00102 0,
00103 {
00104 "All Type Features",
00105 NULL
00106 }
00107 }, {
00108 "Ligatures",
00109 0,
00110 {
00111 "Required Ligatures",
00112 "Common Ligatures",
00113 "Rare Ligatures",
00114 "Logos",
00115 "Rebus Pictures",
00116 "Diphthong Ligatures",
00117 "Squared Ligatures",
00118 "Squared Ligatures, Abbreviated",
00119 NULL
00120 }
00121 }, {
00122 "Cursive Connection",
00123 1,
00124 {
00125 "Unconnected",
00126 "Partially Connected",
00127 "Cursive",
00128 NULL
00129 }
00130 }, {
00131 "Letter Case",
00132 1,
00133 {
00134 "Upper & Lower Case",
00135 "All Caps",
00136 "All Lower Case",
00137 "Small Caps",
00138 "Initial Caps",
00139 "Initial Caps & Small Caps",
00140 NULL
00141 }
00142 }, {
00143 "Vertical Substitution",
00144 0,
00145 {
00146
00147 "Turns on the feature",
00148 NULL
00149 }
00150 }, {
00151 "Linguistic Rearrangement",
00152 0,
00153 {
00154
00155 "Turns on the feature",
00156 NULL
00157 }
00158 }, {
00159 "Number Spacing",
00160 1,
00161 {
00162 "Monospaced Numbers",
00163 "Proportional Numbers",
00164 NULL
00165 }
00166 }, {
00167 APPLE_RESERVED " 1",
00168 0,
00169 {NULL}
00170 }, {
00171 "Smart Swashes",
00172 0,
00173 {
00174 "Word Initial Swashes",
00175 "Word Final Swashes",
00176 "Line Initial Swashes",
00177 "Line Final Swashes",
00178 "Non-Final Swashes",
00179 NULL
00180 }
00181 }, {
00182 "Diacritics",
00183 1,
00184 {
00185 "Show Diacritics",
00186 "Hide Diacritics",
00187 "Decompose Diacritics",
00188 NULL
00189 }
00190 }, {
00191 "Vertical Position",
00192 1,
00193 {
00194
00195 "No Vertical Position",
00196 "Superiors",
00197 "Inferiors",
00198 "Ordinals",
00199 NULL
00200 }
00201 }, {
00202 "Fractions",
00203 1,
00204 {
00205 "No Fractions",
00206 "Vertical Fractions",
00207 "Diagonal Fractions",
00208 NULL
00209 }
00210 }, {
00211 APPLE_RESERVED " 2",
00212 0,
00213 {NULL}
00214 }, {
00215 "Overlapping Characters",
00216 0,
00217 {
00218
00219 "Turns on the feature",
00220 NULL
00221 }
00222 }, {
00223 "Typographic Extras",
00224 0,
00225 {
00226 "Hyphens to Em Dash",
00227 "Hyphens to En Dash",
00228 "Unslashed Zero",
00229 "Form Interrobang",
00230 "Smart Quotes",
00231 "Periods to Ellipsis",
00232 NULL
00233 }
00234 }, {
00235 "Mathematical Extras",
00236 0,
00237 {
00238 "Hyphens to Minus",
00239 "Asterisk to Multiply",
00240 "Slash to Divide",
00241 "Inequality Ligatures",
00242 "Exponents",
00243 NULL
00244 }
00245 }, {
00246 "Ornament Sets",
00247 1,
00248 {
00249 "No Ornaments",
00250 "Dingbats",
00251 "Pi Characters",
00252 "Fleurons",
00253 "Decorative Borders",
00254 "International Symbols",
00255 "Math Symbols",
00256 NULL
00257 }
00258 }, {
00259 "Character Alternatives",
00260 1,
00261 {
00262 "No Alternates",
00263
00264 NULL
00265 }
00266 }, {
00267 "Design Complexity",
00268 1,
00269 {
00270 "Design Level 1",
00271 "Design Level 2",
00272 "Design Level 3",
00273 "Design Level 4",
00274 "Design Level 5",
00275
00276 NULL
00277 }
00278 }, {
00279 "Style Options",
00280 1,
00281 {
00282 "No Style Options",
00283 "Display Text",
00284 "Engraved Text",
00285 "Illuminated Caps",
00286 "Tilling Caps",
00287 "Tall Caps",
00288 NULL
00289 }
00290 }, {
00291 "Character Shape",
00292 1,
00293 {
00294 "Traditional Characters",
00295 "Simplified Characters",
00296 "JIS 1978 Characters",
00297 "JIS 1983 Characters",
00298 "JIS 1990 Characters",
00299 "Traditional Characters, Alternative Set 1",
00300 "Traditional Characters, Alternative Set 2",
00301 "Traditional Characters, Alternative Set 3",
00302 "Traditional Characters, Alternative Set 4",
00303 "Traditional Characters, Alternative Set 5",
00304 "Expert Characters",
00305 NULL
00306 }
00307 }, {
00308 "Number Case",
00309 1,
00310 {
00311 "Lower Case Numbers",
00312 "Upper Case Numbers",
00313 NULL
00314 }
00315 }, {
00316 "Text Spacing",
00317 1,
00318 {
00319 "Proportional",
00320 "Monospaced",
00321 "Half-width",
00322 "Normal",
00323 NULL
00324 }
00325 }, {
00326 "Transliteration",
00327 1,
00328 {
00329 "No Transliteration",
00330 "Hanja To Hangul",
00331 "Hiragana to Katakana",
00332 "Katakana to Hiragana",
00333 "Kana to Romanization",
00334 "Romanization to Hiragana",
00335 "Romanization to Katakana",
00336 "Hanja to Hangul, Alternative Set 1",
00337 "Hanja to Hangul, Alternative Set 2",
00338 "Hanja to Hangul, Alternative Set 3",
00339 NULL
00340 }
00341 }, {
00342 "Annotation",
00343 1,
00344 {
00345 "No Annotation",
00346 "Box Annotation",
00347 "Rounded Box Annotation",
00348 "Circle Annotation",
00349 "Inverted Circle Annotation",
00350 "Parenthesis Annotation",
00351 "Period Annotation",
00352 "Roman Numeral Annotation",
00353 "Diamond Annotation",
00354 NULL
00355 }
00356 }, {
00357 "Kana Spacing",
00358 1,
00359 {
00360 "Full Width",
00361 "Proportional",
00362 NULL
00363 }
00364 }, {
00365 "Ideographic Spacing",
00366 1,
00367 {
00368 "Full Width",
00369 "Proportional",
00370 NULL
00371 }
00372 }, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00373 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00374 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00375 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00376 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00377 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00378 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00379 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00380 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00381 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00382 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00383 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00384 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00385 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00386 EMPTYFEAT, EMPTYFEAT, EMPTYFEAT,
00387 EMPTYFEAT, {
00388 "Text Spacing",
00389 1,
00390 {
00391 "Proportional",
00392 "Monospaced",
00393 "Half-width",
00394 "Normal",
00395 NULL
00396 }
00397 }, {
00398 "Kana Spacing",
00399 1,
00400 {
00401 "Full Width",
00402 "Proportional",
00403 NULL
00404 }
00405 }, {
00406 "Ideographic Spacing",
00407 1,
00408 {
00409 "Full Width",
00410 "Proportional",
00411 NULL
00412 }
00413 }, {
00414 "CJK Roman Spacing",
00415 1,
00416 {
00417 "Half-width",
00418 "Proportional",
00419 "Default Roman",
00420 "Full-width Roman",
00421 NULL
00422 }
00423 }, {
00424 "All Typographic Features",
00425 0,
00426 {
00427 "All Type Features",
00428 NULL
00429 }
00430 }
00431 };
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442 int
00443 main( void )
00444 {
00445 int i;
00446
00447
00448 printf( " {\n" );
00449 printf( " /* Generated from %s */\n", __FILE__ );
00450
00451 for ( i = 0;
00452 i < sizeof ( featreg_table ) / sizeof ( GX_Feature_RegistryRec );
00453 i++ )
00454 {
00455 const char* feat_name;
00456 int nSettings;
00457
00458
00459 feat_name = featreg_table[i].feat_name;
00460 for ( nSettings = 0;
00461 featreg_table[i].setting_name[nSettings];
00462 nSettings++)
00463 ;
00464
00465 printf( " {%1d, %1d, %1d, %2d}, /* %s */\n",
00466 feat_name ? 1 : 0,
00467 ( feat_name &&
00468 ( ft_strncmp( feat_name,
00469 APPLE_RESERVED, APPLE_RESERVED_LENGTH ) == 0 )
00470 ) ? 1 : 0,
00471 featreg_table[i].exclusive ? 1 : 0,
00472 nSettings,
00473 feat_name ? feat_name : "__EMPTY__" );
00474 }
00475
00476 printf( " };\n" );
00477
00478 return 0;
00479 }
00480
00481
00482