| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>hb-ot-name: HarfBuzz Manual</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> |
| <link rel="home" href="index.html" title="HarfBuzz Manual"> |
| <link rel="up" href="ch10.html" title="OpenType API"> |
| <link rel="prev" href="harfbuzz-hb-ot-math.html" title="hb-ot-math"> |
| <link rel="next" href="harfbuzz-hb-ot-shape.html" title="hb-ot-shape"> |
| <meta name="generator" content="GTK-Doc V1.25 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
| <td width="100%" align="left" class="shortcuts"> |
| <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| <a href="#harfbuzz-hb-ot-name.description" class="shortcut">Description</a></span> |
| </td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| <td><a accesskey="u" href="ch10.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| <td><a accesskey="p" href="harfbuzz-hb-ot-math.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| <td><a accesskey="n" href="harfbuzz-hb-ot-shape.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| </tr></table> |
| <div class="refentry"> |
| <a name="harfbuzz-hb-ot-name"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="harfbuzz-hb-ot-name.top_of_page"></a>hb-ot-name</span></h2> |
| <p>hb-ot-name — OpenType font name information</p> |
| </td> |
| <td class="gallery_image" valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsect1"> |
| <a name="harfbuzz-hb-ot-name.functions"></a><h2>Functions</h2> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="functions_return"> |
| <col class="functions_name"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="function_type">const <span class="returnvalue">hb_ot_name_entry_t</span> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-list-names" title="hb_ot_name_list_names ()">hb_ot_name_list_names</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type">unsigned <span class="returnvalue">int</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-get-utf16" title="hb_ot_name_get_utf16 ()">hb_ot_name_get_utf16</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type">unsigned <span class="returnvalue">int</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-get-utf32" title="hb_ot_name_get_utf32 ()">hb_ot_name_get_utf32</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type">unsigned <span class="returnvalue">int</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-get-utf8" title="hb_ot_name_get_utf8 ()">hb_ot_name_get_utf8</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect1"> |
| <a name="harfbuzz-hb-ot-name.other"></a><h2>Types and Values</h2> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="name"> |
| <col class="description"> |
| </colgroup> |
| <tbody><tr> |
| <td class="typedef_keyword">typedef</td> |
| <td class="function_name"><a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-id-t" title="hb_ot_name_id_t">hb_ot_name_id_t</a></td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect1"> |
| <a name="harfbuzz-hb-ot-name.includes"></a><h2>Includes</h2> |
| <pre class="synopsis">#include <hb-ot.h> |
| </pre> |
| </div> |
| <div class="refsect1"> |
| <a name="harfbuzz-hb-ot-name.description"></a><h2>Description</h2> |
| <p>Functions for fetching name strings from OpenType fonts.</p> |
| </div> |
| <div class="refsect1"> |
| <a name="harfbuzz-hb-ot-name.functions_details"></a><h2>Functions</h2> |
| <div class="refsect2"> |
| <a name="hb-ot-name-list-names"></a><h3>hb_ot_name_list_names ()</h3> |
| <pre class="programlisting">const <span class="returnvalue">hb_ot_name_entry_t</span> * |
| hb_ot_name_list_names (<em class="parameter"><code><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> *face</code></em>, |
| <em class="parameter"><code>unsigned <span class="type">int</span> *num_entries</code></em>);</pre> |
| <p>Enumerates all available name IDs and language combinations. Returned |
| array is owned by the <em class="parameter"><code>face</code></em> |
| and should not be modified. It can be |
| used as long as <em class="parameter"><code>face</code></em> |
| is alive.</p> |
| <div class="refsect3"> |
| <a name="hb-ot-name-list-names.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="parameter_name"><p>face</p></td> |
| <td class="parameter_description"><p>font face.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>num_entries</p></td> |
| <td class="parameter_description"><p> number of returned entries. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="hb-ot-name-list-names.returns"></a><h4>Returns</h4> |
| <p> Array of available name entries. </p> |
| <p><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_entries]</span></p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="hb-ot-name-get-utf16"></a><h3>hb_ot_name_get_utf16 ()</h3> |
| <pre class="programlisting">unsigned <span class="returnvalue">int</span> |
| hb_ot_name_get_utf16 (<em class="parameter"><code><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> *face</code></em>, |
| <em class="parameter"><code><a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-id-t" title="hb_ot_name_id_t"><span class="type">hb_ot_name_id_t</span></a> name_id</code></em>, |
| <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="type">hb_language_t</span></a> language</code></em>, |
| <em class="parameter"><code>unsigned <span class="type">int</span> *text_size</code></em>, |
| <em class="parameter"><code><span class="type">uint16_t</span> *text</code></em>);</pre> |
| <p>Fetches a font name from the OpenType 'name' table. |
| If <em class="parameter"><code>language</code></em> |
| is <a class="link" href="harfbuzz-hb-common.html#HB-LANGUAGE-INVALID:CAPS" title="HB_LANGUAGE_INVALID"><span class="type">HB_LANGUAGE_INVALID</span></a>, English ("en") is assumed. |
| Returns string in UTF-16 encoding.</p> |
| <div class="refsect3"> |
| <a name="hb-ot-name-get-utf16.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="parameter_name"><p>face</p></td> |
| <td class="parameter_description"><p>font face.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>name_id</p></td> |
| <td class="parameter_description"><p>OpenType name identifier to fetch.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>language</p></td> |
| <td class="parameter_description"><p>language to fetch the name for.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>text_size</p></td> |
| <td class="parameter_description"><p> input size of <em class="parameter"><code>text</code></em> |
| buffer, and output size of |
| text written to buffer. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>text</p></td> |
| <td class="parameter_description"><p> buffer to write fetched name into. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=text_size]</span></td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="hb-ot-name-get-utf16.returns"></a><h4>Returns</h4> |
| <p> full length of the requested string, or 0 if not found.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="hb-ot-name-get-utf32"></a><h3>hb_ot_name_get_utf32 ()</h3> |
| <pre class="programlisting">unsigned <span class="returnvalue">int</span> |
| hb_ot_name_get_utf32 (<em class="parameter"><code><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> *face</code></em>, |
| <em class="parameter"><code><a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-id-t" title="hb_ot_name_id_t"><span class="type">hb_ot_name_id_t</span></a> name_id</code></em>, |
| <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="type">hb_language_t</span></a> language</code></em>, |
| <em class="parameter"><code>unsigned <span class="type">int</span> *text_size</code></em>, |
| <em class="parameter"><code><span class="type">uint32_t</span> *text</code></em>);</pre> |
| <p>Fetches a font name from the OpenType 'name' table. |
| If <em class="parameter"><code>language</code></em> |
| is <a class="link" href="harfbuzz-hb-common.html#HB-LANGUAGE-INVALID:CAPS" title="HB_LANGUAGE_INVALID"><span class="type">HB_LANGUAGE_INVALID</span></a>, English ("en") is assumed. |
| Returns string in UTF-32 encoding.</p> |
| <div class="refsect3"> |
| <a name="hb-ot-name-get-utf32.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="parameter_name"><p>face</p></td> |
| <td class="parameter_description"><p>font face.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>name_id</p></td> |
| <td class="parameter_description"><p>OpenType name identifier to fetch.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>language</p></td> |
| <td class="parameter_description"><p>language to fetch the name for.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>text_size</p></td> |
| <td class="parameter_description"><p> input size of <em class="parameter"><code>text</code></em> |
| buffer, and output size of |
| text written to buffer. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>text</p></td> |
| <td class="parameter_description"><p> buffer to write fetched name into. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=text_size]</span></td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="hb-ot-name-get-utf32.returns"></a><h4>Returns</h4> |
| <p> full length of the requested string, or 0 if not found.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="hb-ot-name-get-utf8"></a><h3>hb_ot_name_get_utf8 ()</h3> |
| <pre class="programlisting">unsigned <span class="returnvalue">int</span> |
| hb_ot_name_get_utf8 (<em class="parameter"><code><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> *face</code></em>, |
| <em class="parameter"><code><a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-id-t" title="hb_ot_name_id_t"><span class="type">hb_ot_name_id_t</span></a> name_id</code></em>, |
| <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="type">hb_language_t</span></a> language</code></em>, |
| <em class="parameter"><code>unsigned <span class="type">int</span> *text_size</code></em>, |
| <em class="parameter"><code><span class="type">char</span> *text</code></em>);</pre> |
| <p>Fetches a font name from the OpenType 'name' table. |
| If <em class="parameter"><code>language</code></em> |
| is <a class="link" href="harfbuzz-hb-common.html#HB-LANGUAGE-INVALID:CAPS" title="HB_LANGUAGE_INVALID"><span class="type">HB_LANGUAGE_INVALID</span></a>, English ("en") is assumed. |
| Returns string in UTF-8 encoding.</p> |
| <div class="refsect3"> |
| <a name="hb-ot-name-get-utf8.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="parameter_name"><p>face</p></td> |
| <td class="parameter_description"><p>font face.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>name_id</p></td> |
| <td class="parameter_description"><p>OpenType name identifier to fetch.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>language</p></td> |
| <td class="parameter_description"><p>language to fetch the name for.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>text_size</p></td> |
| <td class="parameter_description"><p> input size of <em class="parameter"><code>text</code></em> |
| buffer, and output size of |
| text written to buffer. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>text</p></td> |
| <td class="parameter_description"><p> buffer to write fetched name into. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=text_size]</span></td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="hb-ot-name-get-utf8.returns"></a><h4>Returns</h4> |
| <p> full length of the requested string, or 0 if not found.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p> |
| </div> |
| </div> |
| <div class="refsect1"> |
| <a name="harfbuzz-hb-ot-name.other_details"></a><h2>Types and Values</h2> |
| <div class="refsect2"> |
| <a name="hb-ot-name-id-t"></a><h3>hb_ot_name_id_t</h3> |
| <pre class="programlisting">typedef unsigned int hb_ot_name_id_t; |
| </pre> |
| <p>An integral type representing an OpenType 'name' table name identifier. |
| There are predefined name IDs, as well as name IDs return from other |
| API. These can be used to fetch name strings from a font face.</p> |
| <p class="since">Since: <a class="link" href="api-index-2-0-0.html#api-index-2.0.0">2.0.0</a></p> |
| </div> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr>Generated by GTK-Doc V1.25</div> |
| </body> |
| </html> |