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

其他游戏

开发平台:

Visual C++

  1. /***************************************************************************/
  2. /*                                                                         */
  3. /*  svpscmap.h                                                             */
  4. /*                                                                         */
  5. /*    The FreeType PostScript charmap service (specification).             */
  6. /*                                                                         */
  7. /*  Copyright 2003, 2006 by                                                */
  8. /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
  9. /*                                                                         */
  10. /*  This file is part of the FreeType project, and may only be used,       */
  11. /*  modified, and distributed under the terms of the FreeType project      */
  12. /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
  13. /*  this file you indicate that you have read the license and              */
  14. /*  understand and accept it fully.                                        */
  15. /*                                                                         */
  16. /***************************************************************************/
  17. #ifndef __SVPSCMAP_H__
  18. #define __SVPSCMAP_H__
  19. #include FT_INTERNAL_OBJECTS_H
  20. FT_BEGIN_HEADER
  21. #define FT_SERVICE_ID_POSTSCRIPT_CMAPS  "postscript-cmaps"
  22.   /*
  23.    *  Adobe glyph name to unicode value.
  24.    */
  25.   typedef FT_UInt32
  26.   (*PS_Unicode_ValueFunc)( const char*  glyph_name );
  27.   /*
  28.    *  Macintosh name id to glyph name.  NULL if invalid index.
  29.    */
  30.   typedef const char*
  31.   (*PS_Macintosh_NameFunc)( FT_UInt  name_index );
  32.   /*
  33.    *  Adobe standard string ID to glyph name.  NULL if invalid index.
  34.    */
  35.   typedef const char*
  36.   (*PS_Adobe_Std_StringsFunc)( FT_UInt  string_index );
  37.   /*
  38.    *  Simple unicode -> glyph index charmap built from font glyph names
  39.    *  table.
  40.    */
  41.   typedef struct  PS_UniMap_
  42.   {
  43.     FT_UInt32  unicode;      /* bit 31 set: is glyph variant */
  44.     FT_UInt    glyph_index;
  45.   } PS_UniMap;
  46.   typedef struct PS_UnicodesRec_*  PS_Unicodes;
  47.   typedef struct  PS_UnicodesRec_
  48.   {
  49.     FT_CMapRec  cmap;
  50.     FT_UInt     num_maps;
  51.     PS_UniMap*  maps;
  52.   } PS_UnicodesRec;
  53.   /*
  54.    *  A function which returns a glyph name for a given index.  Returns
  55.    *  NULL if invalid index.
  56.    */
  57.   typedef const char*
  58.   (*PS_GetGlyphNameFunc)( FT_Pointer  data,
  59.                           FT_UInt     string_index );
  60.   /*
  61.    *  A function used to release the glyph name returned by
  62.    *  PS_GetGlyphNameFunc, when needed
  63.    */
  64.   typedef void
  65.   (*PS_FreeGlyphNameFunc)( FT_Pointer  data,
  66.                            const char*  name );
  67.   typedef FT_Error
  68.   (*PS_Unicodes_InitFunc)( FT_Memory             memory,
  69.                            PS_Unicodes           unicodes,
  70.                            FT_UInt               num_glyphs,
  71.                            PS_GetGlyphNameFunc   get_glyph_name,
  72.                            PS_FreeGlyphNameFunc  free_glyph_name,
  73.                            FT_Pointer            glyph_data );
  74.   typedef FT_UInt
  75.   (*PS_Unicodes_CharIndexFunc)( PS_Unicodes  unicodes,
  76.                                 FT_UInt32    unicode );
  77.   typedef FT_ULong
  78.   (*PS_Unicodes_CharNextFunc)( PS_Unicodes  unicodes,
  79.                                FT_UInt32   *unicode );
  80.   FT_DEFINE_SERVICE( PsCMaps )
  81.   {
  82.     PS_Unicode_ValueFunc       unicode_value;
  83.     PS_Unicodes_InitFunc       unicodes_init;
  84.     PS_Unicodes_CharIndexFunc  unicodes_char_index;
  85.     PS_Unicodes_CharNextFunc   unicodes_char_next;
  86.     PS_Macintosh_NameFunc      macintosh_name;
  87.     PS_Adobe_Std_StringsFunc   adobe_std_strings;
  88.     const unsigned short*      adobe_std_encoding;
  89.     const unsigned short*      adobe_expert_encoding;
  90.   };
  91.   /* */
  92. FT_END_HEADER
  93. #endif /* __SVPSCMAP_H__ */
  94. /* END */