1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/modules/freetype2/include/t1tables.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,662 @@ 1.4 +/***************************************************************************/ 1.5 +/* */ 1.6 +/* t1tables.h */ 1.7 +/* */ 1.8 +/* Basic Type 1/Type 2 tables definitions and interface (specification */ 1.9 +/* only). */ 1.10 +/* */ 1.11 +/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */ 1.12 +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ 1.13 +/* */ 1.14 +/* This file is part of the FreeType project, and may only be used, */ 1.15 +/* modified, and distributed under the terms of the FreeType project */ 1.16 +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 1.17 +/* this file you indicate that you have read the license and */ 1.18 +/* understand and accept it fully. */ 1.19 +/* */ 1.20 +/***************************************************************************/ 1.21 + 1.22 + 1.23 +#ifndef __T1TABLES_H__ 1.24 +#define __T1TABLES_H__ 1.25 + 1.26 + 1.27 +#include <ft2build.h> 1.28 +#include FT_FREETYPE_H 1.29 + 1.30 +#ifdef FREETYPE_H 1.31 +#error "freetype.h of FreeType 1 has been loaded!" 1.32 +#error "Please fix the directory search order for header files" 1.33 +#error "so that freetype.h of FreeType 2 is found first." 1.34 +#endif 1.35 + 1.36 + 1.37 +FT_BEGIN_HEADER 1.38 + 1.39 + 1.40 + /*************************************************************************/ 1.41 + /* */ 1.42 + /* <Section> */ 1.43 + /* type1_tables */ 1.44 + /* */ 1.45 + /* <Title> */ 1.46 + /* Type 1 Tables */ 1.47 + /* */ 1.48 + /* <Abstract> */ 1.49 + /* Type~1 (PostScript) specific font tables. */ 1.50 + /* */ 1.51 + /* <Description> */ 1.52 + /* This section contains the definition of Type 1-specific tables, */ 1.53 + /* including structures related to other PostScript font formats. */ 1.54 + /* */ 1.55 + /*************************************************************************/ 1.56 + 1.57 + 1.58 + /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */ 1.59 + /* structures in order to support Multiple Master fonts. */ 1.60 + 1.61 + 1.62 + /*************************************************************************/ 1.63 + /* */ 1.64 + /* <Struct> */ 1.65 + /* PS_FontInfoRec */ 1.66 + /* */ 1.67 + /* <Description> */ 1.68 + /* A structure used to model a Type~1 or Type~2 FontInfo dictionary. */ 1.69 + /* Note that for Multiple Master fonts, each instance has its own */ 1.70 + /* FontInfo dictionary. */ 1.71 + /* */ 1.72 + typedef struct PS_FontInfoRec_ 1.73 + { 1.74 + FT_String* version; 1.75 + FT_String* notice; 1.76 + FT_String* full_name; 1.77 + FT_String* family_name; 1.78 + FT_String* weight; 1.79 + FT_Long italic_angle; 1.80 + FT_Bool is_fixed_pitch; 1.81 + FT_Short underline_position; 1.82 + FT_UShort underline_thickness; 1.83 + 1.84 + } PS_FontInfoRec; 1.85 + 1.86 + 1.87 + /*************************************************************************/ 1.88 + /* */ 1.89 + /* <Struct> */ 1.90 + /* PS_FontInfo */ 1.91 + /* */ 1.92 + /* <Description> */ 1.93 + /* A handle to a @PS_FontInfoRec structure. */ 1.94 + /* */ 1.95 + typedef struct PS_FontInfoRec_* PS_FontInfo; 1.96 + 1.97 + 1.98 + /*************************************************************************/ 1.99 + /* */ 1.100 + /* <Struct> */ 1.101 + /* T1_FontInfo */ 1.102 + /* */ 1.103 + /* <Description> */ 1.104 + /* This type is equivalent to @PS_FontInfoRec. It is deprecated but */ 1.105 + /* kept to maintain source compatibility between various versions of */ 1.106 + /* FreeType. */ 1.107 + /* */ 1.108 + typedef PS_FontInfoRec T1_FontInfo; 1.109 + 1.110 + 1.111 + /*************************************************************************/ 1.112 + /* */ 1.113 + /* <Struct> */ 1.114 + /* PS_PrivateRec */ 1.115 + /* */ 1.116 + /* <Description> */ 1.117 + /* A structure used to model a Type~1 or Type~2 private dictionary. */ 1.118 + /* Note that for Multiple Master fonts, each instance has its own */ 1.119 + /* Private dictionary. */ 1.120 + /* */ 1.121 + typedef struct PS_PrivateRec_ 1.122 + { 1.123 + FT_Int unique_id; 1.124 + FT_Int lenIV; 1.125 + 1.126 + FT_Byte num_blue_values; 1.127 + FT_Byte num_other_blues; 1.128 + FT_Byte num_family_blues; 1.129 + FT_Byte num_family_other_blues; 1.130 + 1.131 + FT_Short blue_values[14]; 1.132 + FT_Short other_blues[10]; 1.133 + 1.134 + FT_Short family_blues [14]; 1.135 + FT_Short family_other_blues[10]; 1.136 + 1.137 + FT_Fixed blue_scale; 1.138 + FT_Int blue_shift; 1.139 + FT_Int blue_fuzz; 1.140 + 1.141 + FT_UShort standard_width[1]; 1.142 + FT_UShort standard_height[1]; 1.143 + 1.144 + FT_Byte num_snap_widths; 1.145 + FT_Byte num_snap_heights; 1.146 + FT_Bool force_bold; 1.147 + FT_Bool round_stem_up; 1.148 + 1.149 + FT_Short snap_widths [13]; /* including std width */ 1.150 + FT_Short snap_heights[13]; /* including std height */ 1.151 + 1.152 + FT_Fixed expansion_factor; 1.153 + 1.154 + FT_Long language_group; 1.155 + FT_Long password; 1.156 + 1.157 + FT_Short min_feature[2]; 1.158 + 1.159 + } PS_PrivateRec; 1.160 + 1.161 + 1.162 + /*************************************************************************/ 1.163 + /* */ 1.164 + /* <Struct> */ 1.165 + /* PS_Private */ 1.166 + /* */ 1.167 + /* <Description> */ 1.168 + /* A handle to a @PS_PrivateRec structure. */ 1.169 + /* */ 1.170 + typedef struct PS_PrivateRec_* PS_Private; 1.171 + 1.172 + 1.173 + /*************************************************************************/ 1.174 + /* */ 1.175 + /* <Struct> */ 1.176 + /* T1_Private */ 1.177 + /* */ 1.178 + /* <Description> */ 1.179 + /* This type is equivalent to @PS_PrivateRec. It is deprecated but */ 1.180 + /* kept to maintain source compatibility between various versions of */ 1.181 + /* FreeType. */ 1.182 + /* */ 1.183 + typedef PS_PrivateRec T1_Private; 1.184 + 1.185 + 1.186 + /*************************************************************************/ 1.187 + /* */ 1.188 + /* <Enum> */ 1.189 + /* T1_Blend_Flags */ 1.190 + /* */ 1.191 + /* <Description> */ 1.192 + /* A set of flags used to indicate which fields are present in a */ 1.193 + /* given blend dictionary (font info or private). Used to support */ 1.194 + /* Multiple Masters fonts. */ 1.195 + /* */ 1.196 + typedef enum T1_Blend_Flags_ 1.197 + { 1.198 + /*# required fields in a FontInfo blend dictionary */ 1.199 + T1_BLEND_UNDERLINE_POSITION = 0, 1.200 + T1_BLEND_UNDERLINE_THICKNESS, 1.201 + T1_BLEND_ITALIC_ANGLE, 1.202 + 1.203 + /*# required fields in a Private blend dictionary */ 1.204 + T1_BLEND_BLUE_VALUES, 1.205 + T1_BLEND_OTHER_BLUES, 1.206 + T1_BLEND_STANDARD_WIDTH, 1.207 + T1_BLEND_STANDARD_HEIGHT, 1.208 + T1_BLEND_STEM_SNAP_WIDTHS, 1.209 + T1_BLEND_STEM_SNAP_HEIGHTS, 1.210 + T1_BLEND_BLUE_SCALE, 1.211 + T1_BLEND_BLUE_SHIFT, 1.212 + T1_BLEND_FAMILY_BLUES, 1.213 + T1_BLEND_FAMILY_OTHER_BLUES, 1.214 + T1_BLEND_FORCE_BOLD, 1.215 + 1.216 + /*# never remove */ 1.217 + T1_BLEND_MAX 1.218 + 1.219 + } T1_Blend_Flags; 1.220 + 1.221 + /* */ 1.222 + 1.223 + 1.224 + /*# backwards compatible definitions */ 1.225 +#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION 1.226 +#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS 1.227 +#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE 1.228 +#define t1_blend_blue_values T1_BLEND_BLUE_VALUES 1.229 +#define t1_blend_other_blues T1_BLEND_OTHER_BLUES 1.230 +#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH 1.231 +#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT 1.232 +#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS 1.233 +#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS 1.234 +#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE 1.235 +#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT 1.236 +#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES 1.237 +#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES 1.238 +#define t1_blend_force_bold T1_BLEND_FORCE_BOLD 1.239 +#define t1_blend_max T1_BLEND_MAX 1.240 + 1.241 + 1.242 + /* maximum number of Multiple Masters designs, as defined in the spec */ 1.243 +#define T1_MAX_MM_DESIGNS 16 1.244 + 1.245 + /* maximum number of Multiple Masters axes, as defined in the spec */ 1.246 +#define T1_MAX_MM_AXIS 4 1.247 + 1.248 + /* maximum number of elements in a design map */ 1.249 +#define T1_MAX_MM_MAP_POINTS 20 1.250 + 1.251 + 1.252 + /* this structure is used to store the BlendDesignMap entry for an axis */ 1.253 + typedef struct PS_DesignMap_ 1.254 + { 1.255 + FT_Byte num_points; 1.256 + FT_Long* design_points; 1.257 + FT_Fixed* blend_points; 1.258 + 1.259 + } PS_DesignMapRec, *PS_DesignMap; 1.260 + 1.261 + /* backwards-compatible definition */ 1.262 + typedef PS_DesignMapRec T1_DesignMap; 1.263 + 1.264 + 1.265 + typedef struct PS_BlendRec_ 1.266 + { 1.267 + FT_UInt num_designs; 1.268 + FT_UInt num_axis; 1.269 + 1.270 + FT_String* axis_names[T1_MAX_MM_AXIS]; 1.271 + FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; 1.272 + PS_DesignMapRec design_map[T1_MAX_MM_AXIS]; 1.273 + 1.274 + FT_Fixed* weight_vector; 1.275 + FT_Fixed* default_weight_vector; 1.276 + 1.277 + PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1]; 1.278 + PS_Private privates [T1_MAX_MM_DESIGNS + 1]; 1.279 + 1.280 + FT_ULong blend_bitflags; 1.281 + 1.282 + FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1]; 1.283 + 1.284 + /* since 2.3.0 */ 1.285 + 1.286 + /* undocumented, optional: the default design instance; */ 1.287 + /* corresponds to default_weight_vector -- */ 1.288 + /* num_default_design_vector == 0 means it is not present */ 1.289 + /* in the font and associated metrics files */ 1.290 + FT_UInt default_design_vector[T1_MAX_MM_DESIGNS]; 1.291 + FT_UInt num_default_design_vector; 1.292 + 1.293 + } PS_BlendRec, *PS_Blend; 1.294 + 1.295 + 1.296 + /* backwards-compatible definition */ 1.297 + typedef PS_BlendRec T1_Blend; 1.298 + 1.299 + 1.300 + /*************************************************************************/ 1.301 + /* */ 1.302 + /* <Struct> */ 1.303 + /* CID_FaceDictRec */ 1.304 + /* */ 1.305 + /* <Description> */ 1.306 + /* A structure used to represent data in a CID top-level dictionary. */ 1.307 + /* */ 1.308 + typedef struct CID_FaceDictRec_ 1.309 + { 1.310 + PS_PrivateRec private_dict; 1.311 + 1.312 + FT_UInt len_buildchar; 1.313 + FT_Fixed forcebold_threshold; 1.314 + FT_Pos stroke_width; 1.315 + FT_Fixed expansion_factor; 1.316 + 1.317 + FT_Byte paint_type; 1.318 + FT_Byte font_type; 1.319 + FT_Matrix font_matrix; 1.320 + FT_Vector font_offset; 1.321 + 1.322 + FT_UInt num_subrs; 1.323 + FT_ULong subrmap_offset; 1.324 + FT_Int sd_bytes; 1.325 + 1.326 + } CID_FaceDictRec; 1.327 + 1.328 + 1.329 + /*************************************************************************/ 1.330 + /* */ 1.331 + /* <Struct> */ 1.332 + /* CID_FaceDict */ 1.333 + /* */ 1.334 + /* <Description> */ 1.335 + /* A handle to a @CID_FaceDictRec structure. */ 1.336 + /* */ 1.337 + typedef struct CID_FaceDictRec_* CID_FaceDict; 1.338 + 1.339 + /* */ 1.340 + 1.341 + 1.342 + /* backwards-compatible definition */ 1.343 + typedef CID_FaceDictRec CID_FontDict; 1.344 + 1.345 + 1.346 + /*************************************************************************/ 1.347 + /* */ 1.348 + /* <Struct> */ 1.349 + /* CID_FaceInfoRec */ 1.350 + /* */ 1.351 + /* <Description> */ 1.352 + /* A structure used to represent CID Face information. */ 1.353 + /* */ 1.354 + typedef struct CID_FaceInfoRec_ 1.355 + { 1.356 + FT_String* cid_font_name; 1.357 + FT_Fixed cid_version; 1.358 + FT_Int cid_font_type; 1.359 + 1.360 + FT_String* registry; 1.361 + FT_String* ordering; 1.362 + FT_Int supplement; 1.363 + 1.364 + PS_FontInfoRec font_info; 1.365 + FT_BBox font_bbox; 1.366 + FT_ULong uid_base; 1.367 + 1.368 + FT_Int num_xuid; 1.369 + FT_ULong xuid[16]; 1.370 + 1.371 + FT_ULong cidmap_offset; 1.372 + FT_Int fd_bytes; 1.373 + FT_Int gd_bytes; 1.374 + FT_ULong cid_count; 1.375 + 1.376 + FT_Int num_dicts; 1.377 + CID_FaceDict font_dicts; 1.378 + 1.379 + FT_ULong data_offset; 1.380 + 1.381 + } CID_FaceInfoRec; 1.382 + 1.383 + 1.384 + /*************************************************************************/ 1.385 + /* */ 1.386 + /* <Struct> */ 1.387 + /* CID_FaceInfo */ 1.388 + /* */ 1.389 + /* <Description> */ 1.390 + /* A handle to a @CID_FaceInfoRec structure. */ 1.391 + /* */ 1.392 + typedef struct CID_FaceInfoRec_* CID_FaceInfo; 1.393 + 1.394 + 1.395 + /*************************************************************************/ 1.396 + /* */ 1.397 + /* <Struct> */ 1.398 + /* CID_Info */ 1.399 + /* */ 1.400 + /* <Description> */ 1.401 + /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */ 1.402 + /* kept to maintain source compatibility between various versions of */ 1.403 + /* FreeType. */ 1.404 + /* */ 1.405 + typedef CID_FaceInfoRec CID_Info; 1.406 + 1.407 + 1.408 + /************************************************************************ 1.409 + * 1.410 + * @function: 1.411 + * FT_Has_PS_Glyph_Names 1.412 + * 1.413 + * @description: 1.414 + * Return true if a given face provides reliable PostScript glyph 1.415 + * names. This is similar to using the @FT_HAS_GLYPH_NAMES macro, 1.416 + * except that certain fonts (mostly TrueType) contain incorrect 1.417 + * glyph name tables. 1.418 + * 1.419 + * When this function returns true, the caller is sure that the glyph 1.420 + * names returned by @FT_Get_Glyph_Name are reliable. 1.421 + * 1.422 + * @input: 1.423 + * face :: 1.424 + * face handle 1.425 + * 1.426 + * @return: 1.427 + * Boolean. True if glyph names are reliable. 1.428 + * 1.429 + */ 1.430 + FT_EXPORT( FT_Int ) 1.431 + FT_Has_PS_Glyph_Names( FT_Face face ); 1.432 + 1.433 + 1.434 + /************************************************************************ 1.435 + * 1.436 + * @function: 1.437 + * FT_Get_PS_Font_Info 1.438 + * 1.439 + * @description: 1.440 + * Retrieve the @PS_FontInfoRec structure corresponding to a given 1.441 + * PostScript font. 1.442 + * 1.443 + * @input: 1.444 + * face :: 1.445 + * PostScript face handle. 1.446 + * 1.447 + * @output: 1.448 + * afont_info :: 1.449 + * Output font info structure pointer. 1.450 + * 1.451 + * @return: 1.452 + * FreeType error code. 0~means success. 1.453 + * 1.454 + * @note: 1.455 + * The string pointers within the font info structure are owned by 1.456 + * the face and don't need to be freed by the caller. 1.457 + * 1.458 + * If the font's format is not PostScript-based, this function will 1.459 + * return the `FT_Err_Invalid_Argument' error code. 1.460 + * 1.461 + */ 1.462 + FT_EXPORT( FT_Error ) 1.463 + FT_Get_PS_Font_Info( FT_Face face, 1.464 + PS_FontInfo afont_info ); 1.465 + 1.466 + 1.467 + /************************************************************************ 1.468 + * 1.469 + * @function: 1.470 + * FT_Get_PS_Font_Private 1.471 + * 1.472 + * @description: 1.473 + * Retrieve the @PS_PrivateRec structure corresponding to a given 1.474 + * PostScript font. 1.475 + * 1.476 + * @input: 1.477 + * face :: 1.478 + * PostScript face handle. 1.479 + * 1.480 + * @output: 1.481 + * afont_private :: 1.482 + * Output private dictionary structure pointer. 1.483 + * 1.484 + * @return: 1.485 + * FreeType error code. 0~means success. 1.486 + * 1.487 + * @note: 1.488 + * The string pointers within the @PS_PrivateRec structure are owned by 1.489 + * the face and don't need to be freed by the caller. 1.490 + * 1.491 + * If the font's format is not PostScript-based, this function returns 1.492 + * the `FT_Err_Invalid_Argument' error code. 1.493 + * 1.494 + */ 1.495 + FT_EXPORT( FT_Error ) 1.496 + FT_Get_PS_Font_Private( FT_Face face, 1.497 + PS_Private afont_private ); 1.498 + 1.499 + 1.500 + /*************************************************************************/ 1.501 + /* */ 1.502 + /* <Enum> */ 1.503 + /* T1_EncodingType */ 1.504 + /* */ 1.505 + /* <Description> */ 1.506 + /* An enumeration describing the `Encoding' entry in a Type 1 */ 1.507 + /* dictionary. */ 1.508 + /* */ 1.509 + typedef enum T1_EncodingType_ 1.510 + { 1.511 + T1_ENCODING_TYPE_NONE = 0, 1.512 + T1_ENCODING_TYPE_ARRAY, 1.513 + T1_ENCODING_TYPE_STANDARD, 1.514 + T1_ENCODING_TYPE_ISOLATIN1, 1.515 + T1_ENCODING_TYPE_EXPERT 1.516 + 1.517 + } T1_EncodingType; 1.518 + 1.519 + 1.520 + /*************************************************************************/ 1.521 + /* */ 1.522 + /* <Enum> */ 1.523 + /* PS_Dict_Keys */ 1.524 + /* */ 1.525 + /* <Description> */ 1.526 + /* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */ 1.527 + /* the Type~1 dictionary entry to retrieve. */ 1.528 + /* */ 1.529 + typedef enum PS_Dict_Keys_ 1.530 + { 1.531 + /* conventionally in the font dictionary */ 1.532 + PS_DICT_FONT_TYPE, /* FT_Byte */ 1.533 + PS_DICT_FONT_MATRIX, /* FT_Fixed */ 1.534 + PS_DICT_FONT_BBOX, /* FT_Fixed */ 1.535 + PS_DICT_PAINT_TYPE, /* FT_Byte */ 1.536 + PS_DICT_FONT_NAME, /* FT_String* */ 1.537 + PS_DICT_UNIQUE_ID, /* FT_Int */ 1.538 + PS_DICT_NUM_CHAR_STRINGS, /* FT_Int */ 1.539 + PS_DICT_CHAR_STRING_KEY, /* FT_String* */ 1.540 + PS_DICT_CHAR_STRING, /* FT_String* */ 1.541 + PS_DICT_ENCODING_TYPE, /* T1_EncodingType */ 1.542 + PS_DICT_ENCODING_ENTRY, /* FT_String* */ 1.543 + 1.544 + /* conventionally in the font Private dictionary */ 1.545 + PS_DICT_NUM_SUBRS, /* FT_Int */ 1.546 + PS_DICT_SUBR, /* FT_String* */ 1.547 + PS_DICT_STD_HW, /* FT_UShort */ 1.548 + PS_DICT_STD_VW, /* FT_UShort */ 1.549 + PS_DICT_NUM_BLUE_VALUES, /* FT_Byte */ 1.550 + PS_DICT_BLUE_VALUE, /* FT_Short */ 1.551 + PS_DICT_BLUE_FUZZ, /* FT_Int */ 1.552 + PS_DICT_NUM_OTHER_BLUES, /* FT_Byte */ 1.553 + PS_DICT_OTHER_BLUE, /* FT_Short */ 1.554 + PS_DICT_NUM_FAMILY_BLUES, /* FT_Byte */ 1.555 + PS_DICT_FAMILY_BLUE, /* FT_Short */ 1.556 + PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte */ 1.557 + PS_DICT_FAMILY_OTHER_BLUE, /* FT_Short */ 1.558 + PS_DICT_BLUE_SCALE, /* FT_Fixed */ 1.559 + PS_DICT_BLUE_SHIFT, /* FT_Int */ 1.560 + PS_DICT_NUM_STEM_SNAP_H, /* FT_Byte */ 1.561 + PS_DICT_STEM_SNAP_H, /* FT_Short */ 1.562 + PS_DICT_NUM_STEM_SNAP_V, /* FT_Byte */ 1.563 + PS_DICT_STEM_SNAP_V, /* FT_Short */ 1.564 + PS_DICT_FORCE_BOLD, /* FT_Bool */ 1.565 + PS_DICT_RND_STEM_UP, /* FT_Bool */ 1.566 + PS_DICT_MIN_FEATURE, /* FT_Short */ 1.567 + PS_DICT_LEN_IV, /* FT_Int */ 1.568 + PS_DICT_PASSWORD, /* FT_Long */ 1.569 + PS_DICT_LANGUAGE_GROUP, /* FT_Long */ 1.570 + 1.571 + /* conventionally in the font FontInfo dictionary */ 1.572 + PS_DICT_VERSION, /* FT_String* */ 1.573 + PS_DICT_NOTICE, /* FT_String* */ 1.574 + PS_DICT_FULL_NAME, /* FT_String* */ 1.575 + PS_DICT_FAMILY_NAME, /* FT_String* */ 1.576 + PS_DICT_WEIGHT, /* FT_String* */ 1.577 + PS_DICT_IS_FIXED_PITCH, /* FT_Bool */ 1.578 + PS_DICT_UNDERLINE_POSITION, /* FT_Short */ 1.579 + PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */ 1.580 + PS_DICT_FS_TYPE, /* FT_UShort */ 1.581 + PS_DICT_ITALIC_ANGLE, /* FT_Long */ 1.582 + 1.583 + PS_DICT_MAX = PS_DICT_ITALIC_ANGLE 1.584 + 1.585 + } PS_Dict_Keys; 1.586 + 1.587 + 1.588 + /************************************************************************ 1.589 + * 1.590 + * @function: 1.591 + * FT_Get_PS_Font_Value 1.592 + * 1.593 + * @description: 1.594 + * Retrieve the value for the supplied key from a PostScript font. 1.595 + * 1.596 + * @input: 1.597 + * face :: 1.598 + * PostScript face handle. 1.599 + * 1.600 + * key :: 1.601 + * An enumeration value representing the dictionary key to retrieve. 1.602 + * 1.603 + * idx :: 1.604 + * For array values, this specifies the index to be returned. 1.605 + * 1.606 + * value :: 1.607 + * A pointer to memory into which to write the value. 1.608 + * 1.609 + * valen_len :: 1.610 + * The size, in bytes, of the memory supplied for the value. 1.611 + * 1.612 + * @output: 1.613 + * value :: 1.614 + * The value matching the above key, if it exists. 1.615 + * 1.616 + * @return: 1.617 + * The amount of memory (in bytes) required to hold the requested 1.618 + * value (if it exists, -1 otherwise). 1.619 + * 1.620 + * @note: 1.621 + * The values returned are not pointers into the internal structures of 1.622 + * the face, but are `fresh' copies, so that the memory containing them 1.623 + * belongs to the calling application. This also enforces the 1.624 + * `read-only' nature of these values, i.e., this function cannot be 1.625 + * used to manipulate the face. 1.626 + * 1.627 + * `value' is a void pointer because the values returned can be of 1.628 + * various types. 1.629 + * 1.630 + * If either `value' is NULL or `value_len' is too small, just the 1.631 + * required memory size for the requested entry is returned. 1.632 + * 1.633 + * The `idx' parameter is used, not only to retrieve elements of, for 1.634 + * example, the FontMatrix or FontBBox, but also to retrieve name keys 1.635 + * from the CharStrings dictionary, and the charstrings themselves. It 1.636 + * is ignored for atomic values. 1.637 + * 1.638 + * PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To 1.639 + * get the value as in the font stream, you need to divide by 1.640 + * 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale). 1.641 + * 1.642 + * IMPORTANT: Only key/value pairs read by the FreeType interpreter can 1.643 + * be retrieved. So, for example, PostScript procedures such as NP, 1.644 + * ND, and RD are not available. Arbitrary keys are, obviously, not be 1.645 + * available either. 1.646 + * 1.647 + * If the font's format is not PostScript-based, this function returns 1.648 + * the `FT_Err_Invalid_Argument' error code. 1.649 + * 1.650 + */ 1.651 + FT_EXPORT( FT_Long ) 1.652 + FT_Get_PS_Font_Value( FT_Face face, 1.653 + PS_Dict_Keys key, 1.654 + FT_UInt idx, 1.655 + void *value, 1.656 + FT_Long value_len ); 1.657 + 1.658 + /* */ 1.659 + 1.660 +FT_END_HEADER 1.661 + 1.662 +#endif /* __T1TABLES_H__ */ 1.663 + 1.664 + 1.665 +/* END */