freetype2/src/type1/t1tokens.h

108 lines
3.8 KiB
C
Raw Normal View History

/***************************************************************************/
/* */
/* t1tokens.h */
/* */
/* Type 1 tokenizer (specification). */
/* */
* freetype2/include/freetype/internal/psaux.h: New macros IS_PS_NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and IS_PS_BASE85 (from freetype2/src/psaux/psconv.h). (T1_FieldLocation): Add T1_FIELD_LOCATION_LOADER, T1_FIELD_LOCATION_FACE, and T1_FIELD_LOCATION_BLEND. (T1_DecoderRec): New fields `buildchar' and `face'. (IS_PS_TOKEN): New macro. * freetype2/include/freetype/internal/t1types.h (T1_FaceRec): New fields `ndv_idx', `cdv_idx', and `len_buildchar'. * freetype2/include/freetype/t1tables.h (PS_BlendRec): New fields `default_design_vector' and `num_default_design_vector'. * freetype2/src/psaux/psconv.h: Move macros IS_PS_NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and IS_PS_BASE85 to freetype2/include/freetype/internal/psaux.h. * freetype2/src/psaux/psobjs.c (ps_parser_to_token_array): Allow `token' argument to be NULL if we want only to count the number of tokens. (ps_tocoordarray): Allow `coords' argument to be NULL if we just want to skip the array. (ps_tofixedarray): Allow `values' argument to be NULL if we just want to skip the array. * freetype2/src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add support for (partially commented out) othersubrs 19-25, 27, and 28. (t1_decoder_init): Initialize new fields `face' and `buildchar'. (t1_decoder_done): Release new field `buildchar'. * freetype2/src/type1/t1load.c (parse_buildchar, parse_private): New functions. (t1_keywords): Register them. (t1_allocate_blend): Updated. (t1_load_keyword): Handle field types T1_FIELD_LOCATION_LOADER, T1_FIELD_LOCATION_FACE and T1_FIELD_LOCATION_BLEND. (parse_dict): Remove `keyword_flags' argument. Use new macro IS_PS_TOKEN. Changed function so that later PostScript definitions override earlier ones. (t1_init_loader): Initialize new field `keywords_encountered'. (T1_Open_Face): Initialize new fields `ndv_idx', `cdv_idx', and `len_buildchar'. Remove `keywords_flags'. * freetype2/src/type1/t1load.h (T1_LoaderRect): New field `keywords_encountered'. (T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros. * freetype2/src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: New entries for parsing /NDV, /CDV, and /DesignVector.
2006-07-14 20:28:08 +02:00
/* Copyright 1996-2001, 2002, 2003, 2004, 2006 by */
/* 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. */
/* */
/***************************************************************************/
#undef FT_STRUCTURE
#define FT_STRUCTURE PS_FontInfoRec
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_FONT_INFO
Make reference valid HTML 4.01 transitional. * src/tools/docmaker/tohtml.py (html_header_1): Add doctype and charset. (html_header_2): Fix style elements and add some more. Fix syntax. (block_header, block_footer, description_header, description_footer, marker_header, marker_footer, source_header, source_footer, chapter_header, chapter_footer): Don't use <center>...</center> but `align=center' table attribute. Use double quotes around table widths given in percent. (keyword_prefix, keyword_suffix): Don't change font colour directly but use a new <span> class. (section_synopsis_header, section_synopsis_footer): Don't change colour. (print_html_field): <tr> gets the `valign' attribute, not <table>. (print_html_field_list): Ditto. (index_exit): Don't use <center>...</center> but `align=center' table attribute. (toc_exit, section_enter): Ditto. (block_enter): Use <h4><a>, not <a><h4>. This change reimplements fix from 2003-05-30 without breaking binary compatibility. * include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness' are reverted to be normal values. * include/freetype/internal/psaux.h (T1_FieldType): Remove `T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P', `T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'. (T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P, T1_FIELD_FIXED_1000_P): Removed. (T1_FIELD_TYPE_BOOL): Renamed to... (T1_FIELD_BOOL): New macro. Updated all callers. * src/type42/t42parse.c: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness', `paint_type', `stroke_width' are reverted to be normal values. (T42_KEYWORD_COUNT): New macro. (t42_parse_dict): New array `keyword_flags' to mark that a value has already been assigned to a dictionary entry. * src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated. * src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness' are reverted to be normal values. * src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated. * src/psaux/psobjs.c (ps_parser_load_field): Updated. * src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness', `paint_type', `stroke_width' are reverted to be normal values. * src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated. * src/type1/t1load.c (T1_FIELD_COUNT): New macro. (parse_dict): Add parameter for keyword flags. Record only first instance of a field. (T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
T1_FIELD_STRING( "version", version )
T1_FIELD_STRING( "Notice", notice )
T1_FIELD_STRING( "FullName", full_name )
T1_FIELD_STRING( "FamilyName", family_name )
T1_FIELD_STRING( "Weight", weight )
Avoid overwriting of numeric font dictionary entries for synthetic fonts. Additionally, some entries were handled as `integer' instead of `number'. * include/freetype/internal/psaux.h (T1_FieldType): Add T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and T1_FIELD_TYPE_FIXED_P. (T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros. * src/psaux/psobjs.c (ps_parser_load_field): Handle new field types. * include/freetype/internal/cfftypes.h (CFF_FontRecDict), src/cff/cfftoken.h: Change type of underline_position and underline_thickness to FT_Fixed. * src/cff/cffload.c (cff_subfont_load): Fix default values of underline_position and underline_thickness. * src/cff/cffobjs.c (cff_face_init): Set underline_position and underline_thickness in `root'. * include/freetype/internal/t1types.h (T1_Font): Change point_type and stroke_width to pointers. * include/freetype/t1tables.h (PS_FontInfo): Change italic_angle, is_fixed_pitch, underline_position, and underline_thickness to pointers. * src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch, underline_position, and underline_thickness to pointers. Change the type of the latter two to `fixed'. Change type of stroke_width to `fixed' and make it a pointer. Change paint_type to pointer. * src/type1/t1objs.c (T1_Face_Done): Updated. (T1_Face_Init): Updated. Fix assignment of underline_position and underline_thickness. * src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch, underline_position, and underline_thickness to pointers. Change the type of the latter two to `fixed'. Change type of stroke_width to `fixed'. * src/cid/cidobjs.c (cid_face_done): Updated. (cid_face_init): Updated. Fix assignment of underline_position and underline_thickness. * src/type42/t42parse.c: Change italic_angle, is_fixed_pitch, underline_position, and underline_thickness to pointers. Change the type of the latter two to `fixed'. Change type of stroke_width to `fixed' and make it a pointer. Change paint_type to pointer. * src/type42/t42objs.c (T42_Face_Init): Updated. Fix assignment of underline_position and underline_thickness. (T42_Face_Done): Updated. * src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning. * src/pshinter/pshglob.c, src/pshinter/pshglob.h (psh_globals_set_scale): Make it a local function. * test/gview.c: Fix remaming ps3->ps typo. Formatting.
2003-05-30 11:12:50 +02:00
/* we use pointers to detect modifications made by synthetic fonts */
T1_FIELD_NUM ( "ItalicAngle", italic_angle )
Make reference valid HTML 4.01 transitional. * src/tools/docmaker/tohtml.py (html_header_1): Add doctype and charset. (html_header_2): Fix style elements and add some more. Fix syntax. (block_header, block_footer, description_header, description_footer, marker_header, marker_footer, source_header, source_footer, chapter_header, chapter_footer): Don't use <center>...</center> but `align=center' table attribute. Use double quotes around table widths given in percent. (keyword_prefix, keyword_suffix): Don't change font colour directly but use a new <span> class. (section_synopsis_header, section_synopsis_footer): Don't change colour. (print_html_field): <tr> gets the `valign' attribute, not <table>. (print_html_field_list): Ditto. (index_exit): Don't use <center>...</center> but `align=center' table attribute. (toc_exit, section_enter): Ditto. (block_enter): Use <h4><a>, not <a><h4>. This change reimplements fix from 2003-05-30 without breaking binary compatibility. * include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness' are reverted to be normal values. * include/freetype/internal/psaux.h (T1_FieldType): Remove `T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P', `T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'. (T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P, T1_FIELD_FIXED_1000_P): Removed. (T1_FIELD_TYPE_BOOL): Renamed to... (T1_FIELD_BOOL): New macro. Updated all callers. * src/type42/t42parse.c: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness', `paint_type', `stroke_width' are reverted to be normal values. (T42_KEYWORD_COUNT): New macro. (t42_parse_dict): New array `keyword_flags' to mark that a value has already been assigned to a dictionary entry. * src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated. * src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness' are reverted to be normal values. * src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated. * src/psaux/psobjs.c (ps_parser_load_field): Updated. * src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness', `paint_type', `stroke_width' are reverted to be normal values. * src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated. * src/type1/t1load.c (T1_FIELD_COUNT): New macro. (parse_dict): Add parameter for keyword flags. Record only first instance of a field. (T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
T1_FIELD_BOOL ( "isFixedPitch", is_fixed_pitch )
T1_FIELD_NUM ( "UnderlinePosition", underline_position )
T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
#undef FT_STRUCTURE
#define FT_STRUCTURE PS_PrivateRec
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_PRIVATE
T1_FIELD_NUM ( "UniqueID", unique_id )
T1_FIELD_NUM ( "lenIV", lenIV )
T1_FIELD_NUM ( "LanguageGroup", language_group )
T1_FIELD_NUM ( "password", password )
T1_FIELD_FIXED_1000( "BlueScale", blue_scale )
T1_FIELD_NUM ( "BlueShift", blue_shift )
T1_FIELD_NUM ( "BlueFuzz", blue_fuzz )
T1_FIELD_NUM_TABLE ( "BlueValues", blue_values, 14 )
T1_FIELD_NUM_TABLE ( "OtherBlues", other_blues, 10 )
T1_FIELD_NUM_TABLE ( "FamilyBlues", family_blues, 14 )
T1_FIELD_NUM_TABLE ( "FamilyOtherBlues", family_other_blues, 10 )
T1_FIELD_NUM_TABLE2( "StdHW", standard_width, 1 )
T1_FIELD_NUM_TABLE2( "StdVW", standard_height, 1 )
T1_FIELD_NUM_TABLE2( "MinFeature", min_feature, 2 )
T1_FIELD_NUM_TABLE ( "StemSnapH", snap_widths, 12 )
T1_FIELD_NUM_TABLE ( "StemSnapV", snap_heights, 12 )
T1_FIELD_FIXED ( "ExpansionFactor", expansion_factor )
#undef FT_STRUCTURE
#define FT_STRUCTURE T1_FontRec
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_FONT_DICT
Make reference valid HTML 4.01 transitional. * src/tools/docmaker/tohtml.py (html_header_1): Add doctype and charset. (html_header_2): Fix style elements and add some more. Fix syntax. (block_header, block_footer, description_header, description_footer, marker_header, marker_footer, source_header, source_footer, chapter_header, chapter_footer): Don't use <center>...</center> but `align=center' table attribute. Use double quotes around table widths given in percent. (keyword_prefix, keyword_suffix): Don't change font colour directly but use a new <span> class. (section_synopsis_header, section_synopsis_footer): Don't change colour. (print_html_field): <tr> gets the `valign' attribute, not <table>. (print_html_field_list): Ditto. (index_exit): Don't use <center>...</center> but `align=center' table attribute. (toc_exit, section_enter): Ditto. (block_enter): Use <h4><a>, not <a><h4>. This change reimplements fix from 2003-05-30 without breaking binary compatibility. * include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness' are reverted to be normal values. * include/freetype/internal/psaux.h (T1_FieldType): Remove `T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P', `T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'. (T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P, T1_FIELD_FIXED_1000_P): Removed. (T1_FIELD_TYPE_BOOL): Renamed to... (T1_FIELD_BOOL): New macro. Updated all callers. * src/type42/t42parse.c: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness', `paint_type', `stroke_width' are reverted to be normal values. (T42_KEYWORD_COUNT): New macro. (t42_parse_dict): New array `keyword_flags' to mark that a value has already been assigned to a dictionary entry. * src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated. * src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness' are reverted to be normal values. * src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated. * src/psaux/psobjs.c (ps_parser_load_field): Updated. * src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness', `paint_type', `stroke_width' are reverted to be normal values. * src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated. * src/type1/t1load.c (T1_FIELD_COUNT): New macro. (parse_dict): Add parameter for keyword flags. Record only first instance of a field. (T1_Open_Face): New array `keyword_flags'.
2003-07-26 00:09:53 +02:00
T1_FIELD_KEY ( "FontName", font_name )
T1_FIELD_NUM ( "PaintType", paint_type )
T1_FIELD_NUM ( "FontType", font_type )
T1_FIELD_FIXED( "StrokeWidth", stroke_width )
* freetype2/include/freetype/internal/psaux.h: New macros IS_PS_NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and IS_PS_BASE85 (from freetype2/src/psaux/psconv.h). (T1_FieldLocation): Add T1_FIELD_LOCATION_LOADER, T1_FIELD_LOCATION_FACE, and T1_FIELD_LOCATION_BLEND. (T1_DecoderRec): New fields `buildchar' and `face'. (IS_PS_TOKEN): New macro. * freetype2/include/freetype/internal/t1types.h (T1_FaceRec): New fields `ndv_idx', `cdv_idx', and `len_buildchar'. * freetype2/include/freetype/t1tables.h (PS_BlendRec): New fields `default_design_vector' and `num_default_design_vector'. * freetype2/src/psaux/psconv.h: Move macros IS_PS_NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and IS_PS_BASE85 to freetype2/include/freetype/internal/psaux.h. * freetype2/src/psaux/psobjs.c (ps_parser_to_token_array): Allow `token' argument to be NULL if we want only to count the number of tokens. (ps_tocoordarray): Allow `coords' argument to be NULL if we just want to skip the array. (ps_tofixedarray): Allow `values' argument to be NULL if we just want to skip the array. * freetype2/src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add support for (partially commented out) othersubrs 19-25, 27, and 28. (t1_decoder_init): Initialize new fields `face' and `buildchar'. (t1_decoder_done): Release new field `buildchar'. * freetype2/src/type1/t1load.c (parse_buildchar, parse_private): New functions. (t1_keywords): Register them. (t1_allocate_blend): Updated. (t1_load_keyword): Handle field types T1_FIELD_LOCATION_LOADER, T1_FIELD_LOCATION_FACE and T1_FIELD_LOCATION_BLEND. (parse_dict): Remove `keyword_flags' argument. Use new macro IS_PS_TOKEN. Changed function so that later PostScript definitions override earlier ones. (t1_init_loader): Initialize new field `keywords_encountered'. (T1_Open_Face): Initialize new fields `ndv_idx', `cdv_idx', and `len_buildchar'. Remove `keywords_flags'. * freetype2/src/type1/t1load.h (T1_LoaderRect): New field `keywords_encountered'. (T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros. * freetype2/src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: New entries for parsing /NDV, /CDV, and /DesignVector.
2006-07-14 20:28:08 +02:00
#undef FT_STRUCTURE
#define FT_STRUCTURE FT_BBox
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_BBOX
T1_FIELD_BBOX("FontBBox", xMin )
* freetype2/include/freetype/internal/psaux.h: New macros IS_PS_NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and IS_PS_BASE85 (from freetype2/src/psaux/psconv.h). (T1_FieldLocation): Add T1_FIELD_LOCATION_LOADER, T1_FIELD_LOCATION_FACE, and T1_FIELD_LOCATION_BLEND. (T1_DecoderRec): New fields `buildchar' and `face'. (IS_PS_TOKEN): New macro. * freetype2/include/freetype/internal/t1types.h (T1_FaceRec): New fields `ndv_idx', `cdv_idx', and `len_buildchar'. * freetype2/include/freetype/t1tables.h (PS_BlendRec): New fields `default_design_vector' and `num_default_design_vector'. * freetype2/src/psaux/psconv.h: Move macros IS_PS_NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and IS_PS_BASE85 to freetype2/include/freetype/internal/psaux.h. * freetype2/src/psaux/psobjs.c (ps_parser_to_token_array): Allow `token' argument to be NULL if we want only to count the number of tokens. (ps_tocoordarray): Allow `coords' argument to be NULL if we just want to skip the array. (ps_tofixedarray): Allow `values' argument to be NULL if we just want to skip the array. * freetype2/src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add support for (partially commented out) othersubrs 19-25, 27, and 28. (t1_decoder_init): Initialize new fields `face' and `buildchar'. (t1_decoder_done): Release new field `buildchar'. * freetype2/src/type1/t1load.c (parse_buildchar, parse_private): New functions. (t1_keywords): Register them. (t1_allocate_blend): Updated. (t1_load_keyword): Handle field types T1_FIELD_LOCATION_LOADER, T1_FIELD_LOCATION_FACE and T1_FIELD_LOCATION_BLEND. (parse_dict): Remove `keyword_flags' argument. Use new macro IS_PS_TOKEN. Changed function so that later PostScript definitions override earlier ones. (t1_init_loader): Initialize new field `keywords_encountered'. (T1_Open_Face): Initialize new fields `ndv_idx', `cdv_idx', and `len_buildchar'. Remove `keywords_flags'. * freetype2/src/type1/t1load.h (T1_LoaderRect): New field `keywords_encountered'. (T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros. * freetype2/src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: New entries for parsing /NDV, /CDV, and /DesignVector.
2006-07-14 20:28:08 +02:00
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
#undef FT_STRUCTURE
#define FT_STRUCTURE T1_FaceRec
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_FACE
T1_FIELD_NUM ( "NDV", ndv_idx )
T1_FIELD_NUM ( "CDV", cdv_idx )
#undef FT_STRUCTURE
#define FT_STRUCTURE PS_BlendRec
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_BLEND
T1_FIELD_NUM_TABLE( "DesignVector", default_design_vector, T1_MAX_MM_DESIGNS )
#endif /* T1_CONFIG_OPTION_NO_MM_SUPPORT */
/* END */