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