summaryrefslogtreecommitdiff
path: root/src/sfnt
diff options
context:
space:
mode:
authorDavid Turner <david@freetype.org>2002-08-27 20:20:29 +0000
committerDavid Turner <david@freetype.org>2002-08-27 20:20:29 +0000
commitb08fe2dc7af972a61f4e6bcadd7bb522861faec5 (patch)
tree9091785d1d8f5f4e1b3e67f73a28a7acf6aa7394 /src/sfnt
parent51b6699a35ae3204ffadf0e53fbfb73c486050f4 (diff)
downloadfreetype2-b08fe2dc7af972a61f4e6bcadd7bb522861faec5.tar.gz
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical transformations of the sources: - trying to convert all enums and constants to CAPITALIZED_STYLE, with #define definitions like #define my_old_constants MY_NEW_CONSTANT - big, big update of the documentation comments * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c, include/freetype/ftimage.h: adding support for LCD-optimized rendering though the new constants/enums: FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V this is still work in progress, don't expect everything to work correctly though most of the features have been implemented. * adding new FT_LOAD_XXX flags, used to specify both hinting and rendering targets: FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering FT_LOAD_TARGET_MONO :: monochrome bitmaps FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering note that FT_LOAD_TARGET_NORMAL is 0, which means that the default behaviour of the font engine is _unchanged_.
Diffstat (limited to 'src/sfnt')
-rw-r--r--src/sfnt/sfdriver.c66
-rw-r--r--src/sfnt/sfobjs.c42
-rw-r--r--src/sfnt/sfobjs.h6
-rw-r--r--src/sfnt/ttcmap.c40
-rw-r--r--src/sfnt/ttcmap.h10
-rw-r--r--src/sfnt/ttcmap0.c8
-rw-r--r--src/sfnt/ttcmap0.h2
-rw-r--r--src/sfnt/ttload.c166
-rw-r--r--src/sfnt/ttload.h90
-rw-r--r--src/sfnt/ttpost.c28
-rw-r--r--src/sfnt/ttpost.h8
-rw-r--r--src/sfnt/ttsbit.c66
-rw-r--r--src/sfnt/ttsbit.h28
13 files changed, 280 insertions, 280 deletions
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 6411d9165..f2fa7b46e 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -92,7 +92,7 @@
FT_Error error;
- error = TT_Get_PS_Name( face, glyph_index, &gname );
+ error = tt_face_get_ps_name( face, glyph_index, &gname );
if ( !error && buffer_max > 0 )
{
FT_UInt len = (FT_UInt)( ft_strlen( gname ) );
@@ -220,7 +220,7 @@
FT_CALLBACK_DEF( FT_Module_Interface )
- SFNT_Get_Interface( FT_Module module,
+ sfnt_get_interface( FT_Module module,
const char* module_interface )
{
FT_UNUSED( module );
@@ -243,44 +243,44 @@
static
const SFNT_Interface sfnt_interface =
{
- TT_Goto_Table,
+ tt_face_goto_table,
- SFNT_Init_Face,
- SFNT_Load_Face,
- SFNT_Done_Face,
- SFNT_Get_Interface,
+ sfnt_init_face,
+ sfnt_load_face,
+ sfnt_done_face,
+ sfnt_get_interface,
- TT_Load_Any,
- TT_Load_SFNT_Header,
- TT_Load_Directory,
+ tt_face_load_any,
+ tt_face_load_sfnt_header,
+ tt_face_load_directory,
- TT_Load_Header,
- TT_Load_Metrics_Header,
- TT_Load_CMap,
- TT_Load_MaxProfile,
- TT_Load_OS2,
- TT_Load_PostScript,
+ tt_face_load_header,
+ tt_face_load_metrics_header,
+ tt_face_load_cmap,
+ tt_face_load_max_profile,
+ tt_face_load_os2,
+ tt_face_load_postscript,
- TT_Load_Names,
- TT_Free_Names,
+ tt_face_load_names,
+ tt_face_free_names,
- TT_Load_Hdmx,
- TT_Free_Hdmx,
+ tt_face_load_hdmx,
+ tt_face_free_hdmx,
- TT_Load_Kern,
- TT_Load_Gasp,
- TT_Load_PCLT,
+ tt_face_load_kern,
+ tt_face_load_gasp,
+ tt_face_load_pclt,
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
/* see `ttload.h' */
- TT_Load_Bitmap_Header,
+ tt_face_load_bitmap_header,
/* see `ttsbit.h' */
- TT_Set_SBit_Strike,
- TT_Load_SBit_Strikes,
- TT_Load_SBit_Image,
- TT_Free_SBit_Strikes,
+ tt_face_set_sbit_strike,
+ tt_face_load_sbit_strikes,
+ tt_face_load_sbit_image,
+ tt_face_free_sbit_strikes,
#else /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -295,8 +295,8 @@
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
/* see `ttpost.h' */
- TT_Get_PS_Name,
- TT_Free_Post_Names,
+ tt_face_get_ps_name,
+ tt_face_free_ps_names,
#else /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
@@ -306,8 +306,8 @@
#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
/* see `ttcmap.h' */
- TT_CharMap_Load,
- TT_CharMap_Free,
+ tt_face_load_charmap,
+ tt_face_free_charmap,
};
@@ -325,7 +325,7 @@
(FT_Module_Constructor)0,
(FT_Module_Destructor) 0,
- (FT_Module_Requester) SFNT_Get_Interface
+ (FT_Module_Requester) sfnt_get_interface
};
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index ff7a5d8e0..dac6c1806 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -296,20 +296,20 @@
static
const TEncoding tt_encodings[] =
{
- { TT_PLATFORM_ISO, -1, ft_encoding_unicode },
+ { TT_PLATFORM_ISO, -1, FT_ENCODING_UNICODE },
- { TT_PLATFORM_APPLE_UNICODE, -1, ft_encoding_unicode },
+ { TT_PLATFORM_APPLE_UNICODE, -1, FT_ENCODING_UNICODE },
- { TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, ft_encoding_apple_roman },
+ { TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, FT_ENCODING_APPLE_ROMAN },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_SYMBOL_CS, ft_encoding_symbol },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, ft_encoding_unicode },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, ft_encoding_unicode },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, ft_encoding_sjis },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, ft_encoding_gb2312 },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, ft_encoding_big5 },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, ft_encoding_wansung },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, ft_encoding_johab }
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_SYMBOL_CS, FT_ENCODING_MS_SYMBOL },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, FT_ENCODING_UNICODE },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, FT_ENCODING_MS_SJIS },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, FT_ENCODING_MS_GB2312 },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, FT_ENCODING_MS_BIG5 },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, FT_ENCODING_MS_WANSUNG },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, FT_ENCODING_MS_JOHAB }
};
const TEncoding *cur, *limit;
@@ -328,12 +328,12 @@
}
}
- return ft_encoding_none;
+ return FT_ENCODING_NONE;
}
FT_LOCAL_DEF( FT_Error )
- SFNT_Init_Face( FT_Stream stream,
+ sfnt_init_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -397,7 +397,7 @@
FT_LOCAL_DEF( FT_Error )
- SFNT_Load_Face( FT_Stream stream,
+ sfnt_load_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -434,11 +434,11 @@
/* do we have outlines in there? */
#ifdef FT_CONFIG_OPTION_INCREMENTAL
has_outline = FT_BOOL( face->root.internal->incremental_interface != 0 ||
- TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
- TT_LookUp_Table( face, TTAG_CFF ) != 0 );
+ tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
+ tt_face_lookup_table( face, TTAG_CFF ) != 0 );
#else
- has_outline = FT_BOOL( TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
- TT_LookUp_Table( face, TTAG_CFF ) != 0 );
+ has_outline = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
+ tt_face_lookup_table( face, TTAG_CFF ) != 0 );
#endif
is_apple_sbit = 0;
@@ -585,7 +585,7 @@
/* encoding ID of each charmap. */
/* */
- TT_Build_CMaps( face ); /* ignore errors */
+ tt_face_build_cmaps( face ); /* ignore errors */
/* set the encoding fields */
@@ -603,7 +603,7 @@
#if 0
if ( root->charmap == NULL &&
- charmap->encoding == ft_encoding_unicode )
+ charmap->encoding == FT_ENCODING_UNICODE )
{
/* set 'root->charmap' to the first Unicode encoding we find */
root->charmap = charmap;
@@ -753,7 +753,7 @@
FT_LOCAL_DEF( void )
- SFNT_Done_Face( TT_Face face )
+ sfnt_done_face( TT_Face face )
{
FT_Memory memory = face->root.memory;
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
diff --git a/src/sfnt/sfobjs.h b/src/sfnt/sfobjs.h
index f30c1985e..6241c93b3 100644
--- a/src/sfnt/sfobjs.h
+++ b/src/sfnt/sfobjs.h
@@ -29,21 +29,21 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- SFNT_Init_Face( FT_Stream stream,
+ sfnt_init_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
FT_Parameter* params );
FT_LOCAL( FT_Error )
- SFNT_Load_Face( FT_Stream stream,
+ sfnt_load_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
FT_Parameter* params );
FT_LOCAL( void )
- SFNT_Done_Face( TT_Face face );
+ sfnt_done_face( TT_Face face );
FT_END_HEADER
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 5d0a61a2c..a5f9cd1a0 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -86,7 +86,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_CharMap_Load */
+ /* tt_face_load_charmap */
/* */
/* <Description> */
/* Loads a given TrueType character map into memory. */
@@ -108,9 +108,9 @@
/* released. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_CharMap_Load( TT_Face face,
- TT_CMapTable cmap,
- FT_Stream stream )
+ tt_face_load_charmap( TT_Face face,
+ TT_CMapTable cmap,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory;
@@ -391,7 +391,7 @@
return SFNT_Err_Ok;
Fail:
- TT_CharMap_Free( face, cmap );
+ tt_face_free_charmap( face, cmap );
return error;
}
@@ -399,7 +399,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_CharMap_Free */
+ /* tt_face_free_charmap */
/* */
/* <Description> */
/* Destroys a character mapping table. */
@@ -413,8 +413,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_CharMap_Free( TT_Face face,
- TT_CMapTable cmap )
+ tt_face_free_charmap( TT_Face face,
+ TT_CMapTable cmap )
{
FT_Memory memory;
@@ -633,7 +633,7 @@
{
char_lo = (FT_UInt)( charCode & 0xFF );
char_hi = charCode >> 8;
-
+
if ( char_hi == 0 )
{
/* an 8-bit character code -- we use the subHeader 0 in this case */
@@ -655,16 +655,16 @@
continue;
}
}
-
+
sh2 = cmap2->subHeaders + index1;
char_lo -= sh2->firstCode;
-
+
if ( char_lo > (FT_UInt)sh2->entryCount )
{
charCode = ( char_hi + 1 ) << 8;
continue;
}
-
+
offset = sh2->idRangeOffset / 2 + char_lo;
if ( offset >= (FT_UInt)cmap2->numGlyphId ||
cmap2->glyphIdArray[offset] == 0 )
@@ -672,7 +672,7 @@
charCode++;
continue;
}
-
+
return charCode;
}
return 0;
@@ -813,7 +813,7 @@
if ( seg4->idRangeOffset == 0 )
return ( charCode );
-
+
while ( charCode <= (FT_UInt) seg4->endCount )
{
/* otherwise, we must use the glyphIdArray to do it */
@@ -890,12 +890,12 @@
charCode++;
-
+
cmap6 = &cmap->c.cmap6;
-
+
if ( charCode < (FT_ULong) cmap6->firstCode )
charCode = cmap6->firstCode;
-
+
charCode -= cmap6->firstCode;
while ( charCode < (FT_UInt)cmap6->entryCount )
@@ -1016,7 +1016,7 @@
Found:
if ( charCode < group->startCharCode )
charCode = group->startCharCode;
-
+
return charCode;
}
@@ -1085,10 +1085,10 @@
charCode++;
cmap10 = &cmap->c.cmap10;
-
+
if ( charCode < cmap10->startCharCode )
charCode = cmap10->startCharCode;
-
+
charCode -= cmap10->startCharCode;
/* the overflow trick for comparison works here also since the number */
diff --git a/src/sfnt/ttcmap.h b/src/sfnt/ttcmap.h
index 6ddb79ef4..cd19a6b73 100644
--- a/src/sfnt/ttcmap.h
+++ b/src/sfnt/ttcmap.h
@@ -28,13 +28,13 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- TT_CharMap_Load( TT_Face face,
- TT_CMapTable cmap,
- FT_Stream input );
+ tt_face_load_charmap( TT_Face face,
+ TT_CMapTable cmap,
+ FT_Stream input );
FT_LOCAL( FT_Error )
- TT_CharMap_Free( TT_Face face,
- TT_CMapTable cmap );
+ tt_face_free_charmap( TT_Face face,
+ TT_CMapTable cmap );
FT_END_HEADER
diff --git a/src/sfnt/ttcmap0.c b/src/sfnt/ttcmap0.c
index 2940ac3ac..3d0f0aae0 100644
--- a/src/sfnt/ttcmap0.c
+++ b/src/sfnt/ttcmap0.c
@@ -1666,7 +1666,7 @@
/* in the current face */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Build_CMaps( TT_Face face )
+ tt_face_build_cmaps( TT_Face face )
{
FT_Byte* table = face->cmap_table;
FT_Byte* limit = table + face->cmap_size;
@@ -1681,7 +1681,7 @@
if ( TT_NEXT_USHORT( p ) != 0 )
{
p -= 2;
- FT_ERROR(( "TT_Build_CMaps: unsupported `cmap' table format = %d\n",
+ FT_ERROR(( "tt_face_build_cmaps: unsupported `cmap' table format = %d\n",
TT_PEEK_USHORT( p ) ));
return FT_Err_Invalid_Table;
}
@@ -1697,7 +1697,7 @@
charmap.platform_id = TT_NEXT_USHORT( p );
charmap.encoding_id = TT_NEXT_USHORT( p );
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_none; /* will be filled later */
+ charmap.encoding = FT_ENCODING_NONE; /* will be filled later */
offset = TT_NEXT_ULONG( p );
if ( offset && table + offset + 2 < limit )
@@ -1731,7 +1731,7 @@
(void)FT_CMap_New( (FT_CMap_Class)clazz, cmap, &charmap, NULL );
else
{
- FT_ERROR(( "TT_Build_CMaps:" ));
+ FT_ERROR(( "tt_face_build_cmaps:" ));
FT_ERROR(( " broken cmap sub-table ignored!\n" ));
}
}
diff --git a/src/sfnt/ttcmap0.h b/src/sfnt/ttcmap0.h
index efead241c..ff1276e09 100644
--- a/src/sfnt/ttcmap0.h
+++ b/src/sfnt/ttcmap0.h
@@ -63,7 +63,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- TT_Build_CMaps( TT_Face face );
+ tt_face_build_cmaps( TT_Face face );
FT_END_HEADER
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 3e39a494d..5a828f09f 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -40,7 +40,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_LookUp_Table */
+ /* tt_face_lookup_table */
/* */
/* <Description> */
/* Looks for a TrueType table by name. */
@@ -54,14 +54,14 @@
/* A pointer to the table directory entry. 0 if not found. */
/* */
FT_LOCAL_DEF( TT_Table )
- TT_LookUp_Table( TT_Face face,
- FT_ULong tag )
+ tt_face_lookup_table( TT_Face face,
+ FT_ULong tag )
{
TT_Table entry;
TT_Table limit;
- FT_TRACE3(( "TT_LookUp_Table: %08p, `%c%c%c%c' -- ",
+ FT_TRACE3(( "tt_face_lookup_table: %08p, `%c%c%c%c' -- ",
face,
(FT_Char)( tag >> 24 ),
(FT_Char)( tag >> 16 ),
@@ -90,7 +90,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Goto_Table */
+ /* tt_face_goto_table */
/* */
/* <Description> */
/* Looks for a TrueType table by name, then seek a stream to it. */
@@ -109,16 +109,16 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Goto_Table( TT_Face face,
- FT_ULong tag,
- FT_Stream stream,
- FT_ULong* length )
+ tt_face_goto_table( TT_Face face,
+ FT_ULong tag,
+ FT_Stream stream,
+ FT_ULong* length )
{
TT_Table table;
FT_Error error;
- table = TT_LookUp_Table( face, tag );
+ table = tt_face_lookup_table( face, tag );
if ( table )
{
if ( length )
@@ -239,7 +239,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_SFNT_Header */
+ /* tt_face_load_sfnt_header */
/* */
/* <Description> */
/* Loads the header of a SFNT font file. Supports collections. */
@@ -267,10 +267,10 @@
/* values of `search_range', `entry_selector', and `range_shift'. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_SFNT_Header( TT_Face face,
- FT_Stream stream,
- FT_Long face_index,
- SFNT_Header sfnt )
+ tt_face_load_sfnt_header( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header sfnt )
{
FT_Error error;
FT_ULong format_tag, offset;
@@ -301,7 +301,7 @@
};
- FT_TRACE2(( "TT_Load_SFNT_Header: %08p, %ld\n",
+ FT_TRACE2(( "tt_face_load_sfnt_header: %08p, %ld\n",
face, face_index ));
face->ttc_header.tag = 0;
@@ -324,7 +324,7 @@
FT_Int n;
- FT_TRACE3(( "TT_Load_SFNT_Header: file is a collection\n" ));
+ FT_TRACE3(( "tt_face_load_sfnt_header: file is a collection\n" ));
/* It is a TrueType collection, i.e. a file containing several */
/* font files. Read the font directory now */
@@ -367,7 +367,7 @@
error = sfnt_dir_check( stream, offset, sfnt->num_tables );
if ( error )
{
- FT_TRACE2(( "TT_Load_SFNT_Header: file is not SFNT!\n" ));
+ FT_TRACE2(( "tt_face_load_sfnt_header: file is not SFNT!\n" ));
error = SFNT_Err_Unknown_File_Format;
}
@@ -379,7 +379,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Directory */
+ /* tt_face_load_directory */
/* */
/* <Description> */
/* Loads the table directory into a face object. */
@@ -399,9 +399,9 @@
/* The stream cursor must be at the font file's origin. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Directory( TT_Face face,
- FT_Stream stream,
- SFNT_Header sfnt )
+ tt_face_load_directory( TT_Face face,
+ FT_Stream stream,
+ SFNT_Header sfnt )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -409,7 +409,7 @@
TT_TableRec *entry, *limit;
- FT_TRACE2(( "TT_Load_Directory: %08p\n", face ));
+ FT_TRACE2(( "tt_face_load_directory: %08p\n", face ));
FT_TRACE2(( "-- Tables count: %12u\n", sfnt->num_tables ));
FT_TRACE2(( "-- Format version: %08lx\n", sfnt->format_tag ));
@@ -454,7 +454,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Any */
+ /* tt_face_load_any */
/* */
/* <Description> */
/* Loads any font table into client memory. */
@@ -492,11 +492,11 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Any( TT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length )
+ tt_face_load_any( TT_Face face,
+ FT_ULong tag,
+ FT_Long offset,
+ FT_Byte* buffer,
+ FT_ULong* length )
{
FT_Error error;
FT_Stream stream;
@@ -507,7 +507,7 @@
if ( tag != 0 )
{
/* look for tag in font directory */
- table = TT_LookUp_Table( face, tag );
+ table = tt_face_lookup_table( face, tag );
if ( !table )
{
error = SFNT_Err_Table_Missing;
@@ -544,7 +544,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Generic_Header */
+ /* tt_face_load_generic_header */
/* */
/* <Description> */
/* Loads the TrueType table `head' or `bhed'. */
@@ -558,7 +558,7 @@
/* FreeType error code. 0 means success. */
/* */
static FT_Error
- TT_Load_Generic_Header( TT_Face face,
+ tt_face_load_generic_header( TT_Face face,
FT_Stream stream,
FT_ULong tag )
{
@@ -594,7 +594,7 @@
};
- FT_TRACE2(( "TT_Load_Generic_Header: "
+ FT_TRACE2(( "tt_face_load_generic_header: "
"%08p, looking up font table `%c%c%c%c'.\n",
face,
(FT_Char)( tag >> 24 ),
@@ -605,7 +605,7 @@
error = face->goto_table( face, tag, stream, 0 );
if ( error )
{
- FT_TRACE2(( "TT_Load_Generic_Header: Font table is missing!\n" ));
+ FT_TRACE2(( "tt_face_load_generic_header: Font table is missing!\n" ));
goto Exit;
}
@@ -616,7 +616,7 @@
FT_TRACE2(( " Units per EM: %8u\n", header->Units_Per_EM ));
FT_TRACE2(( " IndexToLoc: %8d\n", header->Index_To_Loc_Format ));
- FT_TRACE2(( "TT_Load_Generic_Header: Font table loaded.\n" ));
+ FT_TRACE2(( "tt_face_load_generic_header: Font table loaded.\n" ));
Exit:
return error;
@@ -624,20 +624,20 @@
FT_LOCAL_DEF( FT_Error )
- TT_Load_Header( TT_Face face,
- FT_Stream stream )
+ tt_face_load_header( TT_Face face,
+ FT_Stream stream )
{
- return TT_Load_Generic_Header( face, stream, TTAG_head );
+ return tt_face_load_generic_header( face, stream, TTAG_head );
}
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
FT_LOCAL_DEF( FT_Error )
- TT_Load_Bitmap_Header( TT_Face face,
- FT_Stream stream )
+ tt_face_load_bitmap_header( TT_Face face,
+ FT_Stream stream )
{
- return TT_Load_Generic_Header( face, stream, TTAG_bhed );
+ return tt_face_load_generic_header( face, stream, TTAG_bhed );
}
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -646,7 +646,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_MaxProfile */
+ /* tt_face_load_max_profile */
/* */
/* <Description> */
/* Loads the maximum profile into a face object. */
@@ -660,8 +660,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_MaxProfile( TT_Face face,
- FT_Stream stream )
+ tt_face_load_max_profile( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
TT_MaxProfile* maxProfile = &face->max_profile;
@@ -768,7 +768,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Metrics */
+ /* tt_face_load_metrics */
/* */
/* <Description> */
/* Loads the horizontal or vertical metrics table into a face object. */
@@ -784,9 +784,9 @@
/* FreeType error code. 0 means success. */
/* */
static FT_Error
- TT_Load_Metrics( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical )
+ tt_face_load_metrics( TT_Face face,
+ FT_Stream stream,
+ FT_Bool vertical )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -911,7 +911,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Metrics_Header */
+ /* tt_face_load_metrics_header */
/* */
/* <Description> */
/* Loads the horizontal or vertical header in a face object. */
@@ -927,9 +927,9 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Metrics_Header( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical )
+ tt_face_load_metrics_header( TT_Face face,
+ FT_Stream stream,
+ FT_Bool vertical )
{
FT_Error error;
TT_HoriHeader* header;
@@ -1003,7 +1003,7 @@
/* Now try to load the corresponding metrics */
- error = TT_Load_Metrics( face, stream, vertical );
+ error = tt_face_load_metrics( face, stream, vertical );
Exit:
return error;
@@ -1013,7 +1013,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Names */
+ /* tt_face_load_names */
/* */
/* <Description> */
/* Loads the name records. */
@@ -1027,8 +1027,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Names( TT_Face face,
- FT_Stream stream )
+ tt_face_load_names( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1097,7 +1097,7 @@
if ( storage_start > storage_limit )
{
- FT_ERROR(( "TT_Load_Names: invalid `name' table\n" ));
+ FT_ERROR(( "tt_face_load_names: invalid `name' table\n" ));
error = SFNT_Err_Name_Table_Missing;
goto Exit;
}
@@ -1157,7 +1157,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Free_Names */
+ /* tt_face_free_names */
/* */
/* <Description> */
/* Frees the name records. */
@@ -1166,7 +1166,7 @@
/* face :: A handle to the target face object. */
/* */
FT_LOCAL_DEF( void )
- TT_Free_Names( TT_Face face )
+ tt_face_free_names( TT_Face face )
{
FT_Memory memory = face->root.driver->root.memory;
TT_NameTable table = &face->name_table;
@@ -1192,7 +1192,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_CMap */
+ /* tt_face_load_cmap */
/* */
/* <Description> */
/* Loads the cmap directory in a face object. The cmaps itselves are */
@@ -1208,8 +1208,8 @@
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_CMap( TT_Face face,
- FT_Stream stream )
+ tt_face_load_cmap( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
@@ -1239,7 +1239,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_OS2 */
+ /* tt_face_load_os2 */
/* */
/* <Description> */
/* Loads the OS2 table. */
@@ -1253,8 +1253,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_OS2( TT_Face face,
- FT_Stream stream )
+ tt_face_load_os2( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
TT_OS2* os2;
@@ -1382,7 +1382,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Postscript */
+ /* tt_face_load_postscript */
/* */
/* <Description> */
/* Loads the Postscript table. */
@@ -1396,8 +1396,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_PostScript( TT_Face face,
- FT_Stream stream )
+ tt_face_load_postscript( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
TT_Postscript* post = &face->postscript;
@@ -1441,7 +1441,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_PCLT */
+ /* tt_face_load_pclt */
/* */
/* <Description> */
/* Loads the PCL 5 Table. */
@@ -1455,8 +1455,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_PCLT( TT_Face face,
- FT_Stream stream )
+ tt_face_load_pclt( TT_Face face,
+ FT_Stream stream )
{
static const FT_Frame_Field pclt_fields[] =
{
@@ -1509,7 +1509,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Gasp */
+ /* tt_face_load_gasp */
/* */
/* <Description> */
/* Loads the `gasp' table into a face object. */
@@ -1523,8 +1523,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Gasp( TT_Face face,
- FT_Stream stream )
+ tt_face_load_gasp( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1533,7 +1533,7 @@
TT_GaspRange gaspranges;
- FT_TRACE2(( "TT_Load_Gasp: %08p\n", face ));
+ FT_TRACE2(( "tt_face_load_gasp: %08p\n", face ));
/* the gasp table is optional */
error = face->goto_table( face, TTAG_gasp, stream, 0 );
@@ -1584,7 +1584,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Kern */
+ /* tt_face_load_kern */
/* */
/* <Description> */
/* Loads the first kerning table with format 0 in the font. Only */
@@ -1601,8 +1601,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Kern( TT_Face face,
- FT_Stream stream )
+ tt_face_load_kern( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1737,7 +1737,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Hdmx */
+ /* tt_face_load_hdmx */
/* */
/* <Description> */
/* Loads the horizontal device metrics table. */
@@ -1751,8 +1751,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Hdmx( TT_Face face,
- FT_Stream stream )
+ tt_face_load_hdmx( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1820,7 +1820,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Free_Hdmx */
+ /* tt_face_free_hdmx */
/* */
/* <Description> */
/* Frees the horizontal device metrics table. */
@@ -1829,7 +1829,7 @@
/* face :: A handle to the target face object. */
/* */
FT_LOCAL_DEF( void )
- TT_Free_Hdmx( TT_Face face )
+ tt_face_free_hdmx( TT_Face face )
{
if ( face )
{
diff --git a/src/sfnt/ttload.h b/src/sfnt/ttload.h
index ca38f6cba..27c41b50b 100644
--- a/src/sfnt/ttload.h
+++ b/src/sfnt/ttload.h
@@ -30,101 +30,101 @@ FT_BEGIN_HEADER
FT_LOCAL( TT_Table )
- TT_LookUp_Table( TT_Face face,
- FT_ULong tag );
+ tt_face_lookup_table( TT_Face face,
+ FT_ULong tag );
FT_LOCAL( FT_Error )
- TT_Goto_Table( TT_Face face,
- FT_ULong tag,
- FT_Stream stream,
- FT_ULong* length );
+ tt_face_goto_table( TT_Face face,
+ FT_ULong tag,
+ FT_Stream stream,
+ FT_ULong* length );
FT_LOCAL( FT_Error )
- TT_Load_SFNT_Header( TT_Face face,
- FT_Stream stream,
- FT_Long face_index,
- SFNT_Header sfnt );
+ tt_face_load_sfnt_header( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header sfnt );
FT_LOCAL( FT_Error )
- TT_Load_Directory( TT_Face face,
- FT_Stream stream,
- SFNT_Header sfnt );
+ tt_face_load_directory( TT_Face face,
+ FT_Stream stream,
+ SFNT_Header sfnt );
FT_LOCAL( FT_Error )
- TT_Load_Any( TT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length );
+ tt_face_load_any( TT_Face face,
+ FT_ULong tag,
+ FT_Long offset,
+ FT_Byte* buffer,
+ FT_ULong* length );
FT_LOCAL( FT_Error )
- TT_Load_Header( TT_Face face,
- FT_Stream stream );
+ tt_face_load_header( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Metrics_Header( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical );
+ tt_face_load_metrics_header( TT_Face face,
+ FT_Stream stream,
+ FT_Bool vertical );
FT_LOCAL( FT_Error )
- TT_Load_CMap( TT_Face face,
- FT_Stream stream );
+ tt_face_load_cmap( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_MaxProfile( TT_Face face,
- FT_Stream stream );
+ tt_face_load_max_profile( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Names( TT_Face face,
- FT_Stream stream );
+ tt_face_load_names( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_OS2( TT_Face face,
- FT_Stream stream );
+ tt_face_load_os2( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_PostScript( TT_Face face,
- FT_Stream stream );
+ tt_face_load_postscript( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Hdmx( TT_Face face,
- FT_Stream stream );
+ tt_face_load_hdmx( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_PCLT( TT_Face face,
- FT_Stream stream );
+ tt_face_load_pclt( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( void )
- TT_Free_Names( TT_Face face );
+ tt_face_free_names( TT_Face face );
FT_LOCAL( void )
- TT_Free_Hdmx ( TT_Face face );
+ tt_face_free_hdmx ( TT_Face face );
FT_LOCAL( FT_Error )
- TT_Load_Kern( TT_Face face,
- FT_Stream stream );
+ tt_face_load_kern( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Gasp( TT_Face face,
- FT_Stream stream );
+ tt_face_load_gasp( TT_Face face,
+ FT_Stream stream );
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
FT_LOCAL( FT_Error )
- TT_Load_Bitmap_Header( TT_Face face,
- FT_Stream stream );
+ tt_face_load_bitmap_header( TT_Face face,
+ FT_Stream stream );
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index 686a98764..a5488491e 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -62,11 +62,11 @@
/* table of Mac names. Thus, it is possible to build a version of */
/* FreeType without the Type 1 driver & PSNames module. */
-#define MAC_NAME( x ) TT_Post_Default_Names[x]
+#define MAC_NAME( x ) tt_post_default_names[x]
/* the 258 default Mac PS glyph names */
- FT_String* TT_Post_Default_Names[258] =
+ static const FT_String* tt_post_default_names[258] =
{
/* 0 */
".notdef", ".null", "CR", "space", "exclam",
@@ -153,7 +153,7 @@
static FT_Error
- Load_Format_20( TT_Face face,
+ load_format_20( TT_Face face,
FT_Stream stream )
{
FT_Memory memory = stream->memory;
@@ -271,7 +271,7 @@
static FT_Error
- Load_Format_25( TT_Face face,
+ load_format_25( TT_Face face,
FT_Stream stream )
{
FT_Memory memory = stream->memory;
@@ -334,7 +334,7 @@
static FT_Error
- Load_Post_Names( TT_Face face )
+ load_post_names( TT_Face face )
{
FT_Stream stream;
FT_Error error;
@@ -359,11 +359,11 @@
switch ( format )
{
case 0x00020000L:
- error = Load_Format_20( face, stream );
+ error = load_format_20( face, stream );
break;
case 0x00028000L:
- error = Load_Format_25( face, stream );
+ error = load_format_25( face, stream );
break;
default:
@@ -378,7 +378,7 @@
FT_LOCAL_DEF( void )
- TT_Free_Post_Names( TT_Face face )
+ tt_face_free_ps_names( TT_Face face )
{
FT_Memory memory = face->root.memory;
TT_Post_Names names = &face->postscript_names;
@@ -423,7 +423,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Get_PS_Name */
+ /* tt_face_get_ps_name */
/* */
/* <Description> */
/* Gets the PostScript glyph name of a glyph. */
@@ -442,9 +442,9 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Get_PS_Name( TT_Face face,
- FT_UInt idx,
- FT_String** PSname )
+ tt_face_get_ps_name( TT_Face face,
+ FT_UInt idx,
+ FT_String** PSname )
{
FT_Error error;
TT_Post_Names names;
@@ -485,7 +485,7 @@
if ( !names->loaded )
{
- error = Load_Post_Names( face );
+ error = load_post_names( face );
if ( error )
break;
}
@@ -510,7 +510,7 @@
if ( !names->loaded )
{
- error = Load_Post_Names( face );
+ error = load_post_names( face );
if ( error )
break;
}
diff --git a/src/sfnt/ttpost.h b/src/sfnt/ttpost.h
index 57b1c8c70..6f06d75a7 100644
--- a/src/sfnt/ttpost.h
+++ b/src/sfnt/ttpost.h
@@ -30,12 +30,12 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- TT_Get_PS_Name( TT_Face face,
- FT_UInt idx,
- FT_String** PSname );
+ tt_face_get_ps_name( TT_Face face,
+ FT_UInt idx,
+ FT_String** PSname );
FT_LOCAL( void )
- TT_Free_Post_Names( TT_Face face );
+ tt_face_free_ps_names( TT_Face face );
FT_END_HEADER
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index d72c83d92..695105ed1 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -377,7 +377,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_SBit_Strikes */
+ /* tt_face_load_sbit_strikes */
/* */
/* <Description> */
/* Loads the table of embedded bitmap sizes for this face. */
@@ -391,8 +391,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_SBit_Strikes( TT_Face face,
- FT_Stream stream )
+ tt_face_load_sbit_strikes( TT_Face face,
+ FT_Stream stream )
{
FT_Error error = 0;
FT_Memory memory = stream->memory;
@@ -471,7 +471,7 @@
if ( version != 0x00020000L ||
num_strikes >= 0x10000L )
{
- FT_ERROR(( "TT_Load_SBit_Strikes: invalid table version!\n" ));
+ FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version!\n" ));
error = SFNT_Err_Invalid_File_Format;
goto Exit;
@@ -577,7 +577,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Free_SBit_Strikes */
+ /* tt_face_free_sbit_strikes */
/* */
/* <Description> */
/* Releases the embedded bitmap tables. */
@@ -586,7 +586,7 @@
/* face :: The target face object. */
/* */
FT_LOCAL_DEF( void )
- TT_Free_SBit_Strikes( TT_Face face )
+ tt_face_free_sbit_strikes( TT_Face face )
{
FT_Memory memory = face->root.memory;
TT_SBit_Strike strike = face->sbit_strikes;
@@ -621,7 +621,7 @@
FT_LOCAL_DEF( FT_Error )
- TT_Set_SBit_Strike( TT_Face face,
+ tt_face_set_sbit_strike( TT_Face face,
FT_Int x_ppem,
FT_Int y_ppem,
FT_ULong *astrike_index )
@@ -651,7 +651,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Find_SBit_Range */
+ /* find_sbit_range */
/* */
/* <Description> */
/* Scans a given strike's ranges and return, for a given glyph */
@@ -671,7 +671,7 @@
/* FreeType error code. 0 means the glyph index was found. */
/* */
static FT_Error
- Find_SBit_Range( FT_UInt glyph_index,
+ find_sbit_range( FT_UInt glyph_index,
TT_SBit_Strike strike,
TT_SBit_Range *arange,
FT_ULong *aglyph_offset )
@@ -754,7 +754,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Find_SBit_Image */
+ /* find_sbit_image */
/* */
/* <Description> */
/* Checks whether an embedded bitmap (an `sbit') exists for a given */
@@ -780,7 +780,7 @@
/* glyph. */
/* */
static FT_Error
- Find_SBit_Image( TT_Face face,
+ find_sbit_image( TT_Face face,
FT_UInt glyph_index,
FT_ULong strike_index,
TT_SBit_Range *arange,
@@ -797,7 +797,7 @@
strike = &face->sbit_strikes[strike_index];
- error = Find_SBit_Range( glyph_index, strike,
+ error = find_sbit_range( glyph_index, strike,
arange, aglyph_offset );
if ( error )
goto Fail;
@@ -819,7 +819,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Load_SBit_Metrics */
+ /* load_sbit_metrics */
/* */
/* <Description> */
/* Gets the big metrics for a given SBit. */
@@ -844,7 +844,7 @@
/* function exit. */
/* */
static FT_Error
- Load_SBit_Metrics( FT_Stream stream,
+ load_sbit_metrics( FT_Stream stream,
TT_SBit_Range range,
TT_SBit_Metrics metrics )
{
@@ -918,7 +918,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Crop_Bitmap */
+ /* crop_bitmap */
/* */
/* <Description> */
/* Crops a bitmap to its tightest bounding box, and adjusts its */
@@ -930,7 +930,7 @@
/* metrics :: The corresponding metrics structure. */
/* */
static void
- Crop_Bitmap( FT_Bitmap* map,
+ crop_bitmap( FT_Bitmap* map,
TT_SBit_Metrics metrics )
{
/***********************************************************************/
@@ -1116,7 +1116,7 @@
map->width = 0;
map->rows = 0;
map->pitch = 0;
- map->pixel_mode = ft_pixel_mode_mono;
+ map->pixel_mode = FT_PIXEL_MODE_MONO;
}
@@ -1226,7 +1226,7 @@
if ( FT_STREAM_SEEK( ebdt_pos + glyph_offset ) )
goto Exit;
- error = Load_SBit_Metrics( stream, range, metrics );
+ error = load_sbit_metrics( stream, range, metrics );
if ( error )
goto Exit;
@@ -1245,22 +1245,22 @@
switch ( strike->bit_depth )
{
case 1:
- map->pixel_mode = ft_pixel_mode_mono;
+ map->pixel_mode = FT_PIXEL_MODE_MONO;
map->pitch = ( map->width + 7 ) >> 3;
break;
case 2:
- map->pixel_mode = ft_pixel_mode_pal2;
+ map->pixel_mode = FT_PIXEL_MODE_GRAY2;
map->pitch = ( map->width + 3 ) >> 2;
break;
case 4:
- map->pixel_mode = ft_pixel_mode_pal4;
+ map->pixel_mode = FT_PIXEL_MODE_GRAY4;
map->pitch = ( map->width + 1 ) >> 1;
break;
case 8:
- map->pixel_mode = ft_pixel_mode_grays;
+ map->pixel_mode = FT_PIXEL_MODE_GRAY;
map->pitch = map->width;
break;
@@ -1336,7 +1336,7 @@
/* find the range for this element */
- error = Find_SBit_Range( comp->glyph_code,
+ error = find_sbit_range( comp->glyph_code,
strike,
&elem_range,
&elem_offset );
@@ -1369,7 +1369,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_SBit_Image */
+ /* tt_face_load_sbit_image */
/* */
/* <Description> */
/* Loads a given glyph sbit image from the font resource. This also */
@@ -1400,13 +1400,13 @@
/* The `map.buffer' field is always freed before the glyph is loaded. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_SBit_Image( TT_Face face,
- FT_ULong strike_index,
- FT_UInt glyph_index,
- FT_UInt load_flags,
- FT_Stream stream,
- FT_Bitmap *map,
- TT_SBit_MetricsRec *metrics )
+ tt_face_load_sbit_image( TT_Face face,
+ FT_ULong strike_index,
+ FT_UInt glyph_index,
+ FT_UInt load_flags,
+ FT_Stream stream,
+ FT_Bitmap *map,
+ TT_SBit_MetricsRec *metrics )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1417,7 +1417,7 @@
/* Check whether there is a glyph sbit for the current index */
- error = Find_SBit_Image( face, glyph_index, strike_index,
+ error = find_sbit_image( face, glyph_index, strike_index,
&range, &strike, &glyph_offset );
if ( error )
goto Exit;
@@ -1464,7 +1464,7 @@
/* Crop the bitmap now, unless specified otherwise */
if ( load_flags & FT_LOAD_CROP_BITMAP )
- Crop_Bitmap( map, metrics );
+ crop_bitmap( map, metrics );
Exit:
return error;
diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h
index f38123d7a..edc858a60 100644
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -28,27 +28,27 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- TT_Load_SBit_Strikes( TT_Face face,
- FT_Stream stream );
+ tt_face_load_sbit_strikes( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( void )
- TT_Free_SBit_Strikes( TT_Face face );
+ tt_face_free_sbit_strikes( TT_Face face );
FT_LOCAL( FT_Error )
- TT_Set_SBit_Strike( TT_Face face,
- FT_Int x_ppem,
- FT_Int y_ppem,
- FT_ULong *astrike_index );
+ tt_face_set_sbit_strike( TT_Face face,
+ FT_Int x_ppem,
+ FT_Int y_ppem,
+ FT_ULong *astrike_index );
FT_LOCAL( FT_Error )
- TT_Load_SBit_Image( TT_Face face,
- FT_ULong strike_index,
- FT_UInt glyph_index,
- FT_UInt load_flags,
- FT_Stream stream,
- FT_Bitmap *map,
- TT_SBit_MetricsRec *metrics );
+ tt_face_load_sbit_image( TT_Face face,
+ FT_ULong strike_index,
+ FT_UInt glyph_index,
+ FT_UInt load_flags,
+ FT_Stream stream,
+ FT_Bitmap *map,
+ TT_SBit_MetricsRec *metrics );
FT_END_HEADER