Home | History | Annotate | Download | only in freetype
      1 /****************************************************************************
      2  *
      3  * t1tables.h
      4  *
      5  *   Basic Type 1/Type 2 tables definitions and interface (specification
      6  *   only).
      7  *
      8  * Copyright 1996-2018 by
      9  * David Turner, Robert Wilhelm, and Werner Lemberg.
     10  *
     11  * This file is part of the FreeType project, and may only be used,
     12  * modified, and distributed under the terms of the FreeType project
     13  * license, LICENSE.TXT.  By continuing to use, modify, or distribute
     14  * this file you indicate that you have read the license and
     15  * understand and accept it fully.
     16  *
     17  */
     18 
     19 
     20 #ifndef T1TABLES_H_
     21 #define T1TABLES_H_
     22 
     23 
     24 #include <ft2build.h>
     25 #include FT_FREETYPE_H
     26 
     27 #ifdef FREETYPE_H
     28 #error "freetype.h of FreeType 1 has been loaded!"
     29 #error "Please fix the directory search order for header files"
     30 #error "so that freetype.h of FreeType 2 is found first."
     31 #endif
     32 
     33 
     34 FT_BEGIN_HEADER
     35 
     36 
     37   /**************************************************************************
     38    *
     39    * @section:
     40    *   type1_tables
     41    *
     42    * @title:
     43    *   Type 1 Tables
     44    *
     45    * @abstract:
     46    *   Type~1-specific font tables.
     47    *
     48    * @description:
     49    *   This section contains the definition of Type~1-specific tables,
     50    *   including structures related to other PostScript font formats.
     51    *
     52    * @order:
     53    *   PS_FontInfoRec
     54    *   PS_FontInfo
     55    *   PS_PrivateRec
     56    *   PS_Private
     57    *
     58    *   CID_FaceDictRec
     59    *   CID_FaceDict
     60    *   CID_FaceInfoRec
     61    *   CID_FaceInfo
     62    *
     63    *   FT_Has_PS_Glyph_Names
     64    *   FT_Get_PS_Font_Info
     65    *   FT_Get_PS_Font_Private
     66    *   FT_Get_PS_Font_Value
     67    *
     68    *   T1_Blend_Flags
     69    *   T1_EncodingType
     70    *   PS_Dict_Keys
     71    *
     72    */
     73 
     74 
     75   /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */
     76   /* structures in order to support Multiple Master fonts.               */
     77 
     78 
     79   /**************************************************************************
     80    *
     81    * @struct:
     82    *   PS_FontInfoRec
     83    *
     84    * @description:
     85    *   A structure used to model a Type~1 or Type~2 FontInfo dictionary.
     86    *   Note that for Multiple Master fonts, each instance has its own
     87    *   FontInfo dictionary.
     88    */
     89   typedef struct  PS_FontInfoRec_
     90   {
     91     FT_String*  version;
     92     FT_String*  notice;
     93     FT_String*  full_name;
     94     FT_String*  family_name;
     95     FT_String*  weight;
     96     FT_Long     italic_angle;
     97     FT_Bool     is_fixed_pitch;
     98     FT_Short    underline_position;
     99     FT_UShort   underline_thickness;
    100 
    101   } PS_FontInfoRec;
    102 
    103 
    104   /**************************************************************************
    105    *
    106    * @struct:
    107    *   PS_FontInfo
    108    *
    109    * @description:
    110    *   A handle to a @PS_FontInfoRec structure.
    111    */
    112   typedef struct PS_FontInfoRec_*  PS_FontInfo;
    113 
    114 
    115   /**************************************************************************
    116    *
    117    * @struct:
    118    *   T1_FontInfo
    119    *
    120    * @description:
    121    *   This type is equivalent to @PS_FontInfoRec.  It is deprecated but
    122    *   kept to maintain source compatibility between various versions of
    123    *   FreeType.
    124    */
    125   typedef PS_FontInfoRec  T1_FontInfo;
    126 
    127 
    128   /**************************************************************************
    129    *
    130    * @struct:
    131    *   PS_PrivateRec
    132    *
    133    * @description:
    134    *   A structure used to model a Type~1 or Type~2 private dictionary.
    135    *   Note that for Multiple Master fonts, each instance has its own
    136    *   Private dictionary.
    137    */
    138   typedef struct  PS_PrivateRec_
    139   {
    140     FT_Int     unique_id;
    141     FT_Int     lenIV;
    142 
    143     FT_Byte    num_blue_values;
    144     FT_Byte    num_other_blues;
    145     FT_Byte    num_family_blues;
    146     FT_Byte    num_family_other_blues;
    147 
    148     FT_Short   blue_values[14];
    149     FT_Short   other_blues[10];
    150 
    151     FT_Short   family_blues      [14];
    152     FT_Short   family_other_blues[10];
    153 
    154     FT_Fixed   blue_scale;
    155     FT_Int     blue_shift;
    156     FT_Int     blue_fuzz;
    157 
    158     FT_UShort  standard_width[1];
    159     FT_UShort  standard_height[1];
    160 
    161     FT_Byte    num_snap_widths;
    162     FT_Byte    num_snap_heights;
    163     FT_Bool    force_bold;
    164     FT_Bool    round_stem_up;
    165 
    166     FT_Short   snap_widths [13];  /* including std width  */
    167     FT_Short   snap_heights[13];  /* including std height */
    168 
    169     FT_Fixed   expansion_factor;
    170 
    171     FT_Long    language_group;
    172     FT_Long    password;
    173 
    174     FT_Short   min_feature[2];
    175 
    176   } PS_PrivateRec;
    177 
    178 
    179   /**************************************************************************
    180    *
    181    * @struct:
    182    *   PS_Private
    183    *
    184    * @description:
    185    *   A handle to a @PS_PrivateRec structure.
    186    */
    187   typedef struct PS_PrivateRec_*  PS_Private;
    188 
    189 
    190   /**************************************************************************
    191    *
    192    * @struct:
    193    *   T1_Private
    194    *
    195    * @description:
    196    *  This type is equivalent to @PS_PrivateRec.  It is deprecated but
    197    *  kept to maintain source compatibility between various versions of
    198    *  FreeType.
    199    */
    200   typedef PS_PrivateRec  T1_Private;
    201 
    202 
    203   /**************************************************************************
    204    *
    205    * @enum:
    206    *   T1_Blend_Flags
    207    *
    208    * @description:
    209    *   A set of flags used to indicate which fields are present in a
    210    *   given blend dictionary (font info or private).  Used to support
    211    *   Multiple Masters fonts.
    212    *
    213    * @values:
    214    *   T1_BLEND_UNDERLINE_POSITION ::
    215    *   T1_BLEND_UNDERLINE_THICKNESS ::
    216    *   T1_BLEND_ITALIC_ANGLE ::
    217    *   T1_BLEND_BLUE_VALUES ::
    218    *   T1_BLEND_OTHER_BLUES ::
    219    *   T1_BLEND_STANDARD_WIDTH ::
    220    *   T1_BLEND_STANDARD_HEIGHT ::
    221    *   T1_BLEND_STEM_SNAP_WIDTHS ::
    222    *   T1_BLEND_STEM_SNAP_HEIGHTS ::
    223    *   T1_BLEND_BLUE_SCALE ::
    224    *   T1_BLEND_BLUE_SHIFT ::
    225    *   T1_BLEND_FAMILY_BLUES ::
    226    *   T1_BLEND_FAMILY_OTHER_BLUES ::
    227    *   T1_BLEND_FORCE_BOLD ::
    228    */
    229   typedef enum  T1_Blend_Flags_
    230   {
    231     /* required fields in a FontInfo blend dictionary */
    232     T1_BLEND_UNDERLINE_POSITION = 0,
    233     T1_BLEND_UNDERLINE_THICKNESS,
    234     T1_BLEND_ITALIC_ANGLE,
    235 
    236     /* required fields in a Private blend dictionary */
    237     T1_BLEND_BLUE_VALUES,
    238     T1_BLEND_OTHER_BLUES,
    239     T1_BLEND_STANDARD_WIDTH,
    240     T1_BLEND_STANDARD_HEIGHT,
    241     T1_BLEND_STEM_SNAP_WIDTHS,
    242     T1_BLEND_STEM_SNAP_HEIGHTS,
    243     T1_BLEND_BLUE_SCALE,
    244     T1_BLEND_BLUE_SHIFT,
    245     T1_BLEND_FAMILY_BLUES,
    246     T1_BLEND_FAMILY_OTHER_BLUES,
    247     T1_BLEND_FORCE_BOLD,
    248 
    249     T1_BLEND_MAX    /* do not remove */
    250 
    251   } T1_Blend_Flags;
    252 
    253 
    254   /* these constants are deprecated; use the corresponding */
    255   /* `T1_Blend_Flags' values instead                       */
    256 #define t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION
    257 #define t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS
    258 #define t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE
    259 #define t1_blend_blue_values          T1_BLEND_BLUE_VALUES
    260 #define t1_blend_other_blues          T1_BLEND_OTHER_BLUES
    261 #define t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH
    262 #define t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT
    263 #define t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS
    264 #define t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS
    265 #define t1_blend_blue_scale           T1_BLEND_BLUE_SCALE
    266 #define t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT
    267 #define t1_blend_family_blues         T1_BLEND_FAMILY_BLUES
    268 #define t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES
    269 #define t1_blend_force_bold           T1_BLEND_FORCE_BOLD
    270 #define t1_blend_max                  T1_BLEND_MAX
    271 
    272   /* */
    273 
    274 
    275   /* maximum number of Multiple Masters designs, as defined in the spec */
    276 #define T1_MAX_MM_DESIGNS     16
    277 
    278   /* maximum number of Multiple Masters axes, as defined in the spec */
    279 #define T1_MAX_MM_AXIS        4
    280 
    281   /* maximum number of elements in a design map */
    282 #define T1_MAX_MM_MAP_POINTS  20
    283 
    284 
    285   /* this structure is used to store the BlendDesignMap entry for an axis */
    286   typedef struct  PS_DesignMap_
    287   {
    288     FT_Byte    num_points;
    289     FT_Long*   design_points;
    290     FT_Fixed*  blend_points;
    291 
    292   } PS_DesignMapRec, *PS_DesignMap;
    293 
    294   /* backward compatible definition */
    295   typedef PS_DesignMapRec  T1_DesignMap;
    296 
    297 
    298   typedef struct  PS_BlendRec_
    299   {
    300     FT_UInt          num_designs;
    301     FT_UInt          num_axis;
    302 
    303     FT_String*       axis_names[T1_MAX_MM_AXIS];
    304     FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];
    305     PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];
    306 
    307     FT_Fixed*        weight_vector;
    308     FT_Fixed*        default_weight_vector;
    309 
    310     PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];
    311     PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];
    312 
    313     FT_ULong         blend_bitflags;
    314 
    315     FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];
    316 
    317     /* since 2.3.0 */
    318 
    319     /* undocumented, optional: the default design instance;   */
    320     /* corresponds to default_weight_vector --                */
    321     /* num_default_design_vector == 0 means it is not present */
    322     /* in the font and associated metrics files               */
    323     FT_UInt          default_design_vector[T1_MAX_MM_DESIGNS];
    324     FT_UInt          num_default_design_vector;
    325 
    326   } PS_BlendRec, *PS_Blend;
    327 
    328 
    329   /* backward compatible definition */
    330   typedef PS_BlendRec  T1_Blend;
    331 
    332 
    333   /**************************************************************************
    334    *
    335    * @struct:
    336    *   CID_FaceDictRec
    337    *
    338    * @description:
    339    *   A structure used to represent data in a CID top-level dictionary.  In
    340    *   most cases, they are part of the font's `/FDArray' array.  Within a
    341    *   CID font file, such (internal) subfont dictionaries are enclosed by
    342    *   `%ADOBeginFontDict' and `%ADOEndFontDict' comments.
    343    *
    344    *   Note that `CID_FaceDictRec' misses a field for the `/FontName'
    345    *   keyword, specifying the subfont's name (the top-level font name is
    346    *   given by the `/CIDFontName' keyword).  This is an oversight, but it
    347    *   doesn't limit the `cid' font module's functionality because FreeType
    348    *   neither needs this entry nor gives access to CID subfonts.
    349    */
    350   typedef struct  CID_FaceDictRec_
    351   {
    352     PS_PrivateRec  private_dict;
    353 
    354     FT_UInt        len_buildchar;
    355     FT_Fixed       forcebold_threshold;
    356     FT_Pos         stroke_width;
    357     FT_Fixed       expansion_factor;   /* this is a duplicate of           */
    358                                        /* `private_dict->expansion_factor' */
    359     FT_Byte        paint_type;
    360     FT_Byte        font_type;
    361     FT_Matrix      font_matrix;
    362     FT_Vector      font_offset;
    363 
    364     FT_UInt        num_subrs;
    365     FT_ULong       subrmap_offset;
    366     FT_Int         sd_bytes;
    367 
    368   } CID_FaceDictRec;
    369 
    370 
    371   /**************************************************************************
    372    *
    373    * @struct:
    374    *   CID_FaceDict
    375    *
    376    * @description:
    377    *   A handle to a @CID_FaceDictRec structure.
    378    */
    379   typedef struct CID_FaceDictRec_*  CID_FaceDict;
    380 
    381 
    382   /**************************************************************************
    383    *
    384    * @struct:
    385    *   CID_FontDict
    386    *
    387    * @description:
    388    *   This type is equivalent to @CID_FaceDictRec.  It is deprecated but
    389    *   kept to maintain source compatibility between various versions of
    390    *   FreeType.
    391    */
    392   typedef CID_FaceDictRec  CID_FontDict;
    393 
    394 
    395   /**************************************************************************
    396    *
    397    * @struct:
    398    *   CID_FaceInfoRec
    399    *
    400    * @description:
    401    *   A structure used to represent CID Face information.
    402    */
    403   typedef struct  CID_FaceInfoRec_
    404   {
    405     FT_String*      cid_font_name;
    406     FT_Fixed        cid_version;
    407     FT_Int          cid_font_type;
    408 
    409     FT_String*      registry;
    410     FT_String*      ordering;
    411     FT_Int          supplement;
    412 
    413     PS_FontInfoRec  font_info;
    414     FT_BBox         font_bbox;
    415     FT_ULong        uid_base;
    416 
    417     FT_Int          num_xuid;
    418     FT_ULong        xuid[16];
    419 
    420     FT_ULong        cidmap_offset;
    421     FT_Int          fd_bytes;
    422     FT_Int          gd_bytes;
    423     FT_ULong        cid_count;
    424 
    425     FT_Int          num_dicts;
    426     CID_FaceDict    font_dicts;
    427 
    428     FT_ULong        data_offset;
    429 
    430   } CID_FaceInfoRec;
    431 
    432 
    433   /**************************************************************************
    434    *
    435    * @struct:
    436    *   CID_FaceInfo
    437    *
    438    * @description:
    439    *   A handle to a @CID_FaceInfoRec structure.
    440    */
    441   typedef struct CID_FaceInfoRec_*  CID_FaceInfo;
    442 
    443 
    444   /**************************************************************************
    445    *
    446    * @struct:
    447    *   CID_Info
    448    *
    449    * @description:
    450    *  This type is equivalent to @CID_FaceInfoRec.  It is deprecated but
    451    *  kept to maintain source compatibility between various versions of
    452    *  FreeType.
    453    */
    454   typedef CID_FaceInfoRec  CID_Info;
    455 
    456 
    457   /************************************************************************
    458    *
    459    * @function:
    460    *    FT_Has_PS_Glyph_Names
    461    *
    462    * @description:
    463    *    Return true if a given face provides reliable PostScript glyph
    464    *    names.  This is similar to using the @FT_HAS_GLYPH_NAMES macro,
    465    *    except that certain fonts (mostly TrueType) contain incorrect
    466    *    glyph name tables.
    467    *
    468    *    When this function returns true, the caller is sure that the glyph
    469    *    names returned by @FT_Get_Glyph_Name are reliable.
    470    *
    471    * @input:
    472    *    face ::
    473    *      face handle
    474    *
    475    * @return:
    476    *    Boolean.  True if glyph names are reliable.
    477    *
    478    */
    479   FT_EXPORT( FT_Int )
    480   FT_Has_PS_Glyph_Names( FT_Face  face );
    481 
    482 
    483   /************************************************************************
    484    *
    485    * @function:
    486    *    FT_Get_PS_Font_Info
    487    *
    488    * @description:
    489    *    Retrieve the @PS_FontInfoRec structure corresponding to a given
    490    *    PostScript font.
    491    *
    492    * @input:
    493    *    face ::
    494    *      PostScript face handle.
    495    *
    496    * @output:
    497    *    afont_info ::
    498    *      Output font info structure pointer.
    499    *
    500    * @return:
    501    *    FreeType error code.  0~means success.
    502    *
    503    * @note:
    504    *    String pointers within the @PS_FontInfoRec structure are owned by
    505    *    the face and don't need to be freed by the caller.  Missing entries
    506    *    in the font's FontInfo dictionary are represented by NULL pointers.
    507    *
    508    *    If the font's format is not PostScript-based, this function will
    509    *    return the `FT_Err_Invalid_Argument' error code.
    510    *
    511    */
    512   FT_EXPORT( FT_Error )
    513   FT_Get_PS_Font_Info( FT_Face      face,
    514                        PS_FontInfo  afont_info );
    515 
    516 
    517   /************************************************************************
    518    *
    519    * @function:
    520    *    FT_Get_PS_Font_Private
    521    *
    522    * @description:
    523    *    Retrieve the @PS_PrivateRec structure corresponding to a given
    524    *    PostScript font.
    525    *
    526    * @input:
    527    *    face ::
    528    *      PostScript face handle.
    529    *
    530    * @output:
    531    *    afont_private ::
    532    *      Output private dictionary structure pointer.
    533    *
    534    * @return:
    535    *    FreeType error code.  0~means success.
    536    *
    537    * @note:
    538    *    The string pointers within the @PS_PrivateRec structure are owned by
    539    *    the face and don't need to be freed by the caller.
    540    *
    541    *    If the font's format is not PostScript-based, this function returns
    542    *    the `FT_Err_Invalid_Argument' error code.
    543    *
    544    */
    545   FT_EXPORT( FT_Error )
    546   FT_Get_PS_Font_Private( FT_Face     face,
    547                           PS_Private  afont_private );
    548 
    549 
    550   /**************************************************************************
    551    *
    552    * @enum:
    553    *   T1_EncodingType
    554    *
    555    * @description:
    556    *   An enumeration describing the `Encoding' entry in a Type 1
    557    *   dictionary.
    558    *
    559    * @values:
    560    *   T1_ENCODING_TYPE_NONE ::
    561    *   T1_ENCODING_TYPE_ARRAY ::
    562    *   T1_ENCODING_TYPE_STANDARD ::
    563    *   T1_ENCODING_TYPE_ISOLATIN1 ::
    564    *   T1_ENCODING_TYPE_EXPERT ::
    565    *
    566    * @since:
    567    *   2.4.8
    568    */
    569   typedef enum  T1_EncodingType_
    570   {
    571     T1_ENCODING_TYPE_NONE = 0,
    572     T1_ENCODING_TYPE_ARRAY,
    573     T1_ENCODING_TYPE_STANDARD,
    574     T1_ENCODING_TYPE_ISOLATIN1,
    575     T1_ENCODING_TYPE_EXPERT
    576 
    577   } T1_EncodingType;
    578 
    579 
    580   /**************************************************************************
    581    *
    582    * @enum:
    583    *   PS_Dict_Keys
    584    *
    585    * @description:
    586    *   An enumeration used in calls to @FT_Get_PS_Font_Value to identify
    587    *   the Type~1 dictionary entry to retrieve.
    588    *
    589    * @values:
    590    *   PS_DICT_FONT_TYPE ::
    591    *   PS_DICT_FONT_MATRIX ::
    592    *   PS_DICT_FONT_BBOX ::
    593    *   PS_DICT_PAINT_TYPE ::
    594    *   PS_DICT_FONT_NAME ::
    595    *   PS_DICT_UNIQUE_ID ::
    596    *   PS_DICT_NUM_CHAR_STRINGS ::
    597    *   PS_DICT_CHAR_STRING_KEY ::
    598    *   PS_DICT_CHAR_STRING ::
    599    *   PS_DICT_ENCODING_TYPE ::
    600    *   PS_DICT_ENCODING_ENTRY ::
    601    *   PS_DICT_NUM_SUBRS ::
    602    *   PS_DICT_SUBR ::
    603    *   PS_DICT_STD_HW ::
    604    *   PS_DICT_STD_VW ::
    605    *   PS_DICT_NUM_BLUE_VALUES ::
    606    *   PS_DICT_BLUE_VALUE ::
    607    *   PS_DICT_BLUE_FUZZ ::
    608    *   PS_DICT_NUM_OTHER_BLUES ::
    609    *   PS_DICT_OTHER_BLUE ::
    610    *   PS_DICT_NUM_FAMILY_BLUES ::
    611    *   PS_DICT_FAMILY_BLUE ::
    612    *   PS_DICT_NUM_FAMILY_OTHER_BLUES ::
    613    *   PS_DICT_FAMILY_OTHER_BLUE ::
    614    *   PS_DICT_BLUE_SCALE ::
    615    *   PS_DICT_BLUE_SHIFT ::
    616    *   PS_DICT_NUM_STEM_SNAP_H ::
    617    *   PS_DICT_STEM_SNAP_H ::
    618    *   PS_DICT_NUM_STEM_SNAP_V ::
    619    *   PS_DICT_STEM_SNAP_V ::
    620    *   PS_DICT_FORCE_BOLD ::
    621    *   PS_DICT_RND_STEM_UP ::
    622    *   PS_DICT_MIN_FEATURE ::
    623    *   PS_DICT_LEN_IV ::
    624    *   PS_DICT_PASSWORD ::
    625    *   PS_DICT_LANGUAGE_GROUP ::
    626    *   PS_DICT_VERSION ::
    627    *   PS_DICT_NOTICE ::
    628    *   PS_DICT_FULL_NAME ::
    629    *   PS_DICT_FAMILY_NAME ::
    630    *   PS_DICT_WEIGHT ::
    631    *   PS_DICT_IS_FIXED_PITCH ::
    632    *   PS_DICT_UNDERLINE_POSITION ::
    633    *   PS_DICT_UNDERLINE_THICKNESS ::
    634    *   PS_DICT_FS_TYPE ::
    635    *   PS_DICT_ITALIC_ANGLE ::
    636    *
    637    * @since:
    638    *   2.4.8
    639    */
    640   typedef enum  PS_Dict_Keys_
    641   {
    642     /* conventionally in the font dictionary */
    643     PS_DICT_FONT_TYPE,              /* FT_Byte         */
    644     PS_DICT_FONT_MATRIX,            /* FT_Fixed        */
    645     PS_DICT_FONT_BBOX,              /* FT_Fixed        */
    646     PS_DICT_PAINT_TYPE,             /* FT_Byte         */
    647     PS_DICT_FONT_NAME,              /* FT_String*      */
    648     PS_DICT_UNIQUE_ID,              /* FT_Int          */
    649     PS_DICT_NUM_CHAR_STRINGS,       /* FT_Int          */
    650     PS_DICT_CHAR_STRING_KEY,        /* FT_String*      */
    651     PS_DICT_CHAR_STRING,            /* FT_String*      */
    652     PS_DICT_ENCODING_TYPE,          /* T1_EncodingType */
    653     PS_DICT_ENCODING_ENTRY,         /* FT_String*      */
    654 
    655     /* conventionally in the font Private dictionary */
    656     PS_DICT_NUM_SUBRS,              /* FT_Int     */
    657     PS_DICT_SUBR,                   /* FT_String* */
    658     PS_DICT_STD_HW,                 /* FT_UShort  */
    659     PS_DICT_STD_VW,                 /* FT_UShort  */
    660     PS_DICT_NUM_BLUE_VALUES,        /* FT_Byte    */
    661     PS_DICT_BLUE_VALUE,             /* FT_Short   */
    662     PS_DICT_BLUE_FUZZ,              /* FT_Int     */
    663     PS_DICT_NUM_OTHER_BLUES,        /* FT_Byte    */
    664     PS_DICT_OTHER_BLUE,             /* FT_Short   */
    665     PS_DICT_NUM_FAMILY_BLUES,       /* FT_Byte    */
    666     PS_DICT_FAMILY_BLUE,            /* FT_Short   */
    667     PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte    */
    668     PS_DICT_FAMILY_OTHER_BLUE,      /* FT_Short   */
    669     PS_DICT_BLUE_SCALE,             /* FT_Fixed   */
    670     PS_DICT_BLUE_SHIFT,             /* FT_Int     */
    671     PS_DICT_NUM_STEM_SNAP_H,        /* FT_Byte    */
    672     PS_DICT_STEM_SNAP_H,            /* FT_Short   */
    673     PS_DICT_NUM_STEM_SNAP_V,        /* FT_Byte    */
    674     PS_DICT_STEM_SNAP_V,            /* FT_Short   */
    675     PS_DICT_FORCE_BOLD,             /* FT_Bool    */
    676     PS_DICT_RND_STEM_UP,            /* FT_Bool    */
    677     PS_DICT_MIN_FEATURE,            /* FT_Short   */
    678     PS_DICT_LEN_IV,                 /* FT_Int     */
    679     PS_DICT_PASSWORD,               /* FT_Long    */
    680     PS_DICT_LANGUAGE_GROUP,         /* FT_Long    */
    681 
    682     /* conventionally in the font FontInfo dictionary */
    683     PS_DICT_VERSION,                /* FT_String* */
    684     PS_DICT_NOTICE,                 /* FT_String* */
    685     PS_DICT_FULL_NAME,              /* FT_String* */
    686     PS_DICT_FAMILY_NAME,            /* FT_String* */
    687     PS_DICT_WEIGHT,                 /* FT_String* */
    688     PS_DICT_IS_FIXED_PITCH,         /* FT_Bool    */
    689     PS_DICT_UNDERLINE_POSITION,     /* FT_Short   */
    690     PS_DICT_UNDERLINE_THICKNESS,    /* FT_UShort  */
    691     PS_DICT_FS_TYPE,                /* FT_UShort  */
    692     PS_DICT_ITALIC_ANGLE,           /* FT_Long    */
    693 
    694     PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
    695 
    696   } PS_Dict_Keys;
    697 
    698 
    699   /************************************************************************
    700    *
    701    * @function:
    702    *    FT_Get_PS_Font_Value
    703    *
    704    * @description:
    705    *    Retrieve the value for the supplied key from a PostScript font.
    706    *
    707    * @input:
    708    *    face ::
    709    *      PostScript face handle.
    710    *
    711    *    key ::
    712    *      An enumeration value representing the dictionary key to retrieve.
    713    *
    714    *    idx ::
    715    *      For array values, this specifies the index to be returned.
    716    *
    717    *    value ::
    718    *      A pointer to memory into which to write the value.
    719    *
    720    *    valen_len ::
    721    *      The size, in bytes, of the memory supplied for the value.
    722    *
    723    * @output:
    724    *    value ::
    725    *      The value matching the above key, if it exists.
    726    *
    727    * @return:
    728    *    The amount of memory (in bytes) required to hold the requested
    729    *    value (if it exists, -1 otherwise).
    730    *
    731    * @note:
    732    *    The values returned are not pointers into the internal structures of
    733    *    the face, but are `fresh' copies, so that the memory containing them
    734    *    belongs to the calling application.  This also enforces the
    735    *    `read-only' nature of these values, i.e., this function cannot be
    736    *    used to manipulate the face.
    737    *
    738    *    `value' is a void pointer because the values returned can be of
    739    *    various types.
    740    *
    741    *    If either `value' is NULL or `value_len' is too small, just the
    742    *    required memory size for the requested entry is returned.
    743    *
    744    *    The `idx' parameter is used, not only to retrieve elements of, for
    745    *    example, the FontMatrix or FontBBox, but also to retrieve name keys
    746    *    from the CharStrings dictionary, and the charstrings themselves.  It
    747    *    is ignored for atomic values.
    748    *
    749    *    PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000.  To
    750    *    get the value as in the font stream, you need to divide by
    751    *    65536000.0 (to remove the FT_Fixed scale, and the x1000 scale).
    752    *
    753    *    IMPORTANT: Only key/value pairs read by the FreeType interpreter can
    754    *    be retrieved.  So, for example, PostScript procedures such as NP,
    755    *    ND, and RD are not available.  Arbitrary keys are, obviously, not be
    756    *    available either.
    757    *
    758    *    If the font's format is not PostScript-based, this function returns
    759    *    the `FT_Err_Invalid_Argument' error code.
    760    *
    761    * @since:
    762    *    2.4.8
    763    *
    764    */
    765   FT_EXPORT( FT_Long )
    766   FT_Get_PS_Font_Value( FT_Face       face,
    767                         PS_Dict_Keys  key,
    768                         FT_UInt       idx,
    769                         void         *value,
    770                         FT_Long       value_len );
    771 
    772   /* */
    773 
    774 FT_END_HEADER
    775 
    776 #endif /* T1TABLES_H_ */
    777 
    778 
    779 /* END */
    780