zenilib: zenilib/jni/external/freetype2/include/freetype/internal/services/svpscmap.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
svpscmap.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* svpscmap.h */
4 /* */
5 /* The FreeType PostScript charmap service (specification). */
6 /* */
7 /* Copyright 2003, 2006, 2009, 2012 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */
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 */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
15 /* */
16 /***************************************************************************/
17
18
19 #ifndef __SVPSCMAP_H__
20 #define __SVPSCMAP_H__
21
22 #include FT_INTERNAL_OBJECTS_H
23
24
25 FT_BEGIN_HEADER
26
27
28 #define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps"
29
30
31 /*
32 * Adobe glyph name to unicode value.
33 */
34 typedef FT_UInt32
35 (*PS_Unicode_ValueFunc)( const char* glyph_name );
36
37 /*
38 * Macintosh name id to glyph name. NULL if invalid index.
39 */
40 typedef const char*
41 (*PS_Macintosh_NameFunc)( FT_UInt name_index );
42
43 /*
44 * Adobe standard string ID to glyph name. NULL if invalid index.
45 */
46 typedef const char*
47 (*PS_Adobe_Std_StringsFunc)( FT_UInt string_index );
48
49
50 /*
51 * Simple unicode -> glyph index charmap built from font glyph names
52 * table.
53 */
54 typedef struct PS_UniMap_
55 {
56 FT_UInt32 unicode; /* bit 31 set: is glyph variant */
57 FT_UInt glyph_index;
58
59 } PS_UniMap;
60
61
62 typedef struct PS_UnicodesRec_* PS_Unicodes;
63
64 typedef struct PS_UnicodesRec_
65 {
66 FT_CMapRec cmap;
67 FT_UInt num_maps;
68 PS_UniMap* maps;
69
70 } PS_UnicodesRec;
71
72
73 /*
74 * A function which returns a glyph name for a given index. Returns
75 * NULL if invalid index.
76 */
77 typedef const char*
78 (*PS_GetGlyphNameFunc)( FT_Pointer data,
79 FT_UInt string_index );
80
81 /*
82 * A function used to release the glyph name returned by
83 * PS_GetGlyphNameFunc, when needed
84 */
85 typedef void
86 (*PS_FreeGlyphNameFunc)( FT_Pointer data,
87 const char* name );
88
89 typedef FT_Error
90 (*PS_Unicodes_InitFunc)( FT_Memory memory,
91 PS_Unicodes unicodes,
92 FT_UInt num_glyphs,
93 PS_GetGlyphNameFunc get_glyph_name,
94 PS_FreeGlyphNameFunc free_glyph_name,
95 FT_Pointer glyph_data );
96
97 typedef FT_UInt
98 (*PS_Unicodes_CharIndexFunc)( PS_Unicodes unicodes,
99 FT_UInt32 unicode );
100
101 typedef FT_UInt32
102 (*PS_Unicodes_CharNextFunc)( PS_Unicodes unicodes,
103 FT_UInt32 *unicode );
104
105
106 FT_DEFINE_SERVICE( PsCMaps )
107 {
108 PS_Unicode_ValueFunc unicode_value;
109
110 PS_Unicodes_InitFunc unicodes_init;
111 PS_Unicodes_CharIndexFunc unicodes_char_index;
112 PS_Unicodes_CharNextFunc unicodes_char_next;
113
114 PS_Macintosh_NameFunc macintosh_name;
115 PS_Adobe_Std_StringsFunc adobe_std_strings;
116 const unsigned short* adobe_std_encoding;
117 const unsigned short* adobe_expert_encoding;
118 };
119
120
121 #ifndef FT_CONFIG_OPTION_PIC
122
123 #define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \
124 unicode_value_, \
125 unicodes_init_, \
126 unicodes_char_index_, \
127 unicodes_char_next_, \
128 macintosh_name_, \
129 adobe_std_strings_, \
130 adobe_std_encoding_, \
131 adobe_expert_encoding_ ) \
132 static const FT_Service_PsCMapsRec class_ = \
133 { \
134 unicode_value_, unicodes_init_, \
135 unicodes_char_index_, unicodes_char_next_, macintosh_name_, \
136 adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \
137 };
138
139 #else /* FT_CONFIG_OPTION_PIC */
140
141 #define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \
142 unicode_value_, \
143 unicodes_init_, \
144 unicodes_char_index_, \
145 unicodes_char_next_, \
146 macintosh_name_, \
147 adobe_std_strings_, \
148 adobe_std_encoding_, \
149 adobe_expert_encoding_ ) \
150 void \
151 FT_Init_Class_ ## class_( FT_Library library, \
152 FT_Service_PsCMapsRec* clazz ) \
153 { \
154 FT_UNUSED( library ); \
155 \
156 clazz->unicode_value = unicode_value_; \
157 clazz->unicodes_init = unicodes_init_; \
158 clazz->unicodes_char_index = unicodes_char_index_; \
159 clazz->unicodes_char_next = unicodes_char_next_; \
160 clazz->macintosh_name = macintosh_name_; \
161 clazz->adobe_std_strings = adobe_std_strings_; \
162 clazz->adobe_std_encoding = adobe_std_encoding_; \
163 clazz->adobe_expert_encoding = adobe_expert_encoding_; \
164 }
165
166 #endif /* FT_CONFIG_OPTION_PIC */
167
168 /* */
169
170
171 FT_END_HEADER
172
173
174 #endif /* __SVPSCMAP_H__ */
175
176
177 /* END */
FT_Error
int FT_Error
Definition: fttypes.h:296
FT_DEFINE_SERVICE
#define FT_DEFINE_SERVICE(name)
Definition: ftserv.h:650
void
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
Definition: glew.h:1824
PS_UnicodesRec_
Definition: svpscmap.h:64
FT_END_HEADER
#define FT_END_HEADER
Definition: ftheader.h:54
PS_Adobe_Std_StringsFunc
const char *(* PS_Adobe_Std_StringsFunc)(FT_UInt string_index)
Definition: svpscmap.h:47
PS_UniMap
struct PS_UniMap_ PS_UniMap
name
EGLImageKHR EGLint * name
Definition: eglext.h:284
PS_UnicodesRec_::cmap
FT_CMapRec cmap
Definition: svpscmap.h:66
PS_Unicodes
struct PS_UnicodesRec_ * PS_Unicodes
Definition: svpscmap.h:62
PS_UnicodesRec
struct PS_UnicodesRec_ PS_UnicodesRec
FT_BEGIN_HEADER
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
PS_GetGlyphNameFunc
const char *(* PS_GetGlyphNameFunc)(FT_Pointer data, FT_UInt string_index)
Definition: svpscmap.h:78
PS_UnicodesRec_::maps
PS_UniMap * maps
Definition: svpscmap.h:68
PS_UniMap_
Definition: svpscmap.h:54
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl2ext.h:848
PS_UniMap_::glyph_index
FT_UInt glyph_index
Definition: svpscmap.h:57
FT_Pointer
void * FT_Pointer
Definition: fttypes.h:307
FT_CMapRec_
Definition: ftobjs.h:131
FT_Memory
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
PS_FreeGlyphNameFunc
void(* PS_FreeGlyphNameFunc)(FT_Pointer data, const char *name)
Definition: svpscmap.h:86
PS_Unicodes_CharNextFunc
FT_UInt32(* PS_Unicodes_CharNextFunc)(PS_Unicodes unicodes, FT_UInt32 *unicode)
Definition: svpscmap.h:102
PS_Unicodes_CharIndexFunc
FT_UInt(* PS_Unicodes_CharIndexFunc)(PS_Unicodes unicodes, FT_UInt32 unicode)
Definition: svpscmap.h:98
FT_UInt
unsigned int FT_UInt
Definition: fttypes.h:227
PS_Unicode_ValueFunc
FT_UInt32(* PS_Unicode_ValueFunc)(const char *glyph_name)
Definition: svpscmap.h:35
PS_Unicodes_InitFunc
FT_Error(* PS_Unicodes_InitFunc)(FT_Memory memory, PS_Unicodes unicodes, FT_UInt num_glyphs, PS_GetGlyphNameFunc get_glyph_name, PS_FreeGlyphNameFunc free_glyph_name, FT_Pointer glyph_data)
Definition: svpscmap.h:90
PS_UniMap_::unicode
FT_UInt32 unicode
Definition: svpscmap.h:56
PS_UnicodesRec_::num_maps
FT_UInt num_maps
Definition: svpscmap.h:67
PS_Macintosh_NameFunc
const char *(* PS_Macintosh_NameFunc)(FT_UInt name_index)
Definition: svpscmap.h:41