t1types.h
上传用户:yisoukefu
上传日期:2020-08-09
资源大小:39506k
文件大小:9k
源码类别:

其他游戏

开发平台:

Visual C++

  1. /***************************************************************************/
  2. /*                                                                         */
  3. /*  t1types.h                                                              */
  4. /*                                                                         */
  5. /*    Basic Type1/Type2 type definitions and interface (specification      */
  6. /*    only).                                                               */
  7. /*                                                                         */
  8. /*  Copyright 1996-2001, 2002, 2003, 2004, 2006 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. #ifndef __T1TYPES_H__
  19. #define __T1TYPES_H__
  20. #include <ft2build.h>
  21. #include FT_TYPE1_TABLES_H
  22. #include FT_INTERNAL_POSTSCRIPT_HINTS_H
  23. #include FT_INTERNAL_SERVICE_H
  24. #include FT_SERVICE_POSTSCRIPT_CMAPS_H
  25. FT_BEGIN_HEADER
  26.   /*************************************************************************/
  27.   /*************************************************************************/
  28.   /*************************************************************************/
  29.   /***                                                                   ***/
  30.   /***                                                                   ***/
  31.   /***              REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS              ***/
  32.   /***                                                                   ***/
  33.   /***                                                                   ***/
  34.   /*************************************************************************/
  35.   /*************************************************************************/
  36.   /*************************************************************************/
  37.   /*************************************************************************/
  38.   /*                                                                       */
  39.   /* <Struct>                                                              */
  40.   /*    T1_EncodingRec                                                     */
  41.   /*                                                                       */
  42.   /* <Description>                                                         */
  43.   /*    A structure modeling a custom encoding.                            */
  44.   /*                                                                       */
  45.   /* <Fields>                                                              */
  46.   /*    num_chars  :: The number of character codes in the encoding.       */
  47.   /*                  Usually 256.                                         */
  48.   /*                                                                       */
  49.   /*    code_first :: The lowest valid character code in the encoding.     */
  50.   /*                                                                       */
  51.   /*    code_last  :: The highest valid character code in the encoding.    */
  52.   /*                                                                       */
  53.   /*    char_index :: An array of corresponding glyph indices.             */
  54.   /*                                                                       */
  55.   /*    char_name  :: An array of corresponding glyph names.               */
  56.   /*                                                                       */
  57.   typedef struct  T1_EncodingRecRec_
  58.   {
  59.     FT_Int       num_chars;
  60.     FT_Int       code_first;
  61.     FT_Int       code_last;
  62.     FT_UShort*   char_index;
  63.     FT_String**  char_name;
  64.   } T1_EncodingRec, *T1_Encoding;
  65.   typedef enum  T1_EncodingType_
  66.   {
  67.     T1_ENCODING_TYPE_NONE = 0,
  68.     T1_ENCODING_TYPE_ARRAY,
  69.     T1_ENCODING_TYPE_STANDARD,
  70.     T1_ENCODING_TYPE_ISOLATIN1,
  71.     T1_ENCODING_TYPE_EXPERT
  72.   } T1_EncodingType;
  73.   typedef struct  T1_FontRec_
  74.   {
  75.     PS_FontInfoRec   font_info;         /* font info dictionary */
  76.     PS_PrivateRec    private_dict;      /* private dictionary   */
  77.     FT_String*       font_name;         /* top-level dictionary */
  78.     T1_EncodingType  encoding_type;
  79.     T1_EncodingRec   encoding;
  80.     FT_Byte*         subrs_block;
  81.     FT_Byte*         charstrings_block;
  82.     FT_Byte*         glyph_names_block;
  83.     FT_Int           num_subrs;
  84.     FT_Byte**        subrs;
  85.     FT_PtrDist*      subrs_len;
  86.     FT_Int           num_glyphs;
  87.     FT_String**      glyph_names;       /* array of glyph names       */
  88.     FT_Byte**        charstrings;       /* array of glyph charstrings */
  89.     FT_PtrDist*      charstrings_len;
  90.     FT_Byte          paint_type;
  91.     FT_Byte          font_type;
  92.     FT_Matrix        font_matrix;
  93.     FT_Vector        font_offset;
  94.     FT_BBox          font_bbox;
  95.     FT_Long          font_id;
  96.     FT_Fixed         stroke_width;
  97.   } T1_FontRec, *T1_Font;
  98.   typedef struct  CID_SubrsRec_
  99.   {
  100.     FT_UInt    num_subrs;
  101.     FT_Byte**  code;
  102.   } CID_SubrsRec, *CID_Subrs;
  103.   /*************************************************************************/
  104.   /*************************************************************************/
  105.   /*************************************************************************/
  106.   /***                                                                   ***/
  107.   /***                                                                   ***/
  108.   /***                AFM FONT INFORMATION STRUCTURES                    ***/
  109.   /***                                                                   ***/
  110.   /***                                                                   ***/
  111.   /*************************************************************************/
  112.   /*************************************************************************/
  113.   /*************************************************************************/
  114.   typedef struct  AFM_TrackKernRec_
  115.   {
  116.     FT_Int    degree;
  117.     FT_Fixed  min_ptsize;
  118.     FT_Fixed  min_kern;
  119.     FT_Fixed  max_ptsize;
  120.     FT_Fixed  max_kern;
  121.   } AFM_TrackKernRec, *AFM_TrackKern;
  122.   typedef struct  AFM_KernPairRec_
  123.   {
  124.     FT_Int  index1;
  125.     FT_Int  index2;
  126.     FT_Int  x;
  127.     FT_Int  y;
  128.   } AFM_KernPairRec, *AFM_KernPair;
  129.   typedef struct  AFM_FontInfoRec_
  130.   {
  131.     FT_Bool        IsCIDFont;
  132.     FT_BBox        FontBBox;
  133.     FT_Fixed       Ascender;
  134.     FT_Fixed       Descender;
  135.     AFM_TrackKern  TrackKerns;   /* free if non-NULL */
  136.     FT_Int         NumTrackKern;
  137.     AFM_KernPair   KernPairs;    /* free if non-NULL */
  138.     FT_Int         NumKernPair;
  139.   } AFM_FontInfoRec, *AFM_FontInfo;
  140.   /*************************************************************************/
  141.   /*************************************************************************/
  142.   /*************************************************************************/
  143.   /***                                                                   ***/
  144.   /***                                                                   ***/
  145.   /***                ORIGINAL T1_FACE CLASS DEFINITION                  ***/
  146.   /***                                                                   ***/
  147.   /***                                                                   ***/
  148.   /*************************************************************************/
  149.   /*************************************************************************/
  150.   /*************************************************************************/
  151.   typedef struct T1_FaceRec_*   T1_Face;
  152.   typedef struct CID_FaceRec_*  CID_Face;
  153.   typedef struct  T1_FaceRec_
  154.   {
  155.     FT_FaceRec      root;
  156.     T1_FontRec      type1;
  157.     const void*     psnames;
  158.     const void*     psaux;
  159.     const void*     afm_data;
  160.     FT_CharMapRec   charmaprecs[2];
  161.     FT_CharMap      charmaps[2];
  162. #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
  163.     PS_Unicodes     unicode_map;
  164. #endif
  165.     /* support for Multiple Masters fonts */
  166.     PS_Blend        blend;
  167.     /* undocumented, optional: indices of subroutines that express      */
  168.     /* the NormalizeDesignVector and the ConvertDesignVector procedure, */
  169.     /* respectively, as Type 2 charstrings; -1 if keywords not present  */
  170.     FT_Int           ndv_idx;
  171.     FT_Int           cdv_idx;
  172.     /* undocumented, optional: has the same meaning as len_buildchar */
  173.     /* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25    */
  174.     FT_UInt          len_buildchar;
  175.     FT_Int*          buildchar;
  176.     /* since version 2.1 - interface to PostScript hinter */
  177.     const void*     pshinter;
  178.   } T1_FaceRec;
  179.   typedef struct  CID_FaceRec_
  180.   {
  181.     FT_FaceRec       root;
  182.     void*            psnames;
  183.     void*            psaux;
  184.     CID_FaceInfoRec  cid;
  185.     void*            afm_data;
  186.     CID_Subrs        subrs;
  187.     /* since version 2.1 - interface to PostScript hinter */
  188.     void*            pshinter;
  189.     /* since version 2.1.8, but was originally positioned after `afm_data' */
  190.     FT_Byte*         binary_data; /* used if hex data has been converted */
  191.     FT_Stream        cid_stream;
  192.   } CID_FaceRec;
  193. FT_END_HEADER
  194. #endif /* __T1TYPES_H__ */
  195. /* END */