1 /***************************************************************************/
5 /* Experimental Type 1 tokenizer (specification). */
7 /* Copyright 1996-2000 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
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. */
16 /***************************************************************************/
20 #define T1TYPE T1_FontInfo
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 )
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 )
35 #define T1TYPE T1_Private
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 )
42 Z1_PRIVATE_FIXED ( "BlueScale", blue_scale )
43 Z1_PRIVATE_NUM ( "BlueShift", blue_shift )
44 Z1_PRIVATE_NUM ( "BlueFuzz", blue_fuzz )
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 )
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 )
56 Z1_PRIVATE_NUM_TABLE ( "StemSnapH", snap_widths, 12, num_snap_widths )
57 Z1_PRIVATE_NUM_TABLE ( "StemSnapV", snap_heights, 12, num_snap_heights )
61 #define T1TYPE T1_Font
63 Z1_TOPDICT_NUM( "PaintType", paint_type )
64 Z1_TOPDICT_NUM( "FontType", font_type )
65 Z1_TOPDICT_NUM( "StrokeWidth", stroke_width )
70 /* define the font info dictionary parsing callbacks */
72 #define FACE (face->type1.font_info)
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 )
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 )
86 /* define the private dict parsing callbacks */
88 #define FACE (face->type1.private_dict)
90 PARSE_INT ("UniqueID", unique_id )
91 PARSE_INT ("lenIV", lenIV )
93 PARSE_COORDS ( "BlueValues", num_blues, 14, blue_values)
94 PARSE_COORDS ( "OtherBlues", num_other_blues, 10, other_blues)
96 PARSE_COORDS ( "FamilyBlues", num_family_blues, 14, family_blues )
97 PARSE_COORDS ( "FamilyOtherBlues", num_family_other_blues, 10,
100 PARSE_FIXED ( "BlueScale", blue_scale )
101 PARSE_INT ( "BlueShift", blue_shift )
103 PARSE_INT ( "BlueFuzz", blue_fuzz )
105 PARSE_COORDS2( "StdHW", 1, standard_width )
106 PARSE_COORDS2( "StdVW", 1, standard_height )
108 PARSE_COORDS ( "StemSnapH", num_snap_widths, 12, stem_snap_widths )
109 PARSE_COORDS ( "StemSnapV", num_snap_heights, 12, stem_snap_heights )
111 PARSE_INT ( "LanguageGroup", language_group )
112 PARSE_INT ( "password", password )
113 PARSE_COORDS2( "MinFeature", 2, min_feature )
116 /* define the top-level dictionary parsing callbacks */
118 #define FACE (face->type1)
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 )