diff options
Diffstat (limited to 'modules/freetype2/docs/reference/ft2-sfnt_names.html')
-rw-r--r-- | modules/freetype2/docs/reference/ft2-sfnt_names.html | 98 |
1 files changed, 73 insertions, 25 deletions
diff --git a/modules/freetype2/docs/reference/ft2-sfnt_names.html b/modules/freetype2/docs/reference/ft2-sfnt_names.html index b7be194e9..2d3d55337 100644 --- a/modules/freetype2/docs/reference/ft2-sfnt_names.html +++ b/modules/freetype2/docs/reference/ft2-sfnt_names.html @@ -1,9 +1,9 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" -"http://www.w3.org/TR/html4/loose.dtd"> +"https://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<title>FreeType-2.7.1 API Reference</title> +<title>FreeType-2.9.1 API Reference</title> <style type="text/css"> a:link { color: #0000EF; } a:visited { color: #51188E; } @@ -100,20 +100,17 @@ <body> <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table> -<h1>FreeType-2.7.1 API Reference</h1> +<h1>FreeType-2.9.1 API Reference</h1> <h1 id="sfnt_names">SFNT Names</h1> <h2>Synopsis</h2> <table class="synopsis"> -<tr><td><a href="#FT_SfntName">FT_SfntName</a></td></tr> -<tr><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td></tr> -<tr><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td></tr> -<tr><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td></tr> -<tr><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td></tr> +<tr><td><a href="#FT_SfntName">FT_SfntName</a></td><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a></td></tr> +<tr><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="#FT_SfntLangTag">FT_SfntLangTag</a></td><td></td></tr> </table> -<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 TrueType and OpenType specifications allow the inclusion of a special names table (‘name’) 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> @@ -129,7 +126,7 @@ <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 */ + <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> string_len; /* in bytes */ } <b>FT_SfntName</b>; </pre> @@ -139,20 +136,20 @@ <h4>fields</h4> <table class="fields"> <tr><td class="val" id="platform_id">platform_id</td><td class="desc"> -<p>The platform ID for ‘string’.</p> +<p>The platform ID for ‘string’. See <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a> for possible values.</p> </td></tr> <tr><td class="val" id="encoding_id">encoding_id</td><td class="desc"> -<p>The encoding ID for ‘string’.</p> +<p>The encoding ID for ‘string’. See <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>, <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a>, and <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a> for possible values.</p> </td></tr> <tr><td class="val" id="language_id">language_id</td><td class="desc"> -<p>The language ID for ‘string’.</p> +<p>The language ID for ‘string’. See <a href="ft2-truetype_tables.html#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a> and <a href="ft2-truetype_tables.html#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a> for possible values.</p> +<p>Registered OpenType values for ‘language_id’ are always smaller than 0x8000; values equal or larger than 0x8000 usually indicate a language tag string (introduced in OpenType version 1.6). Use function <a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a> with ‘language_id’ as its argument to retrieve the associated language tag.</p> </td></tr> <tr><td class="val" id="name_id">name_id</td><td class="desc"> -<p>An identifier for ‘string’.</p> +<p>An identifier for ‘string’. See <a href="ft2-truetype_tables.html#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a> for possible values.</p> </td></tr> <tr><td class="val" id="string">string</td><td class="desc"> -<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 ‘name’ string. Note that its format differs depending on the (platform,encoding) pair, being either a string of bytes (without a terminating NULL byte) or containing UTF-16BE entities.</p> </td></tr> <tr><td class="val" id="string_len">string_len</td><td class="desc"> <p>The length of ‘string’ in bytes.</p> @@ -160,8 +157,7 @@ </table> <h4>note</h4> -<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> +<p>Please refer to the TrueType or OpenType specification for more details.</p> <hr> <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div> @@ -222,32 +218,84 @@ <p>FreeType error code. 0 means success.</p> <h4>note</h4> -<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>The ‘string’ array returned in the ‘aname’ structure is not null-terminated. Note that you don't have to deallocate ‘string’ by yourself; FreeType takes care of it if you call <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</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> +<p>‘name’ table format 1 entries can use language tags also, see <a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a>.</p> <hr> <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div> <div class="section"> -<h3 id="FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</h3> +<h3 id="FT_SfntLangTag">FT_SfntLangTag</h3> <p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p> <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' ) + <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SfntLangTag_ + { + <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 */ + + } <b>FT_SfntLangTag</b>; </pre> -<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 that have a 4-face-per-family restriction.</p> +<p>A structure to model a language tag entry from an SFNT ‘name’ table.</p> + +<h4>fields</h4> +<table class="fields"> +<tr><td class="val" id="string">string</td><td class="desc"> +<p>The language tag string, encoded in UTF-16BE (without trailing NULL bytes).</p> +</td></tr> +<tr><td class="val" id="string_len">string_len</td><td class="desc"> +<p>The length of ‘string’ in <b>bytes</b>.</p> +</td></tr> +</table> + +<h4>note</h4> +<p>Please refer to the TrueType or OpenType specification for more details.</p> + +<h4>since</h4> +<p>2.8</p> <hr> <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div> <div class="section"> -<h3 id="FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</h3> +<h3 id="FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</h3> <p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p> <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' ) + FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> ) + <b>FT_Get_Sfnt_LangTag</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face, + <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> langID, + <a href="ft2-sfnt_names.html#FT_SfntLangTag">FT_SfntLangTag</a> *alangTag ); </pre> -<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 that have a 4-face-per-family restriction.</p> +<p>Retrieve the language tag associated with a language ID of an SFNT ‘name’ table entry.</p> + +<h4>input</h4> +<table class="fields"> +<tr><td class="val" id="face">face</td><td class="desc"> +<p>A handle to the source face.</p> +</td></tr> +<tr><td class="val" id="langID">langID</td><td class="desc"> +<p>The language ID, as returned by <a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a>. This is always a value larger than 0x8000.</p> +</td></tr> +</table> + +<h4>output</h4> +<table class="fields"> +<tr><td class="val" id="alangTag">alangTag</td><td class="desc"> +<p>The language tag associated with the ‘name’ table entry's language ID.</p> +</td></tr> +</table> + +<h4>return</h4> +<p>FreeType error code. 0 means success.</p> + +<h4>note</h4> +<p>The ‘string’ array returned in the ‘alangTag’ structure is not null-terminated. Note that you don't have to deallocate ‘string’ by yourself; FreeType takes care of it if you call <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p> +<p>Only ‘name’ table format 1 supports language tags. For format 0 tables, this function always returns FT_Err_Invalid_Table. For invalid format 1 language ID values, FT_Err_Invalid_Argument is returned.</p> + +<h4>since</h4> +<p>2.8</p> <hr> <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div> |