<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8">
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
background: #FFFFFF; }
p { text-align: justify; }
h1 { text-align: center; }
li { text-align: justify; }
td { padding: 0 0.5em 0 0.5em; }
td.left { padding: 0 0.5em 0 0.5em;
text-align: left; }
a:link { color: #0000EF; }
a:visited { color: #51188E; }
a:hover { color: #FF0000; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
pre.colored { color: blue; }
ul.empty { list-style-type: none; }
SFNT Names
<
table align=center
cellspacing=5 cellpadding=0 border=0>
<
tr><
td><
/td><
td><
a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count<
/a><
/td><
/tr>
<
tr><
td><
/td><
td><
a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name<
/a><
/td><
/tr>
<
tr><
td><
/td><
td><
a href="#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY<
/a><
/td><
/tr>
<
tr><
td><
/td><
td><
a href="#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY<
/a><
/td><
/tr>
<
p>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.<
/p>
<
p>The definitions below are used to access them if available.<
/p>
<
p>Note that this has nothing to do with glyph names!<
/p>
<
h4><
a name="FT_SfntName">FT_SfntName<
/a><
/h4>
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
<
table align=center
width="87%"><
tr bgcolor="#D6E8FF"><
td><
pre>
<
span class="keyword">typedef<
/span> <
span class="keyword">struct<
/span> FT_SfntName_
{
<
a href="ft2-basic_types.html#FT_UShort">FT_UShort<
/a> platform_id;
<
a href="ft2-basic_types.html#FT_UShort">FT_UShort<
/a> encoding_id;
<
a href="ft2-basic_types.html#FT_UShort">FT_UShort<
/a> language_id;
<
a href="ft2-basic_types.html#FT_UShort">FT_UShort<
/a> name_id;
<
a href="ft2-basic_types.html#FT_Byte">FT_Byte<
/a>* string;
/* this string is *not* null-terminated! *
/
<
a href="ft2-basic_types.html#FT_UInt">FT_UInt<
/a> string_len;
/* in bytes *
/
<
p>A structure used to model an SFNT ‘name’ table entry.<
/p>
<
table cellpadding=3 border=0>
<
p>The platform
ID for ‘string’.<
/p>
<
p>The encoding
ID for ‘string’.<
/p>
<
p>The
language ID for ‘string’.<
/p>
<
p>An identifier
for ‘string’.<
/p>
<
p>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.<
/p>
<
p>Generally speaking, the string is not zero-terminated. Please refer to the TrueType specification
for details.<
/p>
<
p>The length of ‘string’ in bytes.<
/p>
<
p>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.<
/p>
<
p>See also <
a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX<
/a>, <
a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX<
/a>, <
a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX<
/a>, <
a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX<
/a>, and <
a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX<
/a>.<
/p>
<
h4><
a name="FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count<
/a><
/h4>
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
<
table align=center
width="87%"><
tr bgcolor="#D6E8FF"><
td><
pre>
FT_EXPORT
( <
a href="ft2-basic_types.html#FT_UInt">FT_UInt<
/a>
)
<
b>FT_Get_Sfnt_Name_Count<
/b>
( <
a href="ft2-base_interface.html#FT_Face">FT_Face<
/a>
face );
<
p>Retrieve the number of
name strings in the SFNT ‘name’ table.<
/p>
<
table cellpadding=3 border=0>
<
p>A handle to the source
face.<
/p>
<
p>The number of strings in the ‘name’ table.<
/p>
<
h4><
a name="FT_Get_Sfnt_Name">FT_Get_Sfnt_Name<
/a><
/h4>
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
<
table align=center
width="87%"><
tr bgcolor="#D6E8FF"><
td><
pre>
FT_EXPORT
( <
a href="ft2-basic_types.html#FT_Error">FT_Error<
/a>
)
<
b>FT_Get_Sfnt_Name<
/b>
( <
a href="ft2-base_interface.html#FT_Face">FT_Face<
/a>
face,
<
a href="ft2-basic_types.html#FT_UInt">FT_UInt<
/a> idx,
<
a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName<
/a> *aname
);
<
p>Retrieve a string of the SFNT ‘name’ table
for a given index.<
/p>
<
table cellpadding=3 border=0>
<
p>A handle to the source
face.<
/p>
<
p>The index of the ‘name’ string.<
/p>
<
table cellpadding=3 border=0>
<
p>The indexed <
a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName<
/a> structure.<
/p>
<
p>FreeType error
code.
0 means success.<
/p>
<
p>The ‘string’ array returned in the ‘aname’ structure is not null-terminated. The application should deallocate it if it is no longer in use.<
/p>
<
p>Use <
a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count<
/a> to get the total number of available ‘name’ table entries, then do a loop until you get the right platform, encoding, and
name ID.<
/p>
<
h4><
a name="FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY<
/a><
/h4>
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
<
table align=center
width="87%"><
tr bgcolor="#D6E8FF"><
td><
pre>
#define <
b>FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY<
/b> <
a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG<
/a>
( 'i',
'g',
'p',
'f' )
<
p>A constant used as the tag of <
a href="ft2-base_interface.html#FT_Parameter">FT_Parameter<
/a> 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.<
/p>
<
h4><
a name="FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY<
/a><
/h4>
Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).
<
table align=center
width="87%"><
tr bgcolor="#D6E8FF"><
td><
pre>
#define <
b>FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY<
/b> <
a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG<
/a>
( 'i',
'g',
'p',
's' )
<
p>A constant used as the tag of <
a href="ft2-base_interface.html#FT_Parameter">FT_Parameter<
/a> 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.<
/p>