2000-10-12 07:05:40 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftcimage.c */
|
|
|
|
/* */
|
|
|
|
/* FreeType Image cache (body). */
|
|
|
|
/* */
|
2001-06-28 19:49:10 +02:00
|
|
|
/* Copyright 2000-2001 by */
|
2000-10-12 07:05:40 +02:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* 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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
2000-12-08 17:17:16 +01:00
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_CACHE_H
|
|
|
|
#include FT_CACHE_IMAGE_H
|
|
|
|
#include FT_INTERNAL_MEMORY_H
|
2000-09-19 03:11:11 +02:00
|
|
|
|
Complete redesign of error codes. Please check ftmoderr.h for more
details.
* include/freetype/internal/cfferrs.h,
include/freetype/internal/tterrors.h,
include/freetype/internal/t1errors.h: Removed. Replaced with files
local to the module. All extra error codes have been moved to
`fterrors.h'.
* src/sfnt/ttpost.h: Move error codes to `fterrors.h'.
* src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h,
src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h,
src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the
error names for the module it belongs to.
* include/freetype/ftmoderr.h: New file, defining the module error
offsets. Its structure is similar to `fterrors.h'.
* include/freetype/fterrors.h (FT_NOERRORDEF): New macro.
(FT_ERRORDEF): Redefined to use module error offsets.
All internal error codes are now public; unused error codes have
been removed, some are new.
* include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New
macro.
* include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro.
All other source files have been updated to use the new error codes;
some already existing (internal) error codes local to a module have
been renamed to give them the same name as in the base module.
All make files have been updated to include the local error files.
* src/cid/cidtokens.h: Replaced with...
* src/cid/cidtoken.h: This file for 8+3 consistency.
* src/raster/ftraster.c: Use macros for header file names.
2001-06-06 19:30:41 +02:00
|
|
|
#include "ftcerror.h"
|
|
|
|
|
2000-10-31 23:13:54 +01:00
|
|
|
#include <string.h> /* memcmp() */
|
2000-11-02 09:20:15 +01:00
|
|
|
#include <stdlib.h> /* labs() */
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-10-29 01:34:45 +02:00
|
|
|
|
2000-10-31 23:13:54 +01:00
|
|
|
/* the FT_Glyph image `glyph node' type */
|
2000-10-29 01:34:45 +02:00
|
|
|
typedef struct FTC_GlyphImageRec_
|
|
|
|
{
|
2000-10-31 23:13:54 +01:00
|
|
|
FTC_GlyphNodeRec root;
|
|
|
|
FT_Glyph ft_glyph;
|
2000-10-29 01:34:45 +02:00
|
|
|
|
|
|
|
} FTC_GlyphImageRec, *FTC_GlyphImage;
|
|
|
|
|
|
|
|
|
|
|
|
/* the glyph image queue type */
|
|
|
|
typedef struct FTC_ImageSetRec_
|
|
|
|
{
|
|
|
|
FTC_GlyphSetRec root;
|
|
|
|
FTC_Image_Desc description;
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2000-10-29 01:34:45 +02:00
|
|
|
} FTC_ImageSetRec, *FTC_ImageSet;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct FTC_Image_CacheRec_
|
|
|
|
{
|
|
|
|
FTC_Glyph_CacheRec root;
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2000-10-29 01:34:45 +02:00
|
|
|
} FTC_Image_CacheRec;
|
|
|
|
|
2000-10-26 12:04:16 +02:00
|
|
|
|
2000-10-12 07:05:40 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
|
|
|
/***** GLYPH IMAGE NODES *****/
|
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
2001-06-27 18:18:10 +02:00
|
|
|
FT_CALLBACK_DEF( void )
|
2001-06-27 11:26:46 +02:00
|
|
|
ftc_glyph_image_node_destroy( FTC_GlyphImage node,
|
|
|
|
FTC_GlyphSet gset )
|
2000-08-23 13:22:30 +02:00
|
|
|
{
|
2000-10-28 15:17:11 +02:00
|
|
|
FT_Memory memory = gset->memory;
|
2000-10-12 07:05:40 +02:00
|
|
|
|
|
|
|
|
2000-10-28 09:26:59 +02:00
|
|
|
FT_Done_Glyph( node->ft_glyph );
|
2000-09-19 03:11:11 +02:00
|
|
|
FREE( node );
|
2000-08-23 13:22:30 +02:00
|
|
|
}
|
|
|
|
|
2000-08-23 19:32:42 +02:00
|
|
|
|
2001-06-27 18:18:10 +02:00
|
|
|
FT_CALLBACK_DEF( FT_Error )
|
2001-06-27 11:26:46 +02:00
|
|
|
ftc_glyph_image_node_new( FTC_GlyphSet gset,
|
|
|
|
FT_UInt glyph_index,
|
|
|
|
FTC_GlyphImage *anode )
|
2000-10-12 07:05:40 +02:00
|
|
|
{
|
2000-10-31 23:13:54 +01:00
|
|
|
FT_Memory memory = gset->memory;
|
|
|
|
FTC_ImageSet imageset = (FTC_ImageSet)gset;
|
|
|
|
FT_Error error;
|
|
|
|
FTC_GlyphImage node = 0;
|
|
|
|
FT_Face face;
|
|
|
|
FT_Size size;
|
2000-08-23 13:22:30 +02:00
|
|
|
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-09-19 03:11:11 +02:00
|
|
|
/* allocate node */
|
2000-10-12 07:05:40 +02:00
|
|
|
if ( ALLOC( node, sizeof ( *node ) ) )
|
2000-09-19 03:11:11 +02:00
|
|
|
goto Exit;
|
|
|
|
|
2000-10-31 23:13:54 +01:00
|
|
|
/* initialize its inner fields */
|
|
|
|
FTC_GlyphNode_Init( FTC_GLYPHNODE( node ), gset, glyph_index );
|
2000-08-29 18:50:01 +02:00
|
|
|
|
2000-09-19 03:11:11 +02:00
|
|
|
/* we will now load the glyph image */
|
2000-10-28 15:17:11 +02:00
|
|
|
error = FTC_Manager_Lookup_Size( gset->manager,
|
|
|
|
&imageset->description.font,
|
2000-08-23 13:22:30 +02:00
|
|
|
&face, &size );
|
2000-08-23 19:32:42 +02:00
|
|
|
if ( !error )
|
2000-08-23 13:22:30 +02:00
|
|
|
{
|
2000-11-02 16:14:38 +01:00
|
|
|
FT_UInt gindex = node->root.glyph_index;
|
2000-08-29 18:04:28 +02:00
|
|
|
FT_UInt load_flags = FT_LOAD_DEFAULT;
|
2000-10-28 15:17:11 +02:00
|
|
|
FT_UInt image_type = imageset->description.image_type;
|
2000-10-12 07:05:40 +02:00
|
|
|
|
|
|
|
|
2000-08-29 18:50:01 +02:00
|
|
|
if ( FTC_IMAGE_FORMAT( image_type ) == ftc_image_format_bitmap )
|
2000-10-12 07:05:40 +02:00
|
|
|
{
|
|
|
|
load_flags |= FT_LOAD_RENDER;
|
2000-08-29 18:04:28 +02:00
|
|
|
if ( image_type & ftc_image_flag_monochrome )
|
|
|
|
load_flags |= FT_LOAD_MONOCHROME;
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-08-29 18:04:28 +02:00
|
|
|
/* disable embedded bitmaps loading if necessary */
|
2000-09-22 08:52:20 +02:00
|
|
|
if ( image_type & ftc_image_flag_no_sbits )
|
2000-08-29 18:04:28 +02:00
|
|
|
load_flags |= FT_LOAD_NO_BITMAP;
|
2000-08-23 13:22:30 +02:00
|
|
|
}
|
2000-08-29 18:50:01 +02:00
|
|
|
else if ( FTC_IMAGE_FORMAT( image_type ) == ftc_image_format_outline )
|
2000-08-23 13:22:30 +02:00
|
|
|
{
|
2000-08-29 18:04:28 +02:00
|
|
|
/* disable embedded bitmaps loading */
|
|
|
|
load_flags |= FT_LOAD_NO_BITMAP;
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-08-29 18:50:01 +02:00
|
|
|
if ( image_type & ftc_image_flag_unscaled )
|
2000-08-29 18:04:28 +02:00
|
|
|
load_flags |= FT_LOAD_NO_SCALE;
|
|
|
|
}
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-08-29 18:50:01 +02:00
|
|
|
if ( image_type & ftc_image_flag_unhinted )
|
2000-08-29 18:04:28 +02:00
|
|
|
load_flags |= FT_LOAD_NO_HINTING;
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-08-29 18:50:01 +02:00
|
|
|
if ( image_type & ftc_image_flag_autohinted )
|
2000-08-29 18:04:28 +02:00
|
|
|
load_flags |= FT_LOAD_FORCE_AUTOHINT;
|
2000-08-23 23:11:13 +02:00
|
|
|
|
2000-11-02 16:14:38 +01:00
|
|
|
error = FT_Load_Glyph( face, gindex, load_flags );
|
2000-08-23 23:11:13 +02:00
|
|
|
if ( !error )
|
|
|
|
{
|
2000-08-29 18:04:28 +02:00
|
|
|
if ( face->glyph->format == ft_glyph_format_bitmap ||
|
|
|
|
face->glyph->format == ft_glyph_format_outline )
|
2000-10-12 07:05:40 +02:00
|
|
|
{
|
2000-08-23 23:11:13 +02:00
|
|
|
/* ok, copy it */
|
|
|
|
FT_Glyph glyph;
|
2000-10-12 07:05:40 +02:00
|
|
|
|
|
|
|
|
2000-08-23 23:11:13 +02:00
|
|
|
error = FT_Get_Glyph( face->glyph, &glyph );
|
|
|
|
if ( !error )
|
2000-10-28 09:26:59 +02:00
|
|
|
node->ft_glyph = glyph;
|
2000-08-23 23:11:13 +02:00
|
|
|
}
|
2000-08-29 18:04:28 +02:00
|
|
|
else
|
Complete redesign of error codes. Please check ftmoderr.h for more
details.
* include/freetype/internal/cfferrs.h,
include/freetype/internal/tterrors.h,
include/freetype/internal/t1errors.h: Removed. Replaced with files
local to the module. All extra error codes have been moved to
`fterrors.h'.
* src/sfnt/ttpost.h: Move error codes to `fterrors.h'.
* src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h,
src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h,
src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the
error names for the module it belongs to.
* include/freetype/ftmoderr.h: New file, defining the module error
offsets. Its structure is similar to `fterrors.h'.
* include/freetype/fterrors.h (FT_NOERRORDEF): New macro.
(FT_ERRORDEF): Redefined to use module error offsets.
All internal error codes are now public; unused error codes have
been removed, some are new.
* include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New
macro.
* include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro.
All other source files have been updated to use the new error codes;
some already existing (internal) error codes local to a module have
been renamed to give them the same name as in the base module.
All make files have been updated to include the local error files.
* src/cid/cidtokens.h: Replaced with...
* src/cid/cidtoken.h: This file for 8+3 consistency.
* src/raster/ftraster.c: Use macros for header file names.
2001-06-06 19:30:41 +02:00
|
|
|
error = FTC_Err_Invalid_Argument;
|
2000-08-23 23:11:13 +02:00
|
|
|
}
|
|
|
|
}
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-08-23 23:11:13 +02:00
|
|
|
Exit:
|
2000-10-12 07:05:40 +02:00
|
|
|
if ( error && node )
|
|
|
|
FREE( node );
|
2000-08-23 23:11:13 +02:00
|
|
|
|
2000-09-19 03:11:11 +02:00
|
|
|
*anode = node;
|
2000-08-23 23:11:13 +02:00
|
|
|
return error;
|
2000-09-19 03:11:11 +02:00
|
|
|
}
|
2000-08-23 23:11:13 +02:00
|
|
|
|
|
|
|
|
2000-10-12 07:05:40 +02:00
|
|
|
/* this function is important because it is both part of */
|
2000-10-31 23:13:54 +01:00
|
|
|
/* an FTC_GlyphSet_Class and an FTC_CacheNode_Class */
|
2000-10-12 07:05:40 +02:00
|
|
|
/* */
|
2001-06-27 18:18:10 +02:00
|
|
|
FT_CALLBACK_DEF( FT_ULong )
|
2001-06-27 11:26:46 +02:00
|
|
|
ftc_glyph_image_node_size( FTC_GlyphImage node )
|
2000-08-23 23:11:13 +02:00
|
|
|
{
|
2000-10-12 07:05:40 +02:00
|
|
|
FT_ULong size = 0;
|
2000-10-28 09:26:59 +02:00
|
|
|
FT_Glyph glyph = node->ft_glyph;
|
2000-10-12 07:05:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
switch ( glyph->format )
|
2000-08-23 23:11:13 +02:00
|
|
|
{
|
2000-10-12 07:05:40 +02:00
|
|
|
case ft_glyph_format_bitmap:
|
|
|
|
{
|
|
|
|
FT_BitmapGlyph bitg;
|
|
|
|
|
|
|
|
|
|
|
|
bitg = (FT_BitmapGlyph)glyph;
|
|
|
|
size = bitg->bitmap.rows * labs( bitg->bitmap.pitch ) +
|
|
|
|
sizeof ( *bitg );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ft_glyph_format_outline:
|
|
|
|
{
|
|
|
|
FT_OutlineGlyph outg;
|
|
|
|
|
|
|
|
|
|
|
|
outg = (FT_OutlineGlyph)glyph;
|
|
|
|
size = outg->outline.n_points *
|
|
|
|
( sizeof( FT_Vector ) + sizeof ( FT_Byte ) ) +
|
|
|
|
outg->outline.n_contours * sizeof ( FT_Short ) +
|
|
|
|
sizeof ( *outg );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
;
|
2000-08-23 23:11:13 +02:00
|
|
|
}
|
2000-10-12 07:05:40 +02:00
|
|
|
|
|
|
|
size += sizeof ( *node );
|
2000-09-19 03:11:11 +02:00
|
|
|
return size;
|
2000-08-23 23:11:13 +02:00
|
|
|
}
|
|
|
|
|
2000-08-24 18:29:15 +02:00
|
|
|
|
2000-10-12 07:05:40 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
2000-10-29 01:34:45 +02:00
|
|
|
/***** GLYPH IMAGE SETS *****/
|
2000-10-12 07:05:40 +02:00
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
2000-08-24 18:29:15 +02:00
|
|
|
|
2000-08-23 23:11:13 +02:00
|
|
|
|
2001-06-27 18:18:10 +02:00
|
|
|
FT_CALLBACK_DEF( FT_Error )
|
2001-06-27 11:26:46 +02:00
|
|
|
ftc_image_set_init( FTC_ImageSet iset,
|
|
|
|
FTC_Image_Desc* type )
|
2000-08-23 23:11:13 +02:00
|
|
|
{
|
2000-10-28 15:17:11 +02:00
|
|
|
iset->description = *type;
|
2000-09-19 03:11:11 +02:00
|
|
|
return 0;
|
2000-08-23 23:11:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-27 18:18:10 +02:00
|
|
|
FT_CALLBACK_DEF( FT_Bool )
|
2001-06-27 11:26:46 +02:00
|
|
|
ftc_image_set_compare( FTC_ImageSet iset,
|
|
|
|
FTC_Image_Desc* type )
|
2000-08-23 23:11:13 +02:00
|
|
|
{
|
2001-06-20 01:03:41 +02:00
|
|
|
return FT_BOOL( !memcmp( &iset->description, type, sizeof ( *type ) ) );
|
2000-08-23 23:11:13 +02:00
|
|
|
}
|
|
|
|
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-11-04 02:55:49 +01:00
|
|
|
FT_CALLBACK_TABLE_DEF
|
|
|
|
const FTC_GlyphSet_Class ftc_glyph_image_set_class =
|
2000-08-23 23:11:13 +02:00
|
|
|
{
|
2000-10-28 15:17:11 +02:00
|
|
|
sizeof( FTC_ImageSetRec ),
|
2000-08-23 23:11:13 +02:00
|
|
|
|
2000-10-28 15:17:11 +02:00
|
|
|
(FTC_GlyphSet_InitFunc) ftc_image_set_init,
|
|
|
|
(FTC_GlyphSet_DoneFunc) 0,
|
|
|
|
(FTC_GlyphSet_CompareFunc) ftc_image_set_compare,
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-10-28 15:17:11 +02:00
|
|
|
(FTC_GlyphSet_NewNodeFunc) ftc_glyph_image_node_new,
|
|
|
|
(FTC_GlyphSet_SizeNodeFunc) ftc_glyph_image_node_size,
|
|
|
|
(FTC_GlyphSet_DestroyNodeFunc)ftc_glyph_image_node_destroy
|
2000-10-12 07:05:40 +02:00
|
|
|
};
|
2000-08-23 23:11:13 +02:00
|
|
|
|
2000-08-24 18:29:15 +02:00
|
|
|
|
2000-10-12 07:05:40 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/***** *****/
|
|
|
|
/***** GLYPH IMAGE CACHE *****/
|
|
|
|
/***** *****/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
2000-08-29 18:04:28 +02:00
|
|
|
|
2000-08-23 23:11:13 +02:00
|
|
|
|
2000-11-04 02:55:49 +01:00
|
|
|
FT_CALLBACK_TABLE_DEF
|
|
|
|
const FTC_Glyph_Cache_Class ftc_glyph_image_cache_class =
|
2000-08-23 23:11:13 +02:00
|
|
|
{
|
2000-09-19 03:11:11 +02:00
|
|
|
{
|
2000-10-28 15:17:11 +02:00
|
|
|
sizeof( FTC_Image_CacheRec ),
|
|
|
|
(FTC_Cache_InitFunc) FTC_Glyph_Cache_Init,
|
|
|
|
(FTC_Cache_DoneFunc) FTC_Glyph_Cache_Done
|
2000-09-19 03:11:11 +02:00
|
|
|
},
|
2000-10-28 15:17:11 +02:00
|
|
|
(FTC_GlyphSet_Class*) &ftc_glyph_image_set_class
|
2000-09-19 03:11:11 +02:00
|
|
|
};
|
2000-08-23 23:11:13 +02:00
|
|
|
|
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
/* documentation is in ftcimage.h */
|
|
|
|
|
2001-06-27 18:18:10 +02:00
|
|
|
FT_EXPORT_DEF( FT_Error )
|
|
|
|
FTC_Image_Cache_New( FTC_Manager manager,
|
|
|
|
FTC_Image_Cache *acache )
|
2000-08-23 23:11:13 +02:00
|
|
|
{
|
2000-09-19 03:11:11 +02:00
|
|
|
return FTC_Manager_Register_Cache(
|
2000-10-31 23:13:54 +01:00
|
|
|
manager,
|
|
|
|
(FTC_Cache_Class*)&ftc_glyph_image_cache_class,
|
|
|
|
(FTC_Cache*)acache );
|
2000-08-23 23:11:13 +02:00
|
|
|
}
|
2000-10-12 07:05:40 +02:00
|
|
|
|
2000-08-23 23:11:13 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
/* documentation is in ftcimage.h */
|
|
|
|
|
2001-06-27 18:18:10 +02:00
|
|
|
FT_EXPORT_DEF( FT_Error )
|
|
|
|
FTC_Image_Cache_Lookup( FTC_Image_Cache cache,
|
|
|
|
FTC_Image_Desc* desc,
|
|
|
|
FT_UInt gindex,
|
|
|
|
FT_Glyph *aglyph )
|
2000-08-23 23:11:13 +02:00
|
|
|
{
|
2000-10-28 15:17:11 +02:00
|
|
|
FT_Error error;
|
|
|
|
FTC_GlyphNode node;
|
2000-08-23 23:11:13 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
|
2000-11-06 20:29:06 +01:00
|
|
|
/* some argument checks are delayed to FTC_Glyph_Cache_Lookup */
|
2000-08-24 18:29:15 +02:00
|
|
|
|
2001-06-28 19:49:10 +02:00
|
|
|
if ( !aglyph )
|
Complete redesign of error codes. Please check ftmoderr.h for more
details.
* include/freetype/internal/cfferrs.h,
include/freetype/internal/tterrors.h,
include/freetype/internal/t1errors.h: Removed. Replaced with files
local to the module. All extra error codes have been moved to
`fterrors.h'.
* src/sfnt/ttpost.h: Move error codes to `fterrors.h'.
* src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h,
src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h,
src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the
error names for the module it belongs to.
* include/freetype/ftmoderr.h: New file, defining the module error
offsets. Its structure is similar to `fterrors.h'.
* include/freetype/fterrors.h (FT_NOERRORDEF): New macro.
(FT_ERRORDEF): Redefined to use module error offsets.
All internal error codes are now public; unused error codes have
been removed, some are new.
* include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New
macro.
* include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro.
All other source files have been updated to use the new error codes;
some already existing (internal) error codes local to a module have
been renamed to give them the same name as in the base module.
All make files have been updated to include the local error files.
* src/cid/cidtokens.h: Replaced with...
* src/cid/cidtoken.h: This file for 8+3 consistency.
* src/raster/ftraster.c: Use macros for header file names.
2001-06-06 19:30:41 +02:00
|
|
|
return FTC_Err_Invalid_Argument;
|
2000-08-24 18:29:15 +02:00
|
|
|
|
2000-11-06 20:29:06 +01:00
|
|
|
error = FTC_Glyph_Cache_Lookup( (FTC_Glyph_Cache)cache,
|
|
|
|
desc, gindex, &node );
|
2001-06-28 19:49:10 +02:00
|
|
|
|
|
|
|
if ( !error )
|
2000-11-06 20:29:06 +01:00
|
|
|
*aglyph = ((FTC_GlyphImage)node)->ft_glyph;
|
2000-08-23 23:11:13 +02:00
|
|
|
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-10-12 07:05:40 +02:00
|
|
|
/* END */
|