]>
Commit | Line | Data |
---|---|---|
cabec872 RR |
1 | /***************************************************************************/ |
2 | /* */ | |
3 | /* z1tokens.h */ | |
4 | /* */ | |
5 | /* Experimental Type 1 tokenizer (specification). */ | |
6 | /* */ | |
7 | /* Copyright 1996-2000 by */ | |
8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | |
9 | /* */ | |
10 | /* This file is part of the FreeType project, and 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 | /***************************************************************************/ | |
17 | ||
18 | ||
19 | #undef T1TYPE | |
20 | #define T1TYPE T1_FontInfo | |
21 | ||
22 | Z1_FONTINFO_STRING( "version", version ) | |
23 | Z1_FONTINFO_STRING( "Notice", notice ) | |
24 | Z1_FONTINFO_STRING( "FullName", full_name ) | |
25 | Z1_FONTINFO_STRING( "FamilyName", family_name ) | |
26 | Z1_FONTINFO_STRING( "Weight", weight ) | |
27 | ||
28 | Z1_FONTINFO_NUM ( "ItalicAngle", italic_angle ) | |
29 | Z1_FONTINFO_BOOL ( "isFixedPitch", is_fixed_pitch ) | |
30 | Z1_FONTINFO_NUM ( "UnderlinePosition", underline_position ) | |
31 | Z1_FONTINFO_NUM ( "UnderlineThickness", underline_thickness ) | |
32 | ||
33 | ||
34 | #undef T1TYPE | |
35 | #define T1TYPE T1_Private | |
36 | ||
37 | Z1_PRIVATE_NUM ( "UniqueID", unique_id ) | |
38 | Z1_PRIVATE_NUM ( "lenIV", lenIV ) | |
39 | Z1_PRIVATE_NUM ( "LanguageGroup", language_group ) | |
40 | Z1_PRIVATE_NUM ( "password", password ) | |
41 | ||
42 | Z1_PRIVATE_FIXED ( "BlueScale", blue_scale ) | |
43 | Z1_PRIVATE_NUM ( "BlueShift", blue_shift ) | |
44 | Z1_PRIVATE_NUM ( "BlueFuzz", blue_fuzz ) | |
45 | ||
46 | Z1_PRIVATE_NUM_TABLE ( "BlueValues", blue_values, 14, num_blue_values ) | |
47 | Z1_PRIVATE_NUM_TABLE ( "OtherBlues", other_blues, 10, num_other_blues ) | |
48 | Z1_PRIVATE_NUM_TABLE ( "FamilyBlues", family_blues, 14, num_family_blues ) | |
49 | Z1_PRIVATE_NUM_TABLE ( "FamilyOtherBlues", family_other_blues, 10, \ | |
50 | num_family_other_blues ) | |
51 | ||
52 | Z1_PRIVATE_NUM_TABLE2( "StdHW", standard_width, 1 ) | |
53 | Z1_PRIVATE_NUM_TABLE2( "StdVW", standard_height, 1 ) | |
54 | Z1_PRIVATE_NUM_TABLE2( "MinFeature", min_feature, 2 ) | |
55 | ||
56 | Z1_PRIVATE_NUM_TABLE ( "StemSnapH", snap_widths, 12, num_snap_widths ) | |
57 | Z1_PRIVATE_NUM_TABLE ( "StemSnapV", snap_heights, 12, num_snap_heights ) | |
58 | ||
59 | ||
60 | #undef T1TYPE | |
61 | #define T1TYPE T1_Font | |
62 | ||
63 | Z1_TOPDICT_NUM( "PaintType", paint_type ) | |
64 | Z1_TOPDICT_NUM( "FontType", font_type ) | |
65 | Z1_TOPDICT_NUM( "StrokeWidth", stroke_width ) | |
66 | ||
67 | ||
68 | #if 0 | |
69 | ||
70 | /* define the font info dictionary parsing callbacks */ | |
71 | #undef FACE | |
72 | #define FACE (face->type1.font_info) | |
73 | ||
74 | PARSE_STRING( "version", version ) | |
75 | PARSE_STRING( "Notice", notice ) | |
76 | PARSE_STRING( "FullName", full_name ) | |
77 | PARSE_STRING( "FamilyName", family_name ) | |
78 | PARSE_STRING( "Weight", weight ) | |
79 | ||
80 | PARSE_INT ( "ItalicAngle", italic_angle ) | |
81 | PARSE_BOOL ( "isFixedPitch", is_fixed_pitch ) | |
82 | PARSE_NUM ( "UnderlinePosition", underline_position, FT_Short ) | |
83 | PARSE_NUM ( "UnderlineThickness", underline_thickness, FT_UShort ) | |
84 | ||
85 | ||
86 | /* define the private dict parsing callbacks */ | |
87 | #undef FACE | |
88 | #define FACE (face->type1.private_dict) | |
89 | ||
90 | PARSE_INT ("UniqueID", unique_id ) | |
91 | PARSE_INT ("lenIV", lenIV ) | |
92 | ||
93 | PARSE_COORDS ( "BlueValues", num_blues, 14, blue_values) | |
94 | PARSE_COORDS ( "OtherBlues", num_other_blues, 10, other_blues) | |
95 | ||
96 | PARSE_COORDS ( "FamilyBlues", num_family_blues, 14, family_blues ) | |
97 | PARSE_COORDS ( "FamilyOtherBlues", num_family_other_blues, 10, | |
98 | family_other_blues ) | |
99 | ||
100 | PARSE_FIXED ( "BlueScale", blue_scale ) | |
101 | PARSE_INT ( "BlueShift", blue_shift ) | |
102 | ||
103 | PARSE_INT ( "BlueFuzz", blue_fuzz ) | |
104 | ||
105 | PARSE_COORDS2( "StdHW", 1, standard_width ) | |
106 | PARSE_COORDS2( "StdVW", 1, standard_height ) | |
107 | ||
108 | PARSE_COORDS ( "StemSnapH", num_snap_widths, 12, stem_snap_widths ) | |
109 | PARSE_COORDS ( "StemSnapV", num_snap_heights, 12, stem_snap_heights ) | |
110 | ||
111 | PARSE_INT ( "LanguageGroup", language_group ) | |
112 | PARSE_INT ( "password", password ) | |
113 | PARSE_COORDS2( "MinFeature", 2, min_feature ) | |
114 | ||
115 | ||
116 | /* define the top-level dictionary parsing callbacks */ | |
117 | #undef FACE | |
118 | #define FACE (face->type1) | |
119 | ||
120 | /*PARSE_STRING ( "FontName", font_name ) -- handled by special routine */ | |
121 | PARSE_NUM ( "PaintType", paint_type, FT_Byte ) | |
122 | PARSE_NUM ( "FontType", font_type, FT_Byte ) | |
123 | PARSE_FIXEDS2( "FontMatrix", 4, font_matrix ) | |
124 | /*PARSE_COORDS2( "FontBBox", 4, font_bbox ) -- handled by special routine */ | |
125 | PARSE_INT ( "StrokeWidth", stroke_width ) | |
126 | ||
127 | #undef FACE | |
128 | ||
129 | #endif /* 0 */ | |
130 | ||
131 | ||
132 | /* END */ |