misc/libfreetype/src/cff/cffcmap.c
author unc0rr
Sat, 06 Oct 2012 01:09:41 +0400
changeset 7723 ca05b576ec74
parent 5172 88f2e05288ba
permissions -rw-r--r--
Start moving to players list model.
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
/*  cffcmap.c                                                              */
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
/*    CFF character mapping table (cmap) support (body).                   */
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 2002, 2003, 2004, 2005, 2006, 2007, 2010 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
#include "cffcmap.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#include "cffload.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 "cfferrs.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
  /*************************************************************************/
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
  /*****           CFF STANDARD (AND EXPERT) ENCODING 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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
  FT_CALLBACK_DEF( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  cff_cmap_encoding_init( CFF_CMapStd  cmap )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
    TT_Face       face     = (TT_Face)FT_CMAP_FACE( cmap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
    CFF_Font      cff      = (CFF_Font)face->extra.data;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
    CFF_Encoding  encoding = &cff->encoding;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
    cmap->gids  = encoding->codes;
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
    return 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  }
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  FT_CALLBACK_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  cff_cmap_encoding_done( CFF_CMapStd  cmap )
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
    cmap->gids  = NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
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
  FT_CALLBACK_DEF( FT_UInt )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  cff_cmap_encoding_char_index( CFF_CMapStd  cmap,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
                                FT_UInt32    char_code )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
    FT_UInt  result = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
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
    if ( char_code < 256 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
      result = cmap->gids[char_code];
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
    return result;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
  FT_CALLBACK_DEF( FT_UInt32 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  cff_cmap_encoding_char_next( CFF_CMapStd   cmap,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
                               FT_UInt32    *pchar_code )
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
    FT_UInt    result    = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
    FT_UInt32  char_code = *pchar_code;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
    *pchar_code = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
    if ( char_code < 255 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
      FT_UInt  code = (FT_UInt)(char_code + 1);
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
      for (;;)
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
        if ( code >= 256 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
          break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
        result = cmap->gids[code];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
        if ( result != 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
        {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
          *pchar_code = code;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
          break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
        }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
        code++;
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
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
    return result;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
  }
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  FT_DEFINE_CMAP_CLASS(cff_cmap_encoding_class_rec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
    sizeof ( CFF_CMapStdRec ),
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
    (FT_CMap_InitFunc)     cff_cmap_encoding_init,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
    (FT_CMap_DoneFunc)     cff_cmap_encoding_done,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
    (FT_CMap_CharIndexFunc)cff_cmap_encoding_char_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
    (FT_CMap_CharNextFunc) cff_cmap_encoding_char_next,
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
    NULL, NULL, NULL, NULL, NULL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
  )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
  /*****              CFF SYNTHETIC UNICODE ENCODING CMAP              *****/
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
  FT_CALLBACK_DEF( const char* )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
  cff_sid_to_glyph_name( TT_Face  face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
                         FT_UInt  idx )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
    CFF_Font     cff     = (CFF_Font)face->extra.data;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
    CFF_Charset  charset = &cff->charset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
    FT_UInt      sid     = charset->sids[idx];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
    return cff_index_get_sid_string( cff, sid );
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
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
  FT_CALLBACK_DEF( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  cff_cmap_unicode_init( PS_Unicodes  unicodes )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
    TT_Face             face    = (TT_Face)FT_CMAP_FACE( unicodes );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
    FT_Memory           memory  = FT_FACE_MEMORY( face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
    CFF_Font            cff     = (CFF_Font)face->extra.data;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
    CFF_Charset         charset = &cff->charset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)cff->psnames;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
    /* can't build Unicode map for CID-keyed font */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
    /* because we don't know glyph names.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
    if ( !charset->sids )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
      return CFF_Err_No_Unicode_Glyph_Name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
    return psnames->unicodes_init( memory,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
                                   unicodes,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
                                   cff->num_glyphs,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
                                   (PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
                                   (PS_FreeGlyphNameFunc)NULL,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
                                   (FT_Pointer)face );
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
  FT_CALLBACK_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
  cff_cmap_unicode_done( PS_Unicodes  unicodes )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
    FT_Face    face   = FT_CMAP_FACE( unicodes );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
    FT_Memory  memory = FT_FACE_MEMORY( face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
    FT_FREE( unicodes->maps );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
    unicodes->num_maps = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
  FT_CALLBACK_DEF( FT_UInt )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
  cff_cmap_unicode_char_index( PS_Unicodes  unicodes,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
                               FT_UInt32    char_code )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
    TT_Face             face    = (TT_Face)FT_CMAP_FACE( unicodes );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
    CFF_Font            cff     = (CFF_Font)face->extra.data;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)cff->psnames;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
    return psnames->unicodes_char_index( unicodes, char_code );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
  FT_CALLBACK_DEF( FT_UInt32 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
  cff_cmap_unicode_char_next( PS_Unicodes  unicodes,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
                              FT_UInt32   *pchar_code )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
    TT_Face             face    = (TT_Face)FT_CMAP_FACE( unicodes );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
    CFF_Font            cff     = (CFF_Font)face->extra.data;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
    FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)cff->psnames;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
    return psnames->unicodes_char_next( unicodes, pchar_code );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
  FT_DEFINE_CMAP_CLASS(cff_cmap_unicode_class_rec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
    sizeof ( PS_UnicodesRec ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
    (FT_CMap_InitFunc)     cff_cmap_unicode_init,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
    (FT_CMap_DoneFunc)     cff_cmap_unicode_done,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
    (FT_CMap_CharIndexFunc)cff_cmap_unicode_char_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
    (FT_CMap_CharNextFunc) cff_cmap_unicode_char_next,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
    NULL, NULL, NULL, NULL, NULL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
  )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
/* END */