aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/cff/cffcmap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-06 11:48:36 +0000
committermarha <marha@users.sourceforge.net>2010-08-06 11:48:36 +0000
commit20ff8ddf2d9bb41050d10bbc75d61b9161880c7c (patch)
tree22566fcd9663b2baa565cd0c64eaa662d6ba03ee /freetype/src/cff/cffcmap.c
parentc29011f2831315d3da9c4727c1e626d80520b97a (diff)
parent6849d83857b4e470a44ad8b6aa5cfb283fd64c89 (diff)
downloadvcxsrv-20ff8ddf2d9bb41050d10bbc75d61b9161880c7c.tar.gz
vcxsrv-20ff8ddf2d9bb41050d10bbc75d61b9161880c7c.tar.bz2
vcxsrv-20ff8ddf2d9bb41050d10bbc75d61b9161880c7c.zip
svn merge ^/branches/released .
Diffstat (limited to 'freetype/src/cff/cffcmap.c')
-rw-r--r--freetype/src/cff/cffcmap.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/freetype/src/cff/cffcmap.c b/freetype/src/cff/cffcmap.c
index 46d603e3a..129837110 100644
--- a/freetype/src/cff/cffcmap.c
+++ b/freetype/src/cff/cffcmap.c
@@ -4,7 +4,7 @@
/* */
/* CFF character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -120,27 +120,15 @@
/*************************************************************************/
FT_CALLBACK_DEF( const char* )
- cff_sid_to_glyph_name( TT_Face face,
- FT_UInt idx )
+ cff_sid_to_glyph_name( TT_Face face,
+ FT_UInt idx )
{
- CFF_Font cff = (CFF_Font)face->extra.data;
- CFF_Charset charset = &cff->charset;
- FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
- FT_UInt sid = charset->sids[idx];
-
-
- return cff_index_get_sid_string( &cff->string_index, sid, psnames );
- }
-
-
- FT_CALLBACK_DEF( void )
- cff_sid_free_glyph_name( TT_Face face,
- const char* gname )
- {
- FT_Memory memory = FT_FACE_MEMORY( face );
+ CFF_Font cff = (CFF_Font)face->extra.data;
+ CFF_Charset charset = &cff->charset;
+ FT_UInt sid = charset->sids[idx];
- FT_FREE( gname );
+ return cff_index_get_sid_string( cff, sid );
}
@@ -155,14 +143,15 @@
/* can't build Unicode map for CID-keyed font */
+ /* because we don't know glyph names. */
if ( !charset->sids )
- return CFF_Err_Invalid_Argument;
+ return CFF_Err_No_Unicode_Glyph_Name;
return psnames->unicodes_init( memory,
unicodes,
cff->num_glyphs,
(PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,
- (PS_FreeGlyphNameFunc)&cff_sid_free_glyph_name,
+ (PS_FreeGlyphNameFunc)NULL,
(FT_Pointer)face );
}