2dfb5aca28
improvements compared to "src/type1". Briefly : - the postscript-like interpreter is now gone. We now perform pattern-matching to load our font content. The resultant code is much faster, smaller, and easier to maintain. For a more detailed description, see the comments at the start of "src/type1z/t1objs.c" - the glyph loader will be greatly simplified really soon, and the clumsy hinter will be ditched in favor of a more general auto-hinting module (when we get one). The goal is to strip down the Type1 driver to about 15-20 Kb. This is still an experimental version. It is added to the repository for archiving. You should not try to use it for now (it won't work because some crucial parts are _knowingly_ ignored for now !). Note that the "old" type1 driver will probably move to the "demos/src" directory, in order to show how one can replace one given font driver at runtime (and to provide the functionality of the "t1dump" program).
74 lines
2.4 KiB
C
74 lines
2.4 KiB
C
/*******************************************************************
|
|
*
|
|
* t1tokens.h
|
|
*
|
|
* Type 1 tokens definition
|
|
*
|
|
* Copyright 2000 David Turner, Robert Wilhelm and Werner Lemberg.
|
|
*
|
|
* This file is part of the FreeType project, and may only be used
|
|
* modified and distributed under the terms of the FreeType project
|
|
* license, LICENSE.TXT. By continuing to use, modify or distribute
|
|
* this file you indicate that you have read the license and
|
|
* understand and accept it fully.
|
|
*
|
|
* This file only contains macros that are expanded when compiling
|
|
* the "t1load.c" source file.
|
|
*
|
|
******************************************************************/
|
|
|
|
#undef FACE
|
|
#define FACE (face->type1)
|
|
|
|
/* define the font info dictionary parsing callbacks */
|
|
|
|
PARSE_STRING("version",version)
|
|
PARSE_STRING("Notice",notice)
|
|
PARSE_STRING("FullName",full_name)
|
|
PARSE_STRING("FamilyName",family_name)
|
|
PARSE_STRING("Weight",weight)
|
|
|
|
PARSE_INT("ItalicAngle",italic_angle)
|
|
PARSE_BOOL("isFixedPitch",is_fixed_pitch)
|
|
PARSE_INT("UnderlinePosition",underline_position)
|
|
PARSE_INT("UnderlineThickness",underline_thickness)
|
|
|
|
/* define the private dict parsing callbacks */
|
|
|
|
PARSE_INT("UniqueID",unique_id)
|
|
PARSE_INT("lenIV",lenIV)
|
|
|
|
PARSE_COORDS( "BlueValues", num_blues, 14, blue_values)
|
|
PARSE_COORDS( "OtherBlues", num_other_blues, 10, other_blues)
|
|
|
|
PARSE_COORDS( "FamilyBlues", num_family_blues, 14, family_blues)
|
|
PARSE_COORDS( "FamilyOtherBlues", num_family_other_blues, 10, family_other_blues)
|
|
|
|
PARSE_FIXED( "BlueScale", blue_scale)
|
|
PARSE_INT( "BlueShift", blue_shift)
|
|
|
|
PARSE_INT( "BlueFuzz", blue_fuzz)
|
|
|
|
PARSE_COORDS2( "StdHW", 1, standard_width )
|
|
PARSE_COORDS2( "StdVW", 1, standard_height )
|
|
|
|
PARSE_COORDS( "StemSnapH", num_snap_widths, 12, stem_snap_widths )
|
|
PARSE_COORDS( "StemSnapV", num_snap_heights, 12, stem_snap_heights )
|
|
|
|
PARSE_INT( "LanguageGroup", language_group )
|
|
PARSE_INT( "password", password )
|
|
PARSE_COORDS2( "MinFeature", 2, min_feature )
|
|
|
|
/* define the top-level dictionary parsing callbacks */
|
|
|
|
/* PARSE_STRING( "FontName", font_name ) -- handled by special routine */
|
|
PARSE_INT( "PaintType", paint_type )
|
|
PARSE_INT( "FontType", font_type )
|
|
PARSE_FIXEDS2( "FontMatrix", 4, font_matrix )
|
|
/* PARSE_COORDS2( "FontBBox", 4, font_bbox ) -- handled by special func */
|
|
PARSE_INT( "StrokeWidth", stroke_width )
|
|
|
|
#undef FACE
|
|
|
|
|