#include "t1cmap.h"
#include "psauxerr.h"
Go to the source code of this file.
|
static void | t1_cmap_std_init (T1_CMapStd cmap, FT_Int is_expert) |
|
| t1_cmap_std_done (T1_CMapStd cmap) |
|
| t1_cmap_std_char_index (T1_CMapStd cmap, FT_UInt32 char_code) |
|
| t1_cmap_std_char_next (T1_CMapStd cmap, FT_UInt32 *pchar_code) |
|
| t1_cmap_standard_init (T1_CMapStd cmap, FT_Pointer pointer) |
|
| t1_cmap_expert_init (T1_CMapStd cmap, FT_Pointer pointer) |
|
| t1_cmap_custom_init (T1_CMapCustom cmap, FT_Pointer pointer) |
|
| t1_cmap_custom_done (T1_CMapCustom cmap) |
|
| t1_cmap_custom_char_index (T1_CMapCustom cmap, FT_UInt32 char_code) |
|
| t1_cmap_custom_char_next (T1_CMapCustom cmap, FT_UInt32 *pchar_code) |
|
| psaux_get_glyph_name (T1_Face face, FT_UInt idx) |
|
| t1_cmap_unicode_init (PS_Unicodes unicodes, FT_Pointer pointer) |
|
| t1_cmap_unicode_done (PS_Unicodes unicodes) |
|
| t1_cmap_unicode_char_index (PS_Unicodes unicodes, FT_UInt32 char_code) |
|
| t1_cmap_unicode_char_next (PS_Unicodes unicodes, FT_UInt32 *pchar_code) |
|
◆ psaux_get_glyph_name()
◆ t1_cmap_custom_char_index()
t1_cmap_custom_char_index |
( |
T1_CMapCustom |
cmap, |
|
|
FT_UInt32 |
char_code |
|
) |
| |
Definition at line 221 of file t1cmap.c.
223 {
225
226
227 if ( ( char_code >= cmap->
first ) &&
228 ( char_code < ( cmap->
first + cmap->
count ) ) )
230
232 }
◆ t1_cmap_custom_char_next()
t1_cmap_custom_char_next |
( |
T1_CMapCustom |
cmap, |
|
|
FT_UInt32 * |
pchar_code |
|
) |
| |
Definition at line 236 of file t1cmap.c.
238 {
240 FT_UInt32 char_code = *pchar_code;
241
242
243 char_code++;
244
245 if ( char_code < cmap->
first )
246 char_code = cmap->
first;
247
248 for ( ; char_code < ( cmap->
first + cmap->
count ); char_code++ )
249 {
253 }
254
255 char_code = 0;
256
258 *pchar_code = char_code;
260 }
◆ t1_cmap_custom_done()
◆ t1_cmap_custom_init()
Definition at line 191 of file t1cmap.c.
193 {
196
198
199
203
206
207 return 0;
208 }
#define FT_ASSERT(condition)
GLsizei const GLvoid * pointer
FT_BEGIN_HEADER struct T1_EncodingRecRec_ * T1_Encoding
struct T1_FaceRec_ * T1_Face
◆ t1_cmap_expert_init()
Definition at line 153 of file t1cmap.c.
155 {
157
158
160 return 0;
161 }
static void t1_cmap_std_init(T1_CMapStd cmap, FT_Int is_expert)
◆ t1_cmap_standard_init()
Definition at line 123 of file t1cmap.c.
125 {
127
128
130 return 0;
131 }
◆ t1_cmap_std_char_index()
t1_cmap_std_char_index |
( |
T1_CMapStd |
cmap, |
|
|
FT_UInt32 |
char_code |
|
) |
| |
Definition at line 63 of file t1cmap.c.
65 {
67
68
69 if ( char_code < 256 )
70 {
72 const char* glyph_name;
73
74
75
76 code = cmap->code_to_sid[char_code];
77 glyph_name = cmap->sid_to_string(
code );
78
79
80 for (
n = 0;
n < cmap->num_glyphs;
n++ )
81 {
82 const char* gname = cmap->glyph_names[
n];
83
84
85 if ( gname && gname[0] == glyph_name[0] &&
87 {
89 break;
90 }
91 }
92 }
93
95 }
Referenced by t1_cmap_std_char_next().
◆ t1_cmap_std_char_next()
t1_cmap_std_char_next |
( |
T1_CMapStd |
cmap, |
|
|
FT_UInt32 * |
pchar_code |
|
) |
| |
Definition at line 99 of file t1cmap.c.
101 {
103 FT_UInt32 char_code = *pchar_code + 1;
104
105
106 while ( char_code < 256 )
107 {
111
112 char_code++;
113 }
114 char_code = 0;
115
117 *pchar_code = char_code;
119 }
t1_cmap_std_char_index(T1_CMapStd cmap, FT_UInt32 char_code)
◆ t1_cmap_std_done()
Definition at line 53 of file t1cmap.c.
54 {
55 cmap->num_glyphs = 0;
56 cmap->glyph_names =
NULL;
57 cmap->sid_to_string =
NULL;
58 cmap->code_to_sid =
NULL;
59 }
◆ t1_cmap_std_init()
Definition at line 35 of file t1cmap.c.
37 {
39 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)
face->psnames;
40
41
43 cmap->glyph_names = (
const char*
const*)
face->type1.glyph_names;
44 cmap->sid_to_string = psnames->adobe_std_strings;
45 cmap->code_to_sid = is_expert ? psnames->adobe_expert_encoding
46 : psnames->adobe_std_encoding;
47
49 }
Referenced by t1_cmap_expert_init(), and t1_cmap_standard_init().
◆ t1_cmap_unicode_char_index()
t1_cmap_unicode_char_index |
( |
PS_Unicodes |
unicodes, |
|
|
FT_UInt32 |
char_code |
|
) |
| |
Definition at line 333 of file t1cmap.c.
335 {
337 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)
face->psnames;
338
339
340 return psnames->unicodes_char_index( unicodes, char_code );
341 }
◆ t1_cmap_unicode_char_next()
t1_cmap_unicode_char_next |
( |
PS_Unicodes |
unicodes, |
|
|
FT_UInt32 * |
pchar_code |
|
) |
| |
Definition at line 345 of file t1cmap.c.
347 {
349 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)
face->psnames;
350
351
352 return psnames->unicodes_char_next( unicodes, pchar_code );
353 }
◆ t1_cmap_unicode_done()
Definition at line 321 of file t1cmap.c.
322 {
325
326
329 }
#define FT_FACE_MEMORY(x)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
static char memory[1024 *256]
◆ t1_cmap_unicode_init()
Definition at line 298 of file t1cmap.c.
300 {
303 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)
face->psnames;
304
306
307
308 if ( !psnames->unicodes_init )
309 return FT_THROW( Unimplemented_Feature );
310
311 return psnames->unicodes_init(
memory,
312 unicodes,
317 }
const char *(* PS_GetGlyphNameFunc)(FT_Pointer data, FT_UInt string_index)
void(* PS_FreeGlyphNameFunc)(FT_Pointer data, const char *name)
psaux_get_glyph_name(T1_Face face, FT_UInt idx)
◆ t1_cmap_custom_class_rec
Initial value:=
{
}
FT_UInt(* FT_CMap_CharNextFunc)(FT_CMap cmap, FT_UInt32 *achar_code)
FT_UInt(* FT_CMap_CharVarIndexFunc)(FT_CMap cmap, FT_CMap unicode_cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)
FT_UInt32 *(* FT_CMap_CharVariantListFunc)(FT_CMap cmap, FT_Memory mem, FT_UInt32 char_code)
FT_Int(* FT_CMap_CharVarIsDefaultFunc)(FT_CMap cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)
FT_UInt32 *(* FT_CMap_VariantCharListFunc)(FT_CMap cmap, FT_Memory mem, FT_UInt32 variant_selector)
FT_UInt32 *(* FT_CMap_VariantListFunc)(FT_CMap cmap, FT_Memory mem)
FT_Error(* FT_CMap_InitFunc)(FT_CMap cmap, FT_Pointer init_data)
void(* FT_CMap_DoneFunc)(FT_CMap cmap)
FT_UInt(* FT_CMap_CharIndexFunc)(FT_CMap cmap, FT_UInt32 char_code)
t1_cmap_custom_char_next(T1_CMapCustom cmap, FT_UInt32 *pchar_code)
t1_cmap_custom_init(T1_CMapCustom cmap, FT_Pointer pointer)
t1_cmap_custom_done(T1_CMapCustom cmap)
t1_cmap_custom_char_index(T1_CMapCustom cmap, FT_UInt32 char_code)
struct T1_CMapCustomRec_ T1_CMapCustomRec
Definition at line 264 of file t1cmap.c.
◆ t1_cmap_expert_class_rec
Initial value:=
{
}
t1_cmap_expert_init(T1_CMapStd cmap, FT_Pointer pointer)
t1_cmap_std_char_next(T1_CMapStd cmap, FT_UInt32 *pchar_code)
t1_cmap_std_done(T1_CMapStd cmap)
struct T1_CMapStdRec_ T1_CMapStdRec
Definition at line 164 of file t1cmap.c.
◆ t1_cmap_standard_class_rec
Initial value:=
{
}
t1_cmap_standard_init(T1_CMapStd cmap, FT_Pointer pointer)
Definition at line 135 of file t1cmap.c.
◆ t1_cmap_unicode_class_rec
Initial value:=
{
}
struct PS_UnicodesRec_ PS_UnicodesRec
t1_cmap_unicode_char_next(PS_Unicodes unicodes, FT_UInt32 *pchar_code)
t1_cmap_unicode_init(PS_Unicodes unicodes, FT_Pointer pointer)
t1_cmap_unicode_char_index(PS_Unicodes unicodes, FT_UInt32 char_code)
t1_cmap_unicode_done(PS_Unicodes unicodes)
Definition at line 357 of file t1cmap.c.