sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
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-2025 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
23
#ifndef SVPSCMAP_H_
24
#define SVPSCMAP_H_
25
26
#include <
freetype/internal/ftobjs.h
>
27
28
29
FT_BEGIN_HEADER
30
31
32
#define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps"
33
34
35
/*
36
* Adobe glyph name to unicode value.
37
*/
38
typedef
FT_UInt32
39
(*PS_Unicode_ValueFunc)(
const
char
* glyph_name );
40
41
/*
42
* Macintosh name id to glyph name. `NULL` if invalid index.
43
*/
44
typedef
const
char
*
45
(*PS_Macintosh_NameFunc)( FT_UInt name_index );
46
47
/*
48
* Adobe standard string ID to glyph name. `NULL` if invalid index.
49
*/
50
typedef
const
char
*
51
(*PS_Adobe_Std_StringsFunc)( FT_UInt string_index );
52
53
54
/*
55
* Simple unicode -> glyph index charmap built from font glyph names table.
56
*/
57
typedef
struct
PS_UniMap_
58
{
59
FT_UInt32 unicode;
/* bit 31 set: is glyph variant */
60
FT_UInt glyph_index;
61
62
} PS_UniMap;
63
64
65
typedef
struct
PS_UnicodesRec_
* PS_Unicodes;
66
67
typedef
struct
PS_UnicodesRec_
68
{
69
FT_CMapRec cmap;
70
FT_UInt num_maps;
71
PS_UniMap* maps;
72
73
} PS_UnicodesRec;
74
75
76
/*
77
* A function which returns a glyph name for a given index. Returns
78
* `NULL` if invalid index.
79
*/
80
typedef
const
char
*
81
(*PS_GetGlyphNameFunc)( FT_Pointer data,
82
FT_UInt string_index );
83
84
/*
85
* A function used to release the glyph name returned by
86
* PS_GetGlyphNameFunc, when needed
87
*/
88
typedef
void
89
(*PS_FreeGlyphNameFunc)( FT_Pointer data,
90
const
char
* name );
91
92
typedef
FT_Error
93
(*PS_Unicodes_InitFunc)( FT_Memory memory,
94
PS_Unicodes unicodes,
95
FT_UInt num_glyphs,
96
PS_GetGlyphNameFunc get_glyph_name,
97
PS_FreeGlyphNameFunc free_glyph_name,
98
FT_Pointer glyph_data );
99
100
typedef
FT_UInt
101
(*PS_Unicodes_CharIndexFunc)( PS_Unicodes unicodes,
102
FT_UInt32 unicode );
103
104
typedef
FT_UInt
105
(*PS_Unicodes_CharNextFunc)( PS_Unicodes unicodes,
106
FT_UInt32 *unicode );
107
108
109
FT_DEFINE_SERVICE( PsCMaps )
110
{
111
PS_Unicode_ValueFunc unicode_value;
112
113
PS_Unicodes_InitFunc unicodes_init;
114
PS_Unicodes_CharIndexFunc unicodes_char_index;
115
PS_Unicodes_CharNextFunc unicodes_char_next;
116
117
PS_Macintosh_NameFunc macintosh_name;
118
PS_Adobe_Std_StringsFunc adobe_std_strings;
119
const
unsigned
short
* adobe_std_encoding;
120
const
unsigned
short
* adobe_expert_encoding;
121
};
122
123
124
#define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \
125
unicode_value_, \
126
unicodes_init_, \
127
unicodes_char_index_, \
128
unicodes_char_next_, \
129
macintosh_name_, \
130
adobe_std_strings_, \
131
adobe_std_encoding_, \
132
adobe_expert_encoding_ ) \
133
static const FT_Service_PsCMapsRec class_ = \
134
{ \
135
unicode_value_, unicodes_init_, \
136
unicodes_char_index_, unicodes_char_next_, macintosh_name_, \
137
adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \
138
};
139
140
/* */
141
142
143
FT_END_HEADER
144
145
146
#endif
/* SVPSCMAP_H_ */
147
148
149
/* END */
ftobjs.h
PS_UniMap_
Definition
svpscmap.h:58
PS_UnicodesRec_
Definition
svpscmap.h:68
freetype
include
freetype
internal
services
svpscmap.h
Generated by
1.18.0