2000-05-29 22:55:13 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
2000-06-12 21:36:41 +02:00
|
|
|
/* t2objs.c */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* */
|
2000-06-12 21:36:41 +02:00
|
|
|
/* OpenType objects manager (body). */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* */
|
2000-06-12 21:36:41 +02:00
|
|
|
/* Copyright 1996-2000 by */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
2000-06-12 21:36:41 +02:00
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#include <freetype/internal/ftdebug.h>
|
|
|
|
#include <freetype/internal/ftcalc.h>
|
|
|
|
#include <freetype/internal/ftstream.h>
|
2000-07-08 02:41:13 +02:00
|
|
|
#include <freetype/fterrors.h>
|
2000-05-29 22:55:13 +02:00
|
|
|
#include <freetype/ttnameid.h>
|
|
|
|
#include <freetype/tttags.h>
|
|
|
|
|
|
|
|
#include <freetype/internal/sfnt.h>
|
|
|
|
#include <freetype/internal/psnames.h>
|
|
|
|
|
2000-07-08 02:41:13 +02:00
|
|
|
#ifdef FT_FLAT_COMPILE
|
|
|
|
#include "t2objs.h"
|
|
|
|
#include "t2load.h"
|
|
|
|
#else
|
|
|
|
#include <cff/t2objs.h>
|
|
|
|
#include <cff/t2load.h>
|
|
|
|
#endif
|
|
|
|
|
2000-06-07 06:48:12 +02:00
|
|
|
#include <freetype/internal/t2errors.h>
|
2000-05-29 22:55:13 +02:00
|
|
|
|
2000-06-12 21:36:41 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
|
|
|
|
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
|
|
|
|
/* messages during execution. */
|
|
|
|
/* */
|
|
|
|
#undef FT_COMPONENT
|
|
|
|
#define FT_COMPONENT trace_t2objs
|
2000-05-29 22:55:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
2000-06-16 08:49:56 +02:00
|
|
|
/* FACE FUNCTIONS */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-07-08 02:41:13 +02:00
|
|
|
static
|
|
|
|
FT_String* T2_StrCopy( FT_Memory memory, const FT_String* source )
|
|
|
|
{
|
|
|
|
FT_Error error;
|
|
|
|
FT_String* result = 0;
|
|
|
|
FT_Int len = (FT_Int)strlen(source);
|
|
|
|
|
|
|
|
if ( !ALLOC( result, len+1 ) )
|
|
|
|
{
|
|
|
|
MEM_Copy( result, source, len );
|
|
|
|
result[len] = 0;
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* this function is used to build a Unicode charmap from the glyph names */
|
|
|
|
/* in a file.. */
|
|
|
|
static
|
|
|
|
FT_Error CFF_Build_Unicode_Charmap( T2_Face face,
|
|
|
|
FT_ULong base_offset,
|
|
|
|
PSNames_Interface* psnames )
|
|
|
|
{
|
|
|
|
CFF_Font* font = (CFF_Font*)face->extra.data;
|
|
|
|
FT_Memory memory = FT_FACE_MEMORY(face);
|
|
|
|
FT_UInt n, num_glyphs = face->root.num_glyphs;
|
|
|
|
const char** glyph_names;
|
|
|
|
FT_Error error;
|
|
|
|
CFF_Font_Dict* dict = &font->top_font.font_dict;
|
|
|
|
FT_ULong charset_offset;
|
|
|
|
FT_Byte format;
|
|
|
|
FT_Stream stream = face->root.stream;
|
|
|
|
|
|
|
|
charset_offset = dict->charset_offset;
|
|
|
|
if (!charset_offset)
|
|
|
|
{
|
|
|
|
FT_ERROR(( "CFF.Build_Unicode_Charmap: charset table is missing\n" ));
|
|
|
|
error = FT_Err_Invalid_File_Format;
|
|
|
|
goto Exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* seek to charset table and allocate glyph names table */
|
|
|
|
if ( FILE_Seek( base_offset + charset_offset ) ||
|
|
|
|
ALLOC_ARRAY( glyph_names, num_glyphs, const char* ) )
|
|
|
|
goto Exit;
|
|
|
|
|
|
|
|
/* now, read each glyph name and store it in the glyph name table */
|
|
|
|
if ( READ_Byte(format) )
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
switch (format)
|
|
|
|
{
|
|
|
|
case 0: /* format 0 - one SID per glyph */
|
|
|
|
{
|
|
|
|
const char** gname = glyph_names;
|
|
|
|
const char** limit = gname + num_glyphs;
|
|
|
|
|
|
|
|
if ( ACCESS_Frame( num_glyphs*2 ) )
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
for ( ; gname < limit; gname++ )
|
|
|
|
gname[0] = T2_Get_String( &font->string_index,
|
|
|
|
GET_UShort(),
|
|
|
|
psnames );
|
|
|
|
FORGET_Frame();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case 1: /* format 1 - sequential ranges */
|
|
|
|
case 2: /* format 2 - sequential ranges with 16-bit counts */
|
|
|
|
{
|
|
|
|
const char** gname = glyph_names;
|
|
|
|
const char** limit = gname + num_glyphs;
|
|
|
|
FT_UInt len = 3;
|
|
|
|
|
|
|
|
if (format == 2)
|
|
|
|
len++;
|
|
|
|
|
|
|
|
while (gname < limit)
|
|
|
|
{
|
|
|
|
FT_UInt first;
|
|
|
|
FT_UInt count;
|
|
|
|
|
|
|
|
if ( ACCESS_Frame( len ) )
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
first = GET_UShort();
|
|
|
|
if (format == 3)
|
|
|
|
count = GET_UShort();
|
|
|
|
else
|
|
|
|
count = GET_Byte();
|
2000-05-29 22:55:13 +02:00
|
|
|
|
2000-07-08 02:41:13 +02:00
|
|
|
FORGET_Frame();
|
|
|
|
|
|
|
|
for ( ; count > 0; count-- )
|
|
|
|
{
|
|
|
|
gname[0] = T2_Get_String( &font->string_index,
|
|
|
|
first,
|
|
|
|
psnames );
|
|
|
|
gname++;
|
|
|
|
first++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
default: /* unknown charset format !! */
|
|
|
|
FT_ERROR(( "CFF: unknown charset format !!\n" ));
|
|
|
|
error = FT_Err_Invalid_File_Format;
|
|
|
|
goto Fail;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* all right, the glyph names were loaded, we now need to create */
|
|
|
|
/* the corresponding unicode charmap.. */
|
|
|
|
|
|
|
|
Fail:
|
|
|
|
for ( n = 0; n < num_glyphs; n++ )
|
|
|
|
FREE( glyph_names[n] );
|
|
|
|
|
|
|
|
FREE( glyph_names );
|
|
|
|
|
|
|
|
Exit:
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
2000-05-29 22:55:13 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* T2_Init_Face */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-06-14 01:21:00 +02:00
|
|
|
/* Initializes a given OpenType face object. */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-06-14 01:21:00 +02:00
|
|
|
/* stream :: The source font stream. */
|
|
|
|
/* */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* face_index :: The index of the font face in the resource. */
|
2000-06-14 01:21:00 +02:00
|
|
|
/* */
|
|
|
|
/* num_params :: Number of additional generic parameters. Ignored. */
|
|
|
|
/* */
|
|
|
|
/* params :: Additional generic parameters. Ignored. */
|
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* face :: The newly built face object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2000-06-25 08:47:11 +02:00
|
|
|
/* FreeType error code. 0 means success. */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* */
|
|
|
|
LOCAL_DEF
|
|
|
|
FT_Error T2_Init_Face( FT_Stream stream,
|
|
|
|
T2_Face face,
|
|
|
|
FT_Int face_index,
|
|
|
|
FT_Int num_params,
|
|
|
|
FT_Parameter* params )
|
|
|
|
{
|
2000-07-08 02:41:13 +02:00
|
|
|
FT_Error error;
|
|
|
|
SFNT_Interface* sfnt;
|
|
|
|
PSNames_Interface* psnames;
|
|
|
|
FT_Bool pure_cff = 1;
|
|
|
|
FT_Bool sfnt_format = 0;
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-06-25 08:47:11 +02:00
|
|
|
sfnt = (SFNT_Interface*)FT_Get_Module_Interface(
|
|
|
|
face->root.driver->root.library, "sfnt" );
|
|
|
|
if ( !sfnt )
|
|
|
|
goto Bad_Format;
|
2000-05-29 22:55:13 +02:00
|
|
|
|
2000-07-08 02:41:13 +02:00
|
|
|
psnames = (PSNames_Interface*)FT_Get_Module_Interface(
|
|
|
|
face->root.driver->root.library, "psnames" );
|
|
|
|
|
2000-05-29 22:55:13 +02:00
|
|
|
/* create input stream from resource */
|
2000-06-14 01:21:00 +02:00
|
|
|
if ( FILE_Seek( 0 ) )
|
2000-05-29 22:55:13 +02:00
|
|
|
goto Exit;
|
|
|
|
|
2000-06-14 01:21:00 +02:00
|
|
|
/* check that we have a valid OpenType file */
|
2000-05-29 22:55:13 +02:00
|
|
|
error = sfnt->init_face( stream, face, face_index, num_params, params );
|
2000-07-08 02:41:13 +02:00
|
|
|
if ( !error )
|
2000-05-29 22:55:13 +02:00
|
|
|
{
|
2000-07-08 02:41:13 +02:00
|
|
|
if ( face->format_tag != 0x4F54544FL ) /* `OTTO'; OpenType/CFF font */
|
|
|
|
{
|
|
|
|
FT_TRACE2(( "[not a valid OpenType/CFF font]\n" ));
|
|
|
|
goto Bad_Format;
|
|
|
|
}
|
2000-05-29 22:55:13 +02:00
|
|
|
|
2000-07-08 02:41:13 +02:00
|
|
|
/* If we are performing a simple font format check, exit immediately */
|
|
|
|
if ( face_index < 0 )
|
|
|
|
return T2_Err_Ok;
|
2000-05-29 22:55:13 +02:00
|
|
|
|
2000-07-08 02:41:13 +02:00
|
|
|
sfnt_format = 1;
|
|
|
|
|
|
|
|
/* now, the font can be either an OpenType/CFF font, or a SVG CEF font */
|
|
|
|
/* in the later case, it doesn't have a "head" table.. */
|
|
|
|
error = face->goto_table( face, TTAG_head, stream, 0 );
|
|
|
|
if (!error)
|
|
|
|
{
|
|
|
|
pure_cff = 0;
|
|
|
|
|
|
|
|
/* Load font directory */
|
|
|
|
error = sfnt->load_face( stream, face, face_index, num_params, params );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* load the "cmap" table by hand */
|
|
|
|
error = sfnt->load_charmaps( face, stream );
|
|
|
|
if (error)
|
|
|
|
goto Exit;
|
|
|
|
|
|
|
|
/* XXX: for now, we don't load the GPOS table, as OpenType Layout */
|
|
|
|
/* support will be added later to FreeType 2 as a separate module */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* now, load the CFF part of the file */
|
|
|
|
error = face->goto_table( face, TTAG_CFF, stream, 0 );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* rewind to start of file, we're going to load a pure-CFF font */
|
|
|
|
(void)FILE_Seek(0);
|
|
|
|
error = FT_Err_Ok;
|
|
|
|
}
|
2000-05-29 22:55:13 +02:00
|
|
|
|
2000-05-30 01:03:15 +02:00
|
|
|
|
2000-07-08 02:41:13 +02:00
|
|
|
/* now load and parse the CFF table in the file */
|
2000-05-30 01:03:15 +02:00
|
|
|
{
|
|
|
|
CFF_Font* cff;
|
|
|
|
FT_Memory memory = face->root.memory;
|
2000-06-07 22:04:34 +02:00
|
|
|
FT_Face root;
|
2000-07-08 02:41:13 +02:00
|
|
|
FT_UInt flags;
|
2000-06-14 01:21:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
if ( ALLOC( cff, sizeof ( *cff ) ) )
|
2000-05-30 01:03:15 +02:00
|
|
|
goto Exit;
|
2000-06-14 01:21:00 +02:00
|
|
|
|
2000-06-25 06:49:19 +02:00
|
|
|
face->extra.data = cff;
|
2000-05-30 01:03:15 +02:00
|
|
|
error = T2_Load_CFF_Font( stream, face_index, cff );
|
2000-06-14 01:21:00 +02:00
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
2000-06-07 22:04:34 +02:00
|
|
|
|
2000-06-14 01:21:00 +02:00
|
|
|
/* Complement the root flags with some interesting information. */
|
2000-07-08 02:41:13 +02:00
|
|
|
/* Note that this is only necessary for pure CFF and CEF fonts */
|
|
|
|
|
2000-06-07 22:04:34 +02:00
|
|
|
root = &face->root;
|
2000-07-08 02:41:13 +02:00
|
|
|
if (pure_cff)
|
|
|
|
{
|
|
|
|
CFF_Font_Dict* dict = &cff->top_font.font_dict;
|
|
|
|
|
|
|
|
/* we need the psnames module for pure-CFF and CEF formats */
|
|
|
|
if (!psnames)
|
|
|
|
{
|
|
|
|
FT_ERROR(( "cannot open CFF & CEF fonts without the 'psnames' module\n" ));
|
|
|
|
goto Bad_Format;
|
|
|
|
}
|
|
|
|
|
2000-07-08 03:49:28 +02:00
|
|
|
/* compute number of glyphs */
|
|
|
|
if (dict->cid_registry)
|
|
|
|
root->num_glyphs = dict->cid_count;
|
|
|
|
else
|
|
|
|
root->num_glyphs = cff->charstrings_index.count;
|
|
|
|
|
|
|
|
/* set global bbox, as well as EM size */
|
|
|
|
root->units_per_EM = FT_DivFix( 1000L << 16, dict->font_matrix.yy ) >> 16;
|
|
|
|
root->bbox = dict->font_bbox;
|
|
|
|
root->ascender = root->bbox.yMax;
|
|
|
|
root->descender = root->bbox.yMin;
|
|
|
|
|
2000-07-08 02:41:13 +02:00
|
|
|
/* retrieve font family & style name */
|
2000-07-08 03:49:28 +02:00
|
|
|
root->family_name = T2_Get_Name( &cff->name_index, face_index );
|
2000-07-08 02:41:13 +02:00
|
|
|
if (dict->cid_registry)
|
|
|
|
{
|
|
|
|
root->style_name = T2_StrCopy( memory, "Regular" ); /* XXXX */
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
root->style_name = T2_Get_String( &cff->string_index,
|
|
|
|
dict->weight,
|
|
|
|
psnames );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************/
|
|
|
|
/* */
|
|
|
|
/* Compute face flags. */
|
|
|
|
/* */
|
|
|
|
flags = FT_FACE_FLAG_SCALABLE | /* scalable outlines */
|
|
|
|
FT_FACE_FLAG_HORIZONTAL; /* horizontal data */
|
|
|
|
|
|
|
|
if (sfnt_format)
|
|
|
|
flags |= FT_FACE_FLAG_SFNT;
|
|
|
|
|
|
|
|
/* fixed width font? */
|
|
|
|
if ( dict->is_fixed_pitch )
|
|
|
|
flags |= FT_FACE_FLAG_FIXED_WIDTH;
|
2000-05-30 01:03:15 +02:00
|
|
|
|
2000-07-08 02:41:13 +02:00
|
|
|
/* XXXX: WE DO NOT SUPPORT KERNING METRICS IN THE GPOS TABLE FOR NOW */
|
|
|
|
#if 0
|
|
|
|
/* kerning available ? */
|
|
|
|
if ( face->kern_pairs )
|
|
|
|
flags |= FT_FACE_FLAG_KERNING;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
root->face_flags = flags;
|
|
|
|
|
|
|
|
/*********************************************************************/
|
|
|
|
/* */
|
|
|
|
/* Compute style flags. */
|
|
|
|
/* */
|
|
|
|
flags = 0;
|
|
|
|
|
|
|
|
if ( dict->italic_angle )
|
|
|
|
flags |= FT_STYLE_FLAG_ITALIC;
|
|
|
|
|
|
|
|
/* XXXX : may not be correct .. */
|
|
|
|
if ( cff->top_font.private_dict.force_bold )
|
|
|
|
flags |= FT_STYLE_FLAG_BOLD;
|
|
|
|
|
|
|
|
root->style_flags = flags;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-05-29 22:55:13 +02:00
|
|
|
Exit:
|
|
|
|
return error;
|
2000-06-14 01:21:00 +02:00
|
|
|
|
|
|
|
Bad_Format:
|
2000-05-29 22:55:13 +02:00
|
|
|
error = FT_Err_Unknown_File_Format;
|
|
|
|
goto Exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* T2_Done_Face */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Finalizes a given face object. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A pointer to the face object to destroy. */
|
|
|
|
/* */
|
|
|
|
LOCAL_DEF
|
|
|
|
void T2_Done_Face( T2_Face face )
|
|
|
|
{
|
2000-06-30 08:21:26 +02:00
|
|
|
FT_Memory memory = face->root.memory;
|
2000-07-05 06:32:02 +02:00
|
|
|
SFNT_Interface* sfnt = (SFNT_Interface*)face->sfnt;
|
2000-05-30 01:03:15 +02:00
|
|
|
|
2000-05-29 22:55:13 +02:00
|
|
|
|
2000-06-14 01:21:00 +02:00
|
|
|
if ( sfnt )
|
|
|
|
sfnt->done_face( face );
|
2000-05-29 22:55:13 +02:00
|
|
|
|
2000-05-30 01:03:15 +02:00
|
|
|
{
|
2000-06-25 06:49:19 +02:00
|
|
|
CFF_Font* cff = (CFF_Font*)face->extra.data;
|
2000-06-14 01:21:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
if ( cff )
|
2000-05-30 01:03:15 +02:00
|
|
|
{
|
2000-06-14 01:21:00 +02:00
|
|
|
T2_Done_CFF_Font( cff );
|
2000-06-25 06:49:19 +02:00
|
|
|
FREE( face->extra.data );
|
2000-05-30 01:03:15 +02:00
|
|
|
}
|
2000-06-14 01:21:00 +02:00
|
|
|
}
|
2000-05-29 22:55:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* T2_Init_Driver */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Initializes a given OpenType driver object. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* driver :: A handle to the target driver object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2000-06-25 08:47:11 +02:00
|
|
|
/* FreeType error code. 0 means success. */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* */
|
|
|
|
LOCAL_FUNC
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_Error T2_Init_Driver( T2_Driver driver )
|
2000-05-29 22:55:13 +02:00
|
|
|
{
|
|
|
|
/* init extension registry if needed */
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-06-14 01:21:00 +02:00
|
|
|
#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-05-29 22:55:13 +02:00
|
|
|
return TT_Init_Extensions( driver );
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-05-29 22:55:13 +02:00
|
|
|
#else
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-07-04 20:12:13 +02:00
|
|
|
FT_UNUSED( driver );
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-06-14 01:21:00 +02:00
|
|
|
return T2_Err_Ok;
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-05-29 22:55:13 +02:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
2000-06-14 01:21:00 +02:00
|
|
|
/* T2_Done_Driver */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-06-14 01:21:00 +02:00
|
|
|
/* Finalizes a given OpenType driver. */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-06-14 01:21:00 +02:00
|
|
|
/* driver :: A handle to the target OpenType driver. */
|
2000-05-29 22:55:13 +02:00
|
|
|
/* */
|
|
|
|
LOCAL_FUNC
|
|
|
|
void T2_Done_Driver( T2_Driver driver )
|
|
|
|
{
|
|
|
|
/* destroy extensions registry if needed */
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-06-14 01:21:00 +02:00
|
|
|
#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-05-29 22:55:13 +02:00
|
|
|
TT_Done_Extensions( driver );
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-06-28 01:32:27 +02:00
|
|
|
#else
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-07-04 20:12:13 +02:00
|
|
|
FT_UNUSED( driver );
|
2000-06-30 08:21:26 +02:00
|
|
|
|
2000-05-29 22:55:13 +02:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|