misc/libfreetype/src/type42/t42drivr.c
author unc0rr
Sat, 24 Aug 2013 01:37:20 +0400
branch0.9.19
changeset 9142 0dceffbaa4ee
parent 5172 88f2e05288ba
permissions -rw-r--r--
Fix script flaw in detection of best team when sending achievement info
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
/*  t42drivr.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
/*    High-level Type 42 driver interface (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, 2006, 2007, 2009 by Roberto Alameda.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*  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
    10
/*  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
    11
/*  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
    12
/*  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
    13
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*                                                                         */
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
  /* This driver implements Type42 fonts as described in the               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
  /* Technical Note #5012 from Adobe, with these limitations:              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
  /* 1) CID Fonts are not currently supported.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
  /* 2) Incremental fonts making use of the GlyphDirectory keyword         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
  /*    will be loaded, but the rendering will be using the TrueType       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
  /*    tables.                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
  /* 3) As for Type1 fonts, CDevProc is not supported.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
  /* 4) The Metrics dictionary is not supported.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
  /* 5) AFM metrics are not supported.                                     */
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
  /* In other words, this driver supports Type42 fonts derived from        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
  /* TrueType fonts in a non-CID manner, as done by usual conversion       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
  /* programs.                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  /*                                                                       */
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
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
#include "t42drivr.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
#include "t42objs.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
#include "t42error.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
#include FT_INTERNAL_DEBUG_H
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
#include FT_SERVICE_XFREE86_NAME_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
#include FT_SERVICE_GLYPH_DICT_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
#include FT_SERVICE_POSTSCRIPT_NAME_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
#include FT_SERVICE_POSTSCRIPT_INFO_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
#undef  FT_COMPONENT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
#define FT_COMPONENT  trace_t42
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
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
   *  GLYPH DICT SERVICE
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
   */
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
  static FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  t42_get_glyph_name( T42_Face    face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
                      FT_UInt     glyph_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
                      FT_Pointer  buffer,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
                      FT_UInt     buffer_max )
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
    FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
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
    return T42_Err_Ok;
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
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
  static FT_UInt
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
  t42_get_name_index( T42_Face    face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
                      FT_String*  glyph_name )
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
    FT_Int      i;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
    FT_String*  gname;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
    for ( i = 0; i < face->type1.num_glyphs; i++ )
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
      gname = face->type1.glyph_names[i];
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
      if ( glyph_name[0] == gname[0] && !ft_strcmp( glyph_name, gname ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
        return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] );
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
    return 0;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  static const FT_Service_GlyphDictRec  t42_service_glyph_dict =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
    (FT_GlyphDict_GetNameFunc)  t42_get_glyph_name,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
    (FT_GlyphDict_NameIndexFunc)t42_get_name_index
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
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
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
   *  POSTSCRIPT NAME SERVICE
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
  static const char*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
  t42_get_ps_font_name( T42_Face  face )
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
    return (const char*)face->type1.font_name;
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
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
  static const FT_Service_PsFontNameRec  t42_service_ps_font_name =
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
    (FT_PsName_GetFunc)t42_get_ps_font_name
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
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
   *  POSTSCRIPT INFO SERVICE
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
  static FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
  t42_ps_get_font_info( FT_Face          face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
                        PS_FontInfoRec*  afont_info )
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
    *afont_info = ((T42_Face)face)->type1.font_info;
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
    return T42_Err_Ok;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  static FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  t42_ps_get_font_extra( FT_Face           face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
                         PS_FontExtraRec*  afont_extra )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
    *afont_extra = ((T42_Face)face)->type1.font_extra;
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
    return T42_Err_Ok;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
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
  static FT_Int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  t42_ps_has_glyph_names( FT_Face  face )
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
    FT_UNUSED( face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
    return 1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  }
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
  static FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
  t42_ps_get_font_private( FT_Face         face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
                           PS_PrivateRec*  afont_private )
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
    *afont_private = ((T42_Face)face)->type1.private_dict;
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
    return T42_Err_Ok;
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
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
  static const FT_Service_PsInfoRec  t42_service_ps_info =
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
    (PS_GetFontInfoFunc)   t42_ps_get_font_info,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
    (PS_GetFontExtraFunc)   t42_ps_get_font_extra,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
    (PS_HasGlyphNamesFunc) t42_ps_has_glyph_names,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
    (PS_GetFontPrivateFunc)t42_ps_get_font_private
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
  };
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
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
   *  SERVICE LIST
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
   *
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
  static const FT_ServiceDescRec  t42_services[] =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
    { FT_SERVICE_ID_GLYPH_DICT,           &t42_service_glyph_dict },
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
    { FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &t42_service_ps_font_name },
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
    { FT_SERVICE_ID_POSTSCRIPT_INFO,      &t42_service_ps_info },
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
    { FT_SERVICE_ID_XF86_NAME,            FT_XF86_FORMAT_TYPE_42 },
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
    { NULL, NULL }
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
  static FT_Module_Interface
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
  T42_Get_Interface( FT_Driver         driver,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
                     const FT_String*  t42_interface )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
    FT_UNUSED( driver );
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
    return ft_service_list_lookup( t42_services, t42_interface );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
  }
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
  const FT_Driver_ClassRec  t42_driver_class =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
      FT_MODULE_FONT_DRIVER       |
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
      FT_MODULE_DRIVER_SCALABLE   |
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
#ifdef TT_USE_BYTECODE_INTERPRETER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
      FT_MODULE_DRIVER_HAS_HINTER,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
      0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
#endif
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
      sizeof ( T42_DriverRec ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
      "type42",
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
      0x10000L,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
      0x20000L,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
      0,    /* format interface */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
      (FT_Module_Constructor)T42_Driver_Init,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
      (FT_Module_Destructor) T42_Driver_Done,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
      (FT_Module_Requester)  T42_Get_Interface,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
    },
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
    sizeof ( T42_FaceRec ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
    sizeof ( T42_SizeRec ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
    sizeof ( T42_GlyphSlotRec ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
    (FT_Face_InitFunc)        T42_Face_Init,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
    (FT_Face_DoneFunc)        T42_Face_Done,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
    (FT_Size_InitFunc)        T42_Size_Init,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
    (FT_Size_DoneFunc)        T42_Size_Done,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
    (FT_Slot_InitFunc)        T42_GlyphSlot_Init,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
    (FT_Slot_DoneFunc)        T42_GlyphSlot_Done,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
    ft_stub_set_char_sizes,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
    ft_stub_set_pixel_sizes,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
    (FT_Slot_LoadFunc)        T42_GlyphSlot_Load,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
    (FT_Face_GetKerningFunc)  0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
    (FT_Face_AttachFunc)      0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
    (FT_Face_GetAdvancesFunc) 0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
    (FT_Size_RequestFunc)     T42_Size_Request,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
    (FT_Size_SelectFunc)      T42_Size_Select
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
  };
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
/* END */