# FreeType-2.1.4 API Reference

# Type 1 Tables

## Synopsys

| PS_FontInfoRec |  | CID_Info |  | TT_MAC_ID_XXX
| T1_FontInfo |  | FT_Has_PS_Glyph_Names |  | TT_ISO_ID_XXX
| PS_PrivateRec |  | FT_Get_PS_Font_Info |  | TT_MS_ID_XXX
| T1_Private |  | TT_PLATFORM_XXX |  | TT_ADOBE_ID_XXX
| T1_Blend_Flags |  | TT_APPLE_ID_XXX |  |

This section contains the definition of Type 1-specific tables, including structures related to other PostScript font formats.

#### PS_FontInfoRec
      typedef struct  PS_FontInfoRec
      {
        FT_String*  version;
        FT_String*  notice;
        FT_String*  full_name;
        FT_String*  family_name;
        FT_String*  weight;
        FT_Long     italic_angle;
        FT_Bool     is_fixed_pitch;
        FT_Short    underline_position;
        FT_UShort   underline_thickness;

      } PS_FontInfoRec, *PS_FontInfo;
A structure used to model a Type1/Type2 FontInfo dictionary. Note that for Multiple Master fonts, each instance has its own FontInfo.

#### T1_FontInfo
      typedef PS_FontInfoRec  T1_FontInfo;
This type is equivalent to PS_FontInfoRec It is deprecated but kept to maintain source compatibility between various versions of FreeType.

#### PS_PrivateRec
      typedef struct  PS_PrivateRec_
      {
        FT_Int     unique_id;
        FT_Int     lenIV;

        FT_Byte    num_blue_values;
        FT_Byte    num_other_blues;
        FT_Byte    num_family_blues;
        FT_Byte    num_family_other_blues;

        FT_Short   blue_values[14];
        FT_Short   other_blues[10];

        FT_Short   family_blues      [14];
        FT_Short   family_other_blues[10];

        FT_Fixed   blue_scale;
        FT_Int     blue_shift;
        FT_Int     blue_fuzz;

        FT_UShort  standard_width[1];
        FT_UShort  standard_height[1];

        FT_Byte    num_snap_widths;
        FT_Byte    num_snap_heights;
        FT_Bool    force_bold;
        FT_Bool    round_stem_up;

        FT_Short   snap_widths [13];  /* including std width  */
        FT_Short   snap_heights[13];  /* including std height */

        FT_Long    language_group;
        FT_Long    password;

        FT_Short   min_feature[2];

      } PS_PrivateRec, *PS_Private;
A structure used to model a Type1/Type2 private dictionary. Note that for Multiple Master fonts, each instance has its own Private dictionary.

#### T1_Private
      typedef PS_PrivateRec  T1_Private;
This type is equivalent to PS_PrivateRec It is deprecated but kept to maintain source compatibility between various versions of FreeType.

#### T1_Blend_Flags
      typedef enum
      {
        /*# required fields in a FontInfo blend dictionary */
        T1_BLEND_UNDERLINE_POSITION = 0,
        T1_BLEND_UNDERLINE_THICKNESS,
        T1_BLEND_ITALIC_ANGLE,

        /*# required fields in a Private blend dictionary */
        T1_BLEND_BLUE_VALUES,
        T1_BLEND_OTHER_BLUES,
        T1_BLEND_STANDARD_WIDTH,
        T1_BLEND_STANDARD_HEIGHT,
        T1_BLEND_STEM_SNAP_WIDTHS,
        T1_BLEND_STEM_SNAP_HEIGHTS,
        T1_BLEND_BLUE_SCALE,
        T1_BLEND_BLUE_SHIFT,
        T1_BLEND_FAMILY_BLUES,
        T1_BLEND_FAMILY_OTHER_BLUES,
        T1_BLEND_FORCE_BOLD,

        /*# never remove */
        T1_BLEND_MAX

      } T1_Blend_Flags;

      /*# backwards compatible definitions */
    #define t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION
    #define t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS
    #define t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE
    #define t1_blend_blue_values          T1_BLEND_BLUE_VALUES
    #define t1_blend_other_blues          T1_BLEND_OTHER_BLUES
    #define t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH
    #define t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT
    #define t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS
    #define t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS
    #define t1_blend_blue_scale           T1_BLEND_BLUE_SCALE
    #define t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT
    #define t1_blend_family_blues         T1_BLEND_FAMILY_BLUES
    #define t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES
    #define t1_blend_force_bold           T1_BLEND_FORCE_BOLD
    #define t1_blend_max                  T1_BLEND_MAX

      /* maximum number of Multiple Masters designs, as defined in the spec */
    #define T1_MAX_MM_DESIGNS     16

      /* maximum number of Multiple Masters axes, as defined in the spec */
    #define T1_MAX_MM_AXIS        4

      /* maximum number of elements in a design map */
    #define T1_MAX_MM_MAP_POINTS  20

      /* this structure is used to store the BlendDesignMap entry for an axis */
      typedef struct  PS_DesignMap_
      {
        FT_Byte    num_points;
        FT_Fixed*  design_points;
        FT_Fixed*  blend_points;

      } PS_DesignMapRec, *PS_DesignMap;

      /* backwards-compatible definition */
      typedef PS_DesignMapRec  T1_DesignMap;

      typedef struct  PS_BlendRec_
      {
        FT_UInt          num_designs;
        FT_UInt          num_axis;

        FT_String*       axis_names[T1_MAX_MM_AXIS];
        FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];
        PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];

        FT_Fixed*        weight_vector;
        FT_Fixed*        default_weight_vector;

        PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];
        PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];

        FT_ULong         blend_bitflags;

        FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];

      } PS_BlendRec, *PS_Blend;

      /* backwards-compatible definition */
      typedef PS_BlendRec  T1_Blend;

      typedef struct  CID_FaceDictRec_
      {
        PS_PrivateRec  private_dict;

        FT_UInt        len_buildchar;
        FT_Fixed       forcebold_threshold;
        FT_Pos         stroke_width;
        FT_Fixed       expansion_factor;

        FT_Byte        paint_type;
        FT_Byte        font_type;
        FT_Matrix      font_matrix;
        FT_Vector      font_offset;

        FT_UInt        num_subrs;
        FT_ULong       subrmap_offset;
        FT_Int         sd_bytes;

      } CID_FaceDictRec, *CID_FaceDict;

      /* backwards-compatible definition */
      typedef CID_FaceDictRec  CID_FontDict;

      typedef struct  CID_FaceInfoRec_
      {
        FT_String*      cid_font_name;
        FT_Fixed        cid_version;
        FT_Int          cid_font_type;

        FT_String*      registry;
        FT_String*      ordering;
        FT_Int          supplement;

        PS_FontInfoRec  font_info;
        FT_BBox         font_bbox;
        FT_ULong        uid_base;

        FT_Int          num_xuid;
        FT_ULong        xuid[16];

        FT_ULong        cidmap_offset;
        FT_Int          fd_bytes;
        FT_Int          gd_bytes;
        FT_ULong        cid_count;

        FT_Int          num_dicts;
        CID_FaceDict    font_dicts;

        FT_ULong        data_offset;

      } CID_FaceInfoRec, *CID_FaceInfo;
A set of flags used to indicate which fields are present in a given blen dictionary (font info or private). Used to support Multiple Masters fonts.

#### CID_Info
      typedef CID_FaceInfoRec  CID_Info;
This type is equivalent to ?CID_FaceInfoRec? It is deprecated but kept to maintain source compatibility between various versions of FreeType.

#### FT_Has_PS_Glyph_Names
      FT_EXPORT( FT_Int )
      FT_Has_PS_Glyph_Names( FT_Face  face );
Return true if a given face provides reliable Postscript glyph names. This is similar to using the FT_HAS_GLYPH_NAMES macro, except that certain fonts (mostly TrueType) contain incorrect glyph name tables. When this function returns true, the caller is sure that the glyph names returned by FT_Get_Glyph_Name are reliable.
input
face | face handle
return
Boolean. True if glyph names are reliable.

#### FT_Get_PS_Font_Info
      FT_EXPORT( FT_Error )
      FT_Get_PS_Font_Info( FT_Face          face,
                           PS_FontInfoRec  *afont_info );
Retrieve the PS_FontInfoRec structure corresponding to a given Postscript font.
input
face | Postscript face handle.
output
afont_info | Output font info structure pointer.
return
FreeType error code. 0 means success.
note
The string pointers within the font info structure are owned by the face and don't need to be freed by the caller. If the font's format is not Postscript-based, this function will return the ?FT_Err_Invalid_Argument? error code.

#### TT_PLATFORM_XXX
    #define TT_PLATFORM_APPLE_UNICODE  0
    #define TT_PLATFORM_MACINTOSH      1
    #define TT_PLATFORM_ISO            2 /* deprecated */
    #define TT_PLATFORM_MICROSOFT      3
    #define TT_PLATFORM_CUSTOM         4
    #define TT_PLATFORM_ADOBE          7 /* artificial */
A list of valid values for the `platform_id' identifier code in ?FT_CharmapRec? and FT_SfntName structures.
values
TT_PLATFORM_APPLE_UNICODE | Used by Apple to indicate a Unicode character map and/or name entry. See TT_APPLE_ID_XXX for corresponding `encoding_id' values. Note that name entries in this format are coded as big-endian UCS-2 character codes only
TT_PLATFORM_MACINTOSH | Used by Apple to indicate a MacOS-specific charmap and/or name entry. See TT_MAC_ID_XXX for corresponding `encoding_id' values. Note that most TrueType fonts contain an Apple roman charmap to be usable on MacOS systems (even if they contain a Microsoft charmap as well).
TT_PLATFORM_ISO | This value was used to specify Unicode charmaps. It is however now deprecated. See TT_ISO_ID_XXX for a list of corresponding `encoding_id' values.
TT_PLATFORM_MICROSOFT | Used by Microsoft to indicate Windows-specific charmaps. See TT_MS_ID_XXX for a list of corresponding `encoding_id' values. Note that most fonts contain a Unicode charmap using (@TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS
TT_PLATFORM_CUSTOM | Used to indicate application-specific charmaps.
TT_PLATFORM_ADOBE | This value isn't part of any font format specification, but is used by FreeType to report Adobe-specific charmaps in an FT_CharMapRec structure. See TT_ADOBE_ID_XXX

#### TT_APPLE_ID_XXX
    #define TT_APPLE_ID_DEFAULT      0 /* Unicode 1.0 */
    #define TT_APPLE_ID_UNICODE_1_1  1 /* specify Hangul at U+34xx */
    #define TT_APPLE_ID_ISO_10646    2 /* deprecated */
    #define TT_APPLE_ID_UNICODE_2_0  3 /* or later */
    #define TT_APPLE_ID_UNICODE_32   4 /* 2.0 or later, full repertoire */
A list of valid values for the `encoding_id' for TT_PLATFORM_APPLE_UNICODE charmaps and name entries.
values
TT_APPLE_ID_DEFAULT | Unicode version 1.0.
TT_APPLE_ID_UNICODE_1_1 | Unicode 1.1; specifies Hangul characters starting at U+34xx.
TT_APPLE_ID_ISO_10646 | Deprecated (identical to preceding.)
TT_APPLE_ID_UNICODE_2_0 | Unicode 2.0 and beyond (UTF-16 BMP only.)
TT_APPLE_ID_UNICODE_32 | Unicode 3.1 and beyond, using UTF-32

#### TT_MAC_ID_XXX
    #define TT_MAC_ID_ROMAN                 0
    #define TT_MAC_ID_JAPANESE              1
    #define TT_MAC_ID_TRADITIONAL_CHINESE   2
    #define TT_MAC_ID_KOREAN                3
    #define TT_MAC_ID_ARABIC                4
    #define TT_MAC_ID_HEBREW                5
    #define TT_MAC_ID_GREEK                 6
    #define TT_MAC_ID_RUSSIAN               7
    #define TT_MAC_ID_RSYMBOL               8
    #define TT_MAC_ID_DEVANAGARI            9
    #define TT_MAC_ID_GURMUKHI             10
    #define TT_MAC_ID_GUJARATI             11
    #define TT_MAC_ID_ORIYA                12
    #define TT_MAC_ID_BENGALI              13
    #define TT_MAC_ID_TAMIL                14
    #define TT_MAC_ID_TELUGU               15
    #define TT_MAC_ID_KANNADA              16
    #define TT_MAC_ID_MALAYALAM            17
    #define TT_MAC_ID_SINHALESE            18
    #define TT_MAC_ID_BURMESE              19
    #define TT_MAC_ID_KHMER                20
    #define TT_MAC_ID_THAI                 21
    #define TT_MAC_ID_LAOTIAN              22
    #define TT_MAC_ID_GEORGIAN             23
    #define TT_MAC_ID_ARMENIAN             24
    #define TT_MAC_ID_MALDIVIAN            25
    #define TT_MAC_ID_SIMPLIFIED_CHINESE   25
    #define TT_MAC_ID_TIBETAN              26
    #define TT_MAC_ID_MONGOLIAN            27
    #define TT_MAC_ID_GEEZ                 28
    #define TT_MAC_ID_SLAVIC               29
    #define TT_MAC_ID_VIETNAMESE           30
    #define TT_MAC_ID_SINDHI               31
    #define TT_MAC_ID_UNINTERP             32
A list of valid values for the `encoding_id' for TT_PLATFORM_MACINTOSH charmaps and name entries.
values
TT_MAC_ID_ROMAN |
TT_MAC_ID_JAPANESE |
TT_MAC_ID_TRADITIONAL_CHINESE |
TT_MAC_ID_KOREAN |
TT_MAC_ID_ARABIC |
TT_MAC_ID_HEBREW |
TT_MAC_ID_GREEK |
TT_MAC_ID_RUSSIAN |
TT_MAC_ID_RSYMBOL |
TT_MAC_ID_DEVANAGARI |
TT_MAC_ID_GURMUKHI |
TT_MAC_ID_GUJARATI |
TT_MAC_ID_ORIYA |
TT_MAC_ID_BENGALI |
TT_MAC_ID_TAMIL |
TT_MAC_ID_TELUGU |
TT_MAC_ID_KANNADA |
TT_MAC_ID_MALAYALAM |
TT_MAC_ID_SINHALESE |
TT_MAC_ID_BURMESE |
TT_MAC_ID_KHMER |
TT_MAC_ID_THAI |
TT_MAC_ID_LAOTIAN |
TT_MAC_ID_GEORGIAN |
TT_MAC_ID_ARMENIAN |
TT_MAC_ID_MALDIVIAN |
TT_MAC_ID_SIMPLIFIED_CHINESE |
TT_MAC_ID_TIBETAN |
TT_MAC_ID_MONGOLIAN |
TT_MAC_ID_GEEZ |
TT_MAC_ID_SLAVIC |
TT_MAC_ID_VIETNAMESE |
TT_MAC_ID_SINDHI |
TT_MAC_ID_UNINTERP |

#### TT_ISO_ID_XXX
    #define TT_ISO_ID_7BIT_ASCII  0
    #define TT_ISO_ID_10646       1
    #define TT_ISO_ID_8859_1      2
A list of valid values for the `encoding_id' for TT_PLATFORM_ISO charmaps and name entries. Their use is now deprecated.
values
TT_ISO_ID_7BIT_ASCII | ASCII.
TT_ISO_ID_10646 | ISO/10646.
TT_ISO_ID_8859_1 | Also known as Latin-1.

#### TT_MS_ID_XXX
    #define TT_MS_ID_SYMBOL_CS    0
    #define TT_MS_ID_UNICODE_CS   1
    #define TT_MS_ID_SJIS         2
    #define TT_MS_ID_GB2312       3
    #define TT_MS_ID_BIG_5        4
    #define TT_MS_ID_WANSUNG      5
    #define TT_MS_ID_JOHAB        6
    #define TT_MS_ID_UCS_4       10
A list of valid values for the `encoding_id' for TT_PLATFORM_MICROSOFT charmaps and name entries.
values
TT_MS_ID_SYMBOL_CS | Corresponds to symbol encodings. see FT_ENCODING_MS_SYMBOL
TT_MS_ID_UNICODE_CS | Corresponds to a Microsoft WGL4 charmap, matching Unicode. See FT_ENCODING_UNICODE
TT_MS_ID_SJIS | Corresponds to Microsoft SJIS Japanese encoding. See FT_ENCODING_MS_SJIS
TT_MS_ID_GB2312 | Corresponds to Microsoft Simplified Chinese as used in Mainland China. See FT_ENCODING_MS_GB2312
TT_MS_ID_BIG_5 | Corresponds to Microsoft Traditional Chinese as used in Taiwan and Hong Kong. See FT_ENCODING_MS_BIG5
TT_MS_ID_WANSUNG | Corresponds to Microsoft Korean Wansung encoding. See FT_ENCODING_MS_WANSUNG
TT_MS_ID_JOHAB | Corresponds to Microsoft Johab encoding. See FT_ENCODING_MS_JOHAB
TT_MS_ID_UCS_4 | Corresponds to UCS-4 or UTF-32 charmaps. This has been added into OpenType specification as of version 1.4 (mid-2001.)

#### TT_ADOBE_ID_XXX
    #define TT_ADOBE_ID_STANDARD  0
    #define TT_ADOBE_ID_EXPERT    1
    #define TT_ADOBE_ID_CUSTOM    2
A list of valid values for the `encoding_id' for TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension!
values
TT_ADOBE_ID_STANDARD | Adobe standard encoding.
TT_ADOBE_ID_EXPERT | Adobe expert encoding.
TT_ADOBE_ID_CUSTOM | Adobe custom encoding.