misc/libfreetype/src/type1/t1objs.c
author koda
Wed, 19 Dec 2012 18:17:23 +0100
changeset 8312 9e8781faabab
parent 5172 88f2e05288ba
permissions -rw-r--r--
can compile engine as library on linux but not run the executable (automatically), most likely breaking other platforms (wrt engine-as-library)
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
/*  t1objs.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
/*    Type 1 objects manager (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 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#include FT_INTERNAL_CALC_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
#include FT_INTERNAL_DEBUG_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
#include FT_INTERNAL_STREAM_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
#include FT_TRUETYPE_IDS_H
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
#include "t1gload.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
#include "t1load.h"
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
#include "t1errors.h"
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
#ifndef T1_CONFIG_OPTION_NO_AFM
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
#include "t1afm.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
#endif
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
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
#include FT_INTERNAL_POSTSCRIPT_AUX_H
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
  /*************************************************************************/
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
  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
  /* messages during execution.                                            */
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
#undef  FT_COMPONENT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
#define FT_COMPONENT  trace_t1objs
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
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
  /*                            SIZE FUNCTIONS                             */
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
  /*  note that we store the global hints in the size's "internal" root    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  /*  field                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  /*                                                                       */
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 PSH_Globals_Funcs
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  T1_Size_Get_Globals_Funcs( T1_Size  size )
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
    T1_Face           face     = (T1_Face)size->root.face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
    PSHinter_Service  pshinter = (PSHinter_Service)face->pshinter;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
    FT_Module         module;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
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
    module = FT_Get_Module( size->root.face->driver->root.library,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
                            "pshinter" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
    return ( module && pshinter && pshinter->get_globals_funcs )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
           ? pshinter->get_globals_funcs( module )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
           : 0 ;
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
  FT_LOCAL_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
  T1_Size_Done( T1_Size  size )
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
    if ( size->root.internal )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
      PSH_Globals_Funcs  funcs;
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
      funcs = T1_Size_Get_Globals_Funcs( size );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
      if ( funcs )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
        funcs->destroy( (PSH_Globals)size->root.internal );
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
      size->root.internal = 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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  FT_LOCAL_DEF( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
  T1_Size_Init( T1_Size  size )
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
    FT_Error           error = T1_Err_Ok;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
    PSH_Globals_Funcs  funcs = T1_Size_Get_Globals_Funcs( size );
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
    if ( funcs )
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
      PSH_Globals  globals;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
      T1_Face      face = (T1_Face)size->root.face;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
      error = funcs->create( size->root.face->memory,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
                             &face->type1.private_dict, &globals );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
      if ( !error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
        size->root.internal = (FT_Size_Internal)(void*)globals;
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
    return error;
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
  FT_LOCAL_DEF( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  T1_Size_Request( T1_Size          size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
                   FT_Size_Request  req )
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
    PSH_Globals_Funcs  funcs = T1_Size_Get_Globals_Funcs( size );
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
    FT_Request_Metrics( size->root.face, req );
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
    if ( funcs )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
      funcs->set_scale( (PSH_Globals)size->root.internal,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
                        size->root.metrics.x_scale,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
                        size->root.metrics.y_scale,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
                        0, 0 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
    return T1_Err_Ok;
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
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
  /*                            SLOT  FUNCTIONS                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  /*                                                                       */
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  FT_LOCAL_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  T1_GlyphSlot_Done( T1_GlyphSlot  slot )
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
    slot->root.internal->glyph_hints = 0;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  FT_LOCAL_DEF( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  T1_GlyphSlot_Init( T1_GlyphSlot  slot )
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
    T1_Face           face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
    PSHinter_Service  pshinter;
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
    face     = (T1_Face)slot->root.face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
    pshinter = (PSHinter_Service)face->pshinter;
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
    if ( pshinter )
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_Module  module;
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
      module = FT_Get_Module( slot->root.face->driver->root.library, "pshinter" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
      if (module)
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
        T1_Hints_Funcs  funcs;
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
        funcs = pshinter->get_t1_funcs( module );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
        slot->root.internal->glyph_hints = (void*)funcs;
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
    return 0;
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
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
  /*                            FACE  FUNCTIONS                            */
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
  /*************************************************************************/
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
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
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
  /*    T1_Face_Done                                                       */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
  /*    The face object destructor.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
  /*    face :: A typeless pointer to the face object to destroy.          */
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
  FT_LOCAL_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
  T1_Face_Done( T1_Face  face )
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
    FT_Memory  memory;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
    T1_Font    type1;
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
    if ( !face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
      return;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
    memory = face->root.memory;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
    type1  = &face->type1;
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
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
    /* release multiple masters information */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
    FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );
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
    if ( face->buildchar )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
      FT_FREE( face->buildchar );
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
      face->buildchar     = NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
      face->len_buildchar = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
    T1_Done_Blend( face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
    face->blend = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
    /* release font info strings */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
      PS_FontInfo  info = &type1->font_info;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
      FT_FREE( info->version );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
      FT_FREE( info->notice );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
      FT_FREE( info->full_name );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
      FT_FREE( info->family_name );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
      FT_FREE( info->weight );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
    /* release top dictionary */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
    FT_FREE( type1->charstrings_len );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
    FT_FREE( type1->charstrings );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
    FT_FREE( type1->glyph_names );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
    FT_FREE( type1->subrs );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
    FT_FREE( type1->subrs_len );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
    FT_FREE( type1->subrs_block );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
    FT_FREE( type1->charstrings_block );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
    FT_FREE( type1->glyph_names_block );
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
    FT_FREE( type1->encoding.char_index );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
    FT_FREE( type1->encoding.char_name );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
    FT_FREE( type1->font_name );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
#ifndef T1_CONFIG_OPTION_NO_AFM
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
    /* release afm data if present */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
    if ( face->afm_data )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
      T1_Done_Metrics( memory, (AFM_FontInfo)face->afm_data );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
    /* release unicode map, if any */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
#if 0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
    FT_FREE( face->unicode_map_rec.maps );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
    face->unicode_map_rec.num_maps = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
    face->unicode_map              = NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
    face->root.family_name = NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
    face->root.style_name  = NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
  /*    T1_Face_Init                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
  /*    The face object constructor.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
  /*    stream     ::  input stream where to load font data.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
  /*    face_index :: The index of the font face in the resource.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
  /*    num_params :: Number of additional generic parameters.  Ignored.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
  /*    params     :: Additional generic parameters.  Ignored.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
  /*    face       :: The face record to build.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
  /*    FreeType error code.  0 means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
  FT_LOCAL_DEF( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
  T1_Face_Init( FT_Stream      stream,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
                T1_Face        face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
                FT_Int         face_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
                FT_Int         num_params,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
                FT_Parameter*  params )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
    FT_Error            error;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
    FT_Service_PsCMaps  psnames;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
    PSAux_Service       psaux;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
    T1_Font             type1 = &face->type1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
    PS_FontInfo         info = &type1->font_info;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
    FT_UNUSED( num_params );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
    FT_UNUSED( params );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
    FT_UNUSED( stream );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
    face->root.num_faces = 1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
    FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
    face->psnames = psnames;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
    face->psaux = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
                                           "psaux" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
    psaux = (PSAux_Service)face->psaux;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
    face->pshinter = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
                                              "pshinter" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
    /* open the tokenizer; this will also check the font format */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
    error = T1_Open_Face( face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
    if ( error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
      goto Exit;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
    /* if we just wanted to check the format, leave successfully now */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
    if ( face_index < 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
      goto Exit;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
    /* check the face index */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
    if ( face_index > 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
      FT_ERROR(( "T1_Face_Init: invalid face index\n" ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
      error = T1_Err_Invalid_Argument;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
      goto Exit;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
    /* now load the font program into the face object */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
    /* initialize the face object fields */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
    /* set up root face fields */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
      FT_Face  root = (FT_Face)&face->root;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
      root->num_glyphs = type1->num_glyphs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
      root->face_index = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
      root->face_flags = FT_FACE_FLAG_SCALABLE    |
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
                         FT_FACE_FLAG_HORIZONTAL  |
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
                         FT_FACE_FLAG_GLYPH_NAMES |
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   352
                         FT_FACE_FLAG_HINTER;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   353
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
      if ( info->is_fixed_pitch )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
        root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
      if ( face->blend )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
        root->face_flags |= FT_FACE_FLAG_MULTIPLE_MASTERS;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
      /* XXX: TODO -- add kerning with .afm support */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   362
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   363
      /* The following code to extract the family and the style is very   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
      /* simplistic and might get some things wrong.  For a full-featured */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   365
      /* algorithm you might have a look at the whitepaper given at       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   366
      /*                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   367
      /*   http://blogs.msdn.com/text/archive/2007/04/23/wpf-font-selection-model.aspx */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   368
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
      /* get style name -- be careful, some broken fonts only */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   370
      /* have a `/FontName' dictionary entry!                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   371
      root->family_name = info->family_name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
      root->style_name  = NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   373
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   374
      if ( root->family_name )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   375
      {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   376
        char*  full   = info->full_name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
        char*  family = root->family_name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   380
        if ( full )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   381
        {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
          FT_Bool  the_same = TRUE;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   383
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   384
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
          while ( *full )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
          {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
            if ( *full == *family )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
            {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   389
              family++;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   390
              full++;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   391
            }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   392
            else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   393
            {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   394
              if ( *full == ' ' || *full == '-' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   395
                full++;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   396
              else if ( *family == ' ' || *family == '-' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   397
                family++;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   398
              else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   399
              {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
                the_same = FALSE;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   401
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   402
                if ( !*family )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   403
                  root->style_name = full;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
                break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   405
              }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   406
            }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   407
          }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   408
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   409
          if ( the_same )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
            root->style_name = (char *)"Regular";
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
        }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   412
      }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   413
      else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   414
      {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
        /* do we have a `/FontName'? */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
        if ( type1->font_name )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   417
          root->family_name = type1->font_name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   418
      }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
      if ( !root->style_name )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
      {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   422
        if ( info->weight )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   423
          root->style_name = info->weight;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   424
        else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   425
          /* assume `Regular' style because we don't know better */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   426
          root->style_name = (char *)"Regular";
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   427
      }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   428
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   429
      /* compute style flags */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   430
      root->style_flags = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   431
      if ( info->italic_angle )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   432
        root->style_flags |= FT_STYLE_FLAG_ITALIC;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   433
      if ( info->weight )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   434
      {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   435
        if ( !ft_strcmp( info->weight, "Bold"  ) ||
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   436
             !ft_strcmp( info->weight, "Black" ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   437
          root->style_flags |= FT_STYLE_FLAG_BOLD;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   438
      }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   439
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   440
      /* no embedded bitmap support */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   441
      root->num_fixed_sizes = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   442
      root->available_sizes = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   443
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   444
      root->bbox.xMin =   type1->font_bbox.xMin            >> 16;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   445
      root->bbox.yMin =   type1->font_bbox.yMin            >> 16;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   446
      /* no `U' suffix here to 0xFFFF! */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   447
      root->bbox.xMax = ( type1->font_bbox.xMax + 0xFFFF ) >> 16;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   448
      root->bbox.yMax = ( type1->font_bbox.yMax + 0xFFFF ) >> 16;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   449
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   450
      /* Set units_per_EM if we didn't set it in parse_font_matrix. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   451
      if ( !root->units_per_EM )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   452
        root->units_per_EM = 1000;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   453
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   454
      root->ascender  = (FT_Short)( root->bbox.yMax );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   455
      root->descender = (FT_Short)( root->bbox.yMin );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   456
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   457
      root->height = (FT_Short)( ( root->units_per_EM * 12 ) / 10 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   458
      if ( root->height < root->ascender - root->descender )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   459
        root->height = (FT_Short)( root->ascender - root->descender );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   460
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   461
      /* now compute the maximum advance width */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   462
      root->max_advance_width =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   463
        (FT_Short)( root->bbox.xMax );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   464
      {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   465
        FT_Pos  max_advance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   466
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   467
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   468
        error = T1_Compute_Max_Advance( face, &max_advance );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   469
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   470
        /* in case of error, keep the standard width */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   471
        if ( !error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   472
          root->max_advance_width = (FT_Short)FIXED_TO_INT( max_advance );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   473
        else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   474
          error = T1_Err_Ok;   /* clear error */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   475
      }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   476
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   477
      root->max_advance_height = root->height;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   478
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   479
      root->underline_position  = (FT_Short)info->underline_position;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   480
      root->underline_thickness = (FT_Short)info->underline_thickness;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   481
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   482
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   483
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   484
      FT_Face  root = &face->root;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   485
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   486
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   487
      if ( psnames && psaux )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   488
      {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   489
        FT_CharMapRec    charmap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   490
        T1_CMap_Classes  cmap_classes = psaux->t1_cmap_classes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   491
        FT_CMap_Class    clazz;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   492
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   493
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   494
        charmap.face = root;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   495
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   496
        /* first of all, try to synthesize a Unicode charmap */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   497
        charmap.platform_id = TT_PLATFORM_MICROSOFT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   498
        charmap.encoding_id = TT_MS_ID_UNICODE_CS;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   499
        charmap.encoding    = FT_ENCODING_UNICODE;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   500
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   501
        error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   502
        if ( error && FT_Err_No_Unicode_Glyph_Name != error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   503
          goto Exit;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   504
        error = FT_Err_Ok;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   505
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   506
        /* now, generate an Adobe Standard encoding when appropriate */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   507
        charmap.platform_id = TT_PLATFORM_ADOBE;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   508
        clazz               = NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   509
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   510
        switch ( type1->encoding_type )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   511
        {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   512
        case T1_ENCODING_TYPE_STANDARD:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   513
          charmap.encoding    = FT_ENCODING_ADOBE_STANDARD;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   514
          charmap.encoding_id = TT_ADOBE_ID_STANDARD;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   515
          clazz               = cmap_classes->standard;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   516
          break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   517
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   518
        case T1_ENCODING_TYPE_EXPERT:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   519
          charmap.encoding    = FT_ENCODING_ADOBE_EXPERT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   520
          charmap.encoding_id = TT_ADOBE_ID_EXPERT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   521
          clazz               = cmap_classes->expert;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   522
          break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   523
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   524
        case T1_ENCODING_TYPE_ARRAY:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   525
          charmap.encoding    = FT_ENCODING_ADOBE_CUSTOM;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   526
          charmap.encoding_id = TT_ADOBE_ID_CUSTOM;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   527
          clazz               = cmap_classes->custom;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   528
          break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   529
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   530
        case T1_ENCODING_TYPE_ISOLATIN1:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   531
          charmap.encoding    = FT_ENCODING_ADOBE_LATIN_1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   532
          charmap.encoding_id = TT_ADOBE_ID_LATIN_1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   533
          clazz               = cmap_classes->unicode;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   534
          break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   535
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   536
        default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   537
          ;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   538
        }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   539
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   540
        if ( clazz )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   541
          error = FT_CMap_New( clazz, NULL, &charmap, NULL );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   542
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   543
#if 0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   544
        /* Select default charmap */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   545
        if (root->num_charmaps)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   546
          root->charmap = root->charmaps[0];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   547
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   548
      }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   549
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   550
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   551
  Exit:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   552
    return error;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   553
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   554
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   555
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   556
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   557
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   558
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   559
  /*    T1_Driver_Init                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   560
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   561
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   562
  /*    Initializes a given Type 1 driver object.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   563
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   564
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   565
  /*    driver :: A handle to the target driver object.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   566
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   567
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   568
  /*    FreeType error code.  0 means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   569
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   570
  FT_LOCAL_DEF( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   571
  T1_Driver_Init( T1_Driver  driver )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   572
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   573
    FT_UNUSED( driver );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   574
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   575
    return T1_Err_Ok;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   576
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   577
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   578
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   579
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   580
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   581
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   582
  /*    T1_Driver_Done                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   583
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   584
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   585
  /*    Finalizes a given Type 1 driver.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   586
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   587
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   588
  /*    driver :: A handle to the target Type 1 driver.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   589
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   590
  FT_LOCAL_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   591
  T1_Driver_Done( T1_Driver  driver )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   592
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   593
    FT_UNUSED( driver );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   594
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   595
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   596
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   597
/* END */