| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* cffcmap.c */ | 3 /* cffcmap.c */ |
| 4 /* */ | 4 /* */ |
| 5 /* CFF character mapping table (cmap) support (body). */ | 5 /* CFF character mapping table (cmap) support (body). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */ | 7 /* Copyright 2002-2007, 2010, 2013 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
| 11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| 18 | 18 |
| 19 #include <ft2build.h> |
| 20 #include FT_INTERNAL_DEBUG_H |
| 19 #include "cffcmap.h" | 21 #include "cffcmap.h" |
| 20 #include "cffload.h" | 22 #include "cffload.h" |
| 21 | 23 |
| 22 #include "cfferrs.h" | 24 #include "cfferrs.h" |
| 23 | 25 |
| 24 | 26 |
| 25 /*************************************************************************/ | 27 /*************************************************************************/ |
| 26 /*************************************************************************/ | 28 /*************************************************************************/ |
| 27 /***** *****/ | 29 /***** *****/ |
| 28 /***** CFF STANDARD (AND EXPERT) ENCODING CMAPS *****/ | 30 /***** CFF STANDARD (AND EXPERT) ENCODING CMAPS *****/ |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes ); | 140 TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes ); |
| 139 FT_Memory memory = FT_FACE_MEMORY( face ); | 141 FT_Memory memory = FT_FACE_MEMORY( face ); |
| 140 CFF_Font cff = (CFF_Font)face->extra.data; | 142 CFF_Font cff = (CFF_Font)face->extra.data; |
| 141 CFF_Charset charset = &cff->charset; | 143 CFF_Charset charset = &cff->charset; |
| 142 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames; | 144 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames; |
| 143 | 145 |
| 144 | 146 |
| 145 /* can't build Unicode map for CID-keyed font */ | 147 /* can't build Unicode map for CID-keyed font */ |
| 146 /* because we don't know glyph names. */ | 148 /* because we don't know glyph names. */ |
| 147 if ( !charset->sids ) | 149 if ( !charset->sids ) |
| 148 return CFF_Err_No_Unicode_Glyph_Name; | 150 return FT_THROW( No_Unicode_Glyph_Name ); |
| 149 | 151 |
| 150 return psnames->unicodes_init( memory, | 152 return psnames->unicodes_init( memory, |
| 151 unicodes, | 153 unicodes, |
| 152 cff->num_glyphs, | 154 cff->num_glyphs, |
| 153 (PS_GetGlyphNameFunc)&cff_sid_to_glyph_name, | 155 (PS_GetGlyphNameFunc)&cff_sid_to_glyph_name, |
| 154 (PS_FreeGlyphNameFunc)NULL, | 156 (PS_FreeGlyphNameFunc)NULL, |
| 155 (FT_Pointer)face ); | 157 (FT_Pointer)face ); |
| 156 } | 158 } |
| 157 | 159 |
| 158 | 160 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 201 |
| 200 (FT_CMap_InitFunc) cff_cmap_unicode_init, | 202 (FT_CMap_InitFunc) cff_cmap_unicode_init, |
| 201 (FT_CMap_DoneFunc) cff_cmap_unicode_done, | 203 (FT_CMap_DoneFunc) cff_cmap_unicode_done, |
| 202 (FT_CMap_CharIndexFunc)cff_cmap_unicode_char_index, | 204 (FT_CMap_CharIndexFunc)cff_cmap_unicode_char_index, |
| 203 (FT_CMap_CharNextFunc) cff_cmap_unicode_char_next, | 205 (FT_CMap_CharNextFunc) cff_cmap_unicode_char_next, |
| 204 | 206 |
| 205 NULL, NULL, NULL, NULL, NULL | 207 NULL, NULL, NULL, NULL, NULL |
| 206 ) | 208 ) |
| 207 | 209 |
| 208 /* END */ | 210 /* END */ |
| OLD | NEW |