ReactOS 0.4.16-dev-1025-gd3456f5
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 (C) 2003-2019 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
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 table.
52 */
53 typedef struct PS_UniMap_
54 {
55 FT_UInt32 unicode; /* bit 31 set: is glyph variant */
57
59
60
62
63 typedef struct PS_UnicodesRec_
64 {
68
70
71
72 /*
73 * A function which returns a glyph name for a given index. Returns
74 * `NULL` if invalid index.
75 */
76 typedef const char*
77 (*PS_GetGlyphNameFunc)( FT_Pointer data,
79
80 /*
81 * A function used to release the glyph name returned by
82 * PS_GetGlyphNameFunc, when needed
83 */
84 typedef void
86 const char* name );
87
88 typedef FT_Error
90 PS_Unicodes unicodes,
91 FT_UInt num_glyphs,
92 PS_GetGlyphNameFunc get_glyph_name,
93 PS_FreeGlyphNameFunc free_glyph_name,
94 FT_Pointer glyph_data );
95
96 typedef FT_UInt
98 FT_UInt32 unicode );
99
100 typedef FT_UInt32
102 FT_UInt32 *unicode );
103
104
106 {
107 PS_Unicode_ValueFunc unicode_value;
108
109 PS_Unicodes_InitFunc unicodes_init;
110 PS_Unicodes_CharIndexFunc unicodes_char_index;
111 PS_Unicodes_CharNextFunc unicodes_char_next;
112
113 PS_Macintosh_NameFunc macintosh_name;
114 PS_Adobe_Std_StringsFunc adobe_std_strings;
115 const unsigned short* adobe_std_encoding;
116 const unsigned short* adobe_expert_encoding;
117 };
118
119
120#define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \
121 unicode_value_, \
122 unicodes_init_, \
123 unicodes_char_index_, \
124 unicodes_char_next_, \
125 macintosh_name_, \
126 adobe_std_strings_, \
127 adobe_std_encoding_, \
128 adobe_expert_encoding_ ) \
129 static const FT_Service_PsCMapsRec class_ = \
130 { \
131 unicode_value_, unicodes_init_, \
132 unicodes_char_index_, unicodes_char_next_, macintosh_name_, \
133 adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \
134 };
135
136 /* */
137
138
140
141
142#endif /* SVPSCMAP_H_ */
143
144
145/* END */
#define FT_END_HEADER
Definition: ftheader.h:54
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
#define FT_DEFINE_SERVICE(name)
Definition: ftserv.h:480
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:65
int FT_Error
Definition: fttypes.h:299
unsigned int FT_UInt
Definition: fttypes.h:231
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static char memory[1024 *256]
Definition: process.c:116
FT_UInt glyph_index
Definition: svpscmap.h:56
FT_UInt32 unicode
Definition: svpscmap.h:55
FT_CMapRec cmap
Definition: svpscmap.h:65
FT_UInt num_maps
Definition: svpscmap.h:66
PS_UniMap * maps
Definition: svpscmap.h:67
Definition: name.c:39
const char *(* PS_Macintosh_NameFunc)(FT_UInt name_index)
Definition: svpscmap.h:41
const char *(* PS_GetGlyphNameFunc)(FT_Pointer data, FT_UInt string_index)
Definition: svpscmap.h:77
const char *(* PS_Adobe_Std_StringsFunc)(FT_UInt string_index)
Definition: svpscmap.h:47
FT_UInt32(* PS_Unicode_ValueFunc)(const char *glyph_name)
Definition: svpscmap.h:35
FT_UInt32(* PS_Unicodes_CharNextFunc)(PS_Unicodes unicodes, FT_UInt32 *unicode)
Definition: svpscmap.h:101
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:89
void(* PS_FreeGlyphNameFunc)(FT_Pointer data, const char *name)
Definition: svpscmap.h:85
struct PS_UnicodesRec_ * PS_Unicodes
Definition: svpscmap.h:61
FT_UInt(* PS_Unicodes_CharIndexFunc)(PS_Unicodes unicodes, FT_UInt32 unicode)
Definition: svpscmap.h:97
struct PS_UnicodesRec_ PS_UnicodesRec
struct PS_UniMap_ PS_UniMap