Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed
















Rev Author Line No. Line
4349 Serge 1
2
"http://www.w3.org/TR/html4/loose.dtd">
3
4
5
6
FreeType-2.5.0 API Reference
7
32
33
34
 
35
[Index]
36
37
[TOC]
38

FreeType-2.5.0 API Reference

39
 
40

41
SFNT Names
42
43

Synopsis

44
45
FT_SfntName
46
FT_Get_Sfnt_Name_Count
47
FT_Get_Sfnt_Name
48
FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
49
FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
50


51
 
52
53

The TrueType and OpenType specifications allow the inclusion of a special ‘names table’ in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.

54

The definitions below are used to access them if available.

55

Note that this has nothing to do with glyph names!

56

57
58

FT_SfntName

59
60
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
61

62
63
 
64
  typedef struct  FT_SfntName_
65
  {
66
    FT_UShort  platform_id;
67
    FT_UShort  encoding_id;
68
    FT_UShort  language_id;
69
    FT_UShort  name_id;
70
 
71
    FT_Byte*   string;      /* this string is *not* null-terminated! */
72
    FT_UInt    string_len;  /* in bytes */
73
 
74
  } FT_SfntName;
75
 
76

77
78

A structure used to model an SFNT ‘name’ table entry.

79

80
fields
81

82
83
platform_id
84

The platform ID for ‘string’.

85
86
encoding_id
87

The encoding ID for ‘string’.

88
89
language_id
90

The language ID for ‘string’.

91
92
name_id
93

An identifier for ‘string’.

94
95
string
96

The ‘name’ string. Note that its format differs depending on the (platform,encoding) pair. It can be a Pascal String, a UTF-16 one, etc.

97

Generally speaking, the string is not zero-terminated. Please refer to the TrueType specification for details.

98
99
string_len
100

The length of ‘string’ in bytes.

101
102
103
104
note
105

Possible values for ‘platform_id’, ‘encoding_id’, ‘language_id’, and ‘name_id’ are given in the file ‘ttnameid.h’. For details please refer to the TrueType or OpenType specification.

106

See also TT_PLATFORM_XXX, TT_APPLE_ID_XXX, TT_MAC_ID_XXX, TT_ISO_ID_XXX, and TT_MS_ID_XXX.

107
108
109

110
[Index]
111
112
[TOC]
113
 
114
115

FT_Get_Sfnt_Name_Count

116
117
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
118

119
120
 
121
  FT_EXPORT( FT_UInt )
122
  FT_Get_Sfnt_Name_Count( FT_Face  face );
123
 
124

125
126

Retrieve the number of name strings in the SFNT ‘name’ table.

127

128
input
129

130
131
face
132

A handle to the source face.

133
134
135
136
return
137

The number of strings in the ‘name’ table.

138
139
140

141
[Index]
142
143
[TOC]
144
 
145
146

FT_Get_Sfnt_Name

147
148
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
149

150
151
 
152
  FT_EXPORT( FT_Error )
153
  FT_Get_Sfnt_Name( FT_Face       face,
154
                    FT_UInt       idx,
155
                    FT_SfntName  *aname );
156
 
157

158
159

Retrieve a string of the SFNT ‘name’ table for a given index.

160

161
input
162

163
164
face
165

A handle to the source face.

166
167
idx
168

The index of the ‘name’ string.

169
170
171
172
output
173

174
175
aname
176

The indexed FT_SfntName structure.

177
178
179
180
return
181

FreeType error code. 0 means success.

182
183
note
184

The ‘string’ array returned in the ‘aname’ structure is not null-terminated. The application should deallocate it if it is no longer in use.

185

Use FT_Get_Sfnt_Name_Count to get the total number of available ‘name’ table entries, then do a loop until you get the right platform, encoding, and name ID.

186
187
188

189
[Index]
190
191
[TOC]
192
 
193
194

FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY

195
196
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
197

198
199
 
200
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY  FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
201
 
202

203
204

A constant used as the tag of FT_Parameter structures to make FT_Open_Face() ignore preferred family subfamily names in ‘name’ table since OpenType version 1.4. For backwards compatibility with legacy systems which has 4-face-per-family restriction.

205

206
207

208
[Index]
209
210
[TOC]
211
 
212
213

FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY

214
215
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
216

217
218
 
219
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY  FT_MAKE_TAG( 'i', 'g', 'p', 's' )
220
 
221

222
223

A constant used as the tag of FT_Parameter structures to make FT_Open_Face() ignore preferred subfamily names in ‘name’ table since OpenType version 1.4. For backwards compatibility with legacy systems which has 4-face-per-family restriction.

224

225
226

227
[Index]
228
229
[TOC]
230
 
231
232