misc/libfreetype/include/freetype/internal/services/svpscmap.h
author koda
Mon, 25 Apr 2011 01:46:54 +0200
changeset 5172 88f2e05288ba
permissions -rw-r--r--
aaand let's add freetype as well while we are at it other smaller changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  svpscmap.h                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    The FreeType PostScript charmap service (specification).             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 2003, 2006 by                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
#ifndef __SVPSCMAP_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __SVPSCMAP_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
#include FT_INTERNAL_OBJECTS_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#define FT_SERVICE_ID_POSTSCRIPT_CMAPS  "postscript-cmaps"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
  /*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
   *  Adobe glyph name to unicode value.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  typedef FT_UInt32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  (*PS_Unicode_ValueFunc)( const char*  glyph_name );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
  /*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
   *  Macintosh name id to glyph name.  NULL if invalid index.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
  typedef const char*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  (*PS_Macintosh_NameFunc)( FT_UInt  name_index );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
  /*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
   *  Adobe standard string ID to glyph name.  NULL if invalid index.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  typedef const char*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  (*PS_Adobe_Std_StringsFunc)( FT_UInt  string_index );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
  /*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
   *  Simple unicode -> glyph index charmap built from font glyph names
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
   *  table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  typedef struct  PS_UniMap_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
    FT_UInt32  unicode;      /* bit 31 set: is glyph variant */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
    FT_UInt    glyph_index;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  } PS_UniMap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
  typedef struct PS_UnicodesRec_*  PS_Unicodes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  typedef struct  PS_UnicodesRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
    FT_CMapRec  cmap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
    FT_UInt     num_maps;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
    PS_UniMap*  maps;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
  } PS_UnicodesRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
  /*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
   *  A function which returns a glyph name for a given index.  Returns
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
   *  NULL if invalid index.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
  typedef const char*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
  (*PS_GetGlyphNameFunc)( FT_Pointer  data,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
                          FT_UInt     string_index );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
  /*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
   *  A function used to release the glyph name returned by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
   *  PS_GetGlyphNameFunc, when needed
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  (*PS_FreeGlyphNameFunc)( FT_Pointer  data,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
                           const char*  name );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  (*PS_Unicodes_InitFunc)( FT_Memory             memory,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
                           PS_Unicodes           unicodes,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
                           FT_UInt               num_glyphs,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
                           PS_GetGlyphNameFunc   get_glyph_name,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
                           PS_FreeGlyphNameFunc  free_glyph_name,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
                           FT_Pointer            glyph_data );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
  typedef FT_UInt
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
  (*PS_Unicodes_CharIndexFunc)( PS_Unicodes  unicodes,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
                                FT_UInt32    unicode );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
  typedef FT_UInt32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  (*PS_Unicodes_CharNextFunc)( PS_Unicodes  unicodes,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
                               FT_UInt32   *unicode );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  FT_DEFINE_SERVICE( PsCMaps )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
    PS_Unicode_ValueFunc       unicode_value;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
    PS_Unicodes_InitFunc       unicodes_init;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
    PS_Unicodes_CharIndexFunc  unicodes_char_index;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
    PS_Unicodes_CharNextFunc   unicodes_char_next;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
    PS_Macintosh_NameFunc      macintosh_name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
    PS_Adobe_Std_StringsFunc   adobe_std_strings;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
    const unsigned short*      adobe_std_encoding;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
    const unsigned short*      adobe_expert_encoding;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
  };
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
#ifndef FT_CONFIG_OPTION_PIC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
#define FT_DEFINE_SERVICE_PSCMAPSREC(class_, unicode_value_, unicodes_init_, \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
        unicodes_char_index_, unicodes_char_next_, macintosh_name_,          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
        adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_)     \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  static const FT_Service_PsCMapsRec class_ =                                \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  {                                                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
    unicode_value_, unicodes_init_,                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
    unicodes_char_index_, unicodes_char_next_, macintosh_name_,              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
    adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  };
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
#else /* FT_CONFIG_OPTION_PIC */ 
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
#define FT_DEFINE_SERVICE_PSCMAPSREC(class_, unicode_value_, unicodes_init_, \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
        unicodes_char_index_, unicodes_char_next_, macintosh_name_,          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
        adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_)     \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  void                                                                       \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  FT_Init_Class_##class_( FT_Library library,                                \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
                          FT_Service_PsCMapsRec* clazz)                      \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
  {                                                                          \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
    FT_UNUSED(library);                                                      \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
    clazz->unicode_value = unicode_value_;                                   \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
    clazz->unicodes_init = unicodes_init_;                                   \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
    clazz->unicodes_char_index = unicodes_char_index_;                       \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
    clazz->unicodes_char_next = unicodes_char_next_;                         \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
    clazz->macintosh_name = macintosh_name_;                                 \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
    clazz->adobe_std_strings = adobe_std_strings_;                           \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
    clazz->adobe_std_encoding = adobe_std_encoding_;                         \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
    clazz->adobe_expert_encoding = adobe_expert_encoding_;                   \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
  } 
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
#endif /* FT_CONFIG_OPTION_PIC */ 
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
#endif /* __SVPSCMAP_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
/* END */