⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.227
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
gtk-doc
/
html
/
harfbuzz
/
View File Name :
harfbuzz-hb-common.html
<!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-common: 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="ch12.html" title="Core API"> <link rel="prev" href="harfbuzz-hb-buffer.html" title="hb-buffer"> <link rel="next" href="harfbuzz-hb-deprecated.html" title="hb-deprecated"> <meta name="generator" content="GTK-Doc V1.32 (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-common.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="ch12.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="harfbuzz-hb-buffer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="harfbuzz-hb-deprecated.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="harfbuzz-hb-common"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="harfbuzz-hb-common.top_of_page"></a>hb-common</span></h2> <p>hb-common — Common data types</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="harfbuzz-hb-common.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="functions_proto_type"> <col class="functions_proto_name"> </colgroup> <tbody> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="returnvalue">hb_tag_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-tag-from-string" title="hb_tag_from_string ()">hb_tag_from_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-tag-to-string" title="hb_tag_to_string ()">hb_tag_to_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="returnvalue">hb_direction_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-direction-from-string" title="hb_direction_from_string ()">hb_direction_from_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type">const <span class="returnvalue">char</span> * </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-direction-to-string" title="hb_direction_to_string ()">hb_direction_to_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="returnvalue">hb_script_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-script-from-iso15924-tag" title="hb_script_from_iso15924_tag ()">hb_script_from_iso15924_tag</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="returnvalue">hb_script_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-script-from-string" title="hb_script_from_string ()">hb_script_from_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="returnvalue">hb_tag_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-script-to-iso15924-tag" title="hb_script_to_iso15924_tag ()">hb_script_to_iso15924_tag</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="returnvalue">hb_direction_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-script-get-horizontal-direction" title="hb_script_get_horizontal_direction ()">hb_script_get_horizontal_direction</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="returnvalue">hb_language_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-language-from-string" title="hb_language_from_string ()">hb_language_from_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type">const <span class="returnvalue">char</span> * </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-language-to-string" title="hb_language_to_string ()">hb_language_to_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="returnvalue">hb_language_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-language-get-default" title="hb_language_get_default ()">hb_language_get_default</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-feature-from-string" title="hb_feature_from_string ()">hb_feature_from_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-feature-to-string" title="hb_feature_to_string ()">hb_feature_to_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-variation-from-string" title="hb_variation_from_string ()">hb_variation_from_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#hb-variation-to-string" title="hb_variation_to_string ()">hb_variation_to_string</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <span class="c_punctuation">(</span><a class="link" href="harfbuzz-hb-common.html#hb-destroy-func-t" title="hb_destroy_func_t ()">*hb_destroy_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#HB-TAG:CAPS" title="HB_TAG()">HB_TAG</a><span class="c_punctuation">()</span> </td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#HB-UNTAG:CAPS" title="HB_UNTAG()">HB_UNTAG</a><span class="c_punctuation">()</span> </td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-REVERSE:CAPS" title="HB_DIRECTION_REVERSE()">HB_DIRECTION_REVERSE</a><span class="c_punctuation">()</span> </td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-IS-BACKWARD:CAPS" title="HB_DIRECTION_IS_BACKWARD()">HB_DIRECTION_IS_BACKWARD</a><span class="c_punctuation">()</span> </td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-IS-FORWARD:CAPS" title="HB_DIRECTION_IS_FORWARD()">HB_DIRECTION_IS_FORWARD</a><span class="c_punctuation">()</span> </td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-IS-HORIZONTAL:CAPS" title="HB_DIRECTION_IS_HORIZONTAL()">HB_DIRECTION_IS_HORIZONTAL</a><span class="c_punctuation">()</span> </td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-IS-VALID:CAPS" title="HB_DIRECTION_IS_VALID()">HB_DIRECTION_IS_VALID</a><span class="c_punctuation">()</span> </td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"> <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-IS-VERTICAL:CAPS" title="HB_DIRECTION_IS_VERTICAL()">HB_DIRECTION_IS_VERTICAL</a><span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="harfbuzz-hb-common.other"></a><h2>Types and Values</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="other_proto_type"> <col class="other_proto_name"> </colgroup> <tbody> <tr> <td class="typedef_keyword">typedef</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t">hb_bool_t</a></td> </tr> <tr> <td class="typedef_keyword">typedef</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t">hb_codepoint_t</a></td> </tr> <tr> <td class="datatype_keyword">enum</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t">hb_direction_t</a></td> </tr> <tr> <td class="typedef_keyword">typedef</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t">hb_language_t</a></td> </tr> <tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t">hb_feature_t</a></td> </tr> <tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-variation-t" title="hb_variation_t">hb_variation_t</a></td> </tr> <tr> <td class="typedef_keyword">typedef</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-mask-t" title="hb_mask_t">hb_mask_t</a></td> </tr> <tr> <td class="typedef_keyword">typedef</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-position-t" title="hb_position_t">hb_position_t</a></td> </tr> <tr> <td class="typedef_keyword">typedef</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t">hb_tag_t</a></td> </tr> <tr> <td class="datatype_keyword">enum</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t">hb_script_t</a></td> </tr> <tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-user-data-key-t" title="hb_user_data_key_t">hb_user_data_key_t</a></td> </tr> <tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#hb-var-int-t" title="hb_var_int_t">hb_var_int_t</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#HB-TAG-NONE:CAPS" title="HB_TAG_NONE">HB_TAG_NONE</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#HB-TAG-MAX:CAPS" title="HB_TAG_MAX">HB_TAG_MAX</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#HB-TAG-MAX-SIGNED:CAPS" title="HB_TAG_MAX_SIGNED">HB_TAG_MAX_SIGNED</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#HB-LANGUAGE-INVALID:CAPS" title="HB_LANGUAGE_INVALID">HB_LANGUAGE_INVALID</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#HB-FEATURE-GLOBAL-END:CAPS" title="HB_FEATURE_GLOBAL_END">HB_FEATURE_GLOBAL_END</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="harfbuzz-hb-common.html#HB-FEATURE-GLOBAL-START:CAPS" title="HB_FEATURE_GLOBAL_START">HB_FEATURE_GLOBAL_START</a></td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="harfbuzz-hb-common.includes"></a><h2>Includes</h2> <pre class="synopsis">#include <hb.h> </pre> </div> <div class="refsect1"> <a name="harfbuzz-hb-common.description"></a><h2>Description</h2> <p>Common data types used across HarfBuzz are defined here.</p> </div> <div class="refsect1"> <a name="harfbuzz-hb-common.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="hb-tag-from-string"></a><h3>hb_tag_from_string ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="returnvalue">hb_tag_t</span></a> hb_tag_from_string (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>, <em class="parameter"><code><span class="type">int</span> len</code></em>);</pre> <p>Converts a string into an <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a>. Valid tags are four characters. Shorter input strings will be padded with spaces. Longer input strings will be truncated.</p> <div class="refsect3"> <a name="hb-tag-from-string.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>str</p></td> <td class="parameter_description"><p>String to convert. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> uint8_t]</span></td> </tr> <tr> <td class="parameter_name"><p>len</p></td> <td class="parameter_description"><p>Length of <em class="parameter"><code>str</code></em> , or -1 if it is <code class="literal">NULL</code>-terminated</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="hb-tag-from-string.returns"></a><h4>Returns</h4> <p> The <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> corresponding to <em class="parameter"><code>str</code></em> </p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-tag-to-string"></a><h3>hb_tag_to_string ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> hb_tag_to_string (<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> tag</code></em>, <em class="parameter"><code><span class="type">char</span> *buf</code></em>);</pre> <p>Converts an <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> to a string and returns it in <em class="parameter"><code>buf</code></em> . Strings will be four characters long.</p> <div class="refsect3"> <a name="hb-tag-to-string.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>tag</p></td> <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> to convert</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>buf</p></td> <td class="parameter_description"><p>Converted string. </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> fixed-size=4][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> uint8_t]</span></td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-0-9-5.html#api-index-0.9.5">0.9.5</a></p> </div> <hr> <div class="refsect2"> <a name="hb-direction-from-string"></a><h3>hb_direction_from_string ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="returnvalue">hb_direction_t</span></a> hb_direction_from_string (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>, <em class="parameter"><code><span class="type">int</span> len</code></em>);</pre> <p>Converts a string to an <a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a>. </p> <p>Matching is loose and applies only to the first letter. For examples, "LTR" and "left-to-right" will both return <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-LTR:CAPS"><span class="type">HB_DIRECTION_LTR</span></a>.</p> <p>Unmatched strings will return <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-INVALID:CAPS"><span class="type">HB_DIRECTION_INVALID</span></a>.</p> <div class="refsect3"> <a name="hb-direction-from-string.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>str</p></td> <td class="parameter_description"><p>String to convert. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> uint8_t]</span></td> </tr> <tr> <td class="parameter_name"><p>len</p></td> <td class="parameter_description"><p>Length of <em class="parameter"><code>str</code></em> , or -1 if it is <code class="literal">NULL</code>-terminated</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="hb-direction-from-string.returns"></a><h4>Returns</h4> <p> The <a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> matching <em class="parameter"><code>str</code></em> </p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-direction-to-string"></a><h3>hb_direction_to_string ()</h3> <pre class="programlisting">const <span class="returnvalue">char</span> * hb_direction_to_string (<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> direction</code></em>);</pre> <p>Converts an <a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> to a string.</p> <div class="refsect3"> <a name="hb-direction-to-string.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>direction</p></td> <td class="parameter_description"><p>The <a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> to convert</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="hb-direction-to-string.returns"></a><h4>Returns</h4> <p>The string corresponding to <em class="parameter"><code>direction</code></em> . </p> <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-script-from-iso15924-tag"></a><h3>hb_script_from_iso15924_tag ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="returnvalue">hb_script_t</span></a> hb_script_from_iso15924_tag (<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> tag</code></em>);</pre> <p>Converts an ISO 15924 script tag to a corresponding <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a>.</p> <div class="refsect3"> <a name="hb-script-from-iso15924-tag.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>tag</p></td> <td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> representing an ISO 15924 tag.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="hb-script-from-iso15924-tag.returns"></a><h4>Returns</h4> <p>An <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a> corresponding to the ISO 15924 tag.</p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-script-from-string"></a><h3>hb_script_from_string ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="returnvalue">hb_script_t</span></a> hb_script_from_string (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>, <em class="parameter"><code><span class="type">int</span> len</code></em>);</pre> <p>Converts a string <em class="parameter"><code>str</code></em> representing an ISO 15924 script tag to a corresponding <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a>. Shorthand for <a class="link" href="harfbuzz-hb-common.html#hb-tag-from-string" title="hb_tag_from_string ()"><code class="function">hb_tag_from_string()</code></a> then <a class="link" href="harfbuzz-hb-common.html#hb-script-from-iso15924-tag" title="hb_script_from_iso15924_tag ()"><code class="function">hb_script_from_iso15924_tag()</code></a>.</p> <div class="refsect3"> <a name="hb-script-from-string.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>str</p></td> <td class="parameter_description"><p>a string representing an ISO 15924 tag. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> uint8_t]</span></td> </tr> <tr> <td class="parameter_name"><p>len</p></td> <td class="parameter_description"><p>length of the <em class="parameter"><code>str</code></em> , or -1 if it is <code class="literal">NULL</code>-terminated.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="hb-script-from-string.returns"></a><h4>Returns</h4> <p>An <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a> corresponding to the ISO 15924 tag.</p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-script-to-iso15924-tag"></a><h3>hb_script_to_iso15924_tag ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="returnvalue">hb_tag_t</span></a> hb_script_to_iso15924_tag (<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a> script</code></em>);</pre> <p>Converts an <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a> to a corresponding ISO 15924 script tag.</p> <div class="refsect3"> <a name="hb-script-to-iso15924-tag.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>script</p></td> <td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a> to convert.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="hb-script-to-iso15924-tag.returns"></a><h4>Returns</h4> <p>An <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> representing an ISO 15924 script tag.</p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-script-get-horizontal-direction"></a><h3>hb_script_get_horizontal_direction ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="returnvalue">hb_direction_t</span></a> hb_script_get_horizontal_direction (<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a> script</code></em>);</pre> <p>Fetches the <a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> of a script when it is set horizontally. All right-to-left scripts will return <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-RTL:CAPS"><span class="type">HB_DIRECTION_RTL</span></a>. All left-to-right scripts will return <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-LTR:CAPS"><span class="type">HB_DIRECTION_LTR</span></a>. Scripts that can be written either horizontally or vertically will return <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-INVALID:CAPS"><span class="type">HB_DIRECTION_INVALID</span></a>. Unknown scripts will return <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-LTR:CAPS"><span class="type">HB_DIRECTION_LTR</span></a>.</p> <div class="refsect3"> <a name="hb-script-get-horizontal-direction.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>script</p></td> <td class="parameter_description"><p>The <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a> to query</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="hb-script-get-horizontal-direction.returns"></a><h4>Returns</h4> <p> The horizontal <a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> of <em class="parameter"><code>script</code></em> </p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-language-from-string"></a><h3>hb_language_from_string ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="returnvalue">hb_language_t</span></a> hb_language_from_string (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>, <em class="parameter"><code><span class="type">int</span> len</code></em>);</pre> <p>Converts <em class="parameter"><code>str</code></em> representing a BCP 47 language tag to the corresponding <a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="type">hb_language_t</span></a>.</p> <div class="refsect3"> <a name="hb-language-from-string.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>str</p></td> <td class="parameter_description"><p>a string representing a BCP 47 language tag. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> uint8_t]</span></td> </tr> <tr> <td class="parameter_name"><p>len</p></td> <td class="parameter_description"><p>length of the <em class="parameter"><code>str</code></em> , or -1 if it is <code class="literal">NULL</code>-terminated.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="hb-language-from-string.returns"></a><h4>Returns</h4> <p>The <a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="type">hb_language_t</span></a> corresponding to the BCP 47 language tag. </p> <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-language-to-string"></a><h3>hb_language_to_string ()</h3> <pre class="programlisting">const <span class="returnvalue">char</span> * hb_language_to_string (<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>);</pre> <p>Converts an <a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="type">hb_language_t</span></a> to a string.</p> <div class="refsect3"> <a name="hb-language-to-string.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>language</p></td> <td class="parameter_description"><p>The <a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="type">hb_language_t</span></a> to convert</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="hb-language-to-string.returns"></a><h4>Returns</h4> <p>A <code class="literal">NULL</code>-terminated string representing the <em class="parameter"><code>language</code></em> . Must not be freed by the caller. </p> <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-language-get-default"></a><h3>hb_language_get_default ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="returnvalue">hb_language_t</span></a> hb_language_get_default (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> <p>Fetch the default language from current locale.</p> <div class="note">Note that the first time this function is called, it calls "setlocale (LC_CTYPE, nullptr)" to fetch current locale. The underlying setlocale function is, in many implementations, NOT threadsafe. To avoid problems, call this function once before multiple threads can call it. This function is only used from <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-guess-segment-properties" title="hb_buffer_guess_segment_properties ()"><code class="function">hb_buffer_guess_segment_properties()</code></a> by HarfBuzz itself.</div> <div class="refsect3"> <a name="hb-language-get-default.returns"></a><h4>Returns</h4> <p>The default language of the locale as an <a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="type">hb_language_t</span></a>. </p> <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-feature-from-string"></a><h3>hb_feature_from_string ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a> hb_feature_from_string (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>, <em class="parameter"><code><span class="type">int</span> len</code></em>, <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> *feature</code></em>);</pre> <p>Parses a string into a <a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a>.</p> <p>The format for specifying feature strings follows. All valid CSS font-feature-settings values other than 'normal' and the global values are also accepted, though not documented below. CSS string escapes are not supported.</p> <p>The range indices refer to the positions between Unicode characters. The position before the first character is always 0.</p> <p>The format is Python-esque. Here is how it all works:</p> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> <col> <col> </colgroup> <thead><tr> <th align="left">Syntax</th> <th align="left">Value</th> <th align="left">Start</th> <th align="left">End</th> <td class="auto-generated"> </td> </tr></thead> <tbody> <tr> <td align="left">Setting value:</td> <td class="auto-generated"> </td> <td class="auto-generated"> </td> <td class="auto-generated"> </td> <td class="auto-generated"> </td> </tr> <tr> <td align="left">kern</td> <td align="left">1</td> <td align="left">0</td> <td align="left">∞</td> <td align="left">Turn feature on</td> </tr> <tr> <td align="left">+kern</td> <td align="left">1</td> <td align="left">0</td> <td align="left">∞</td> <td align="left">Turn feature on</td> </tr> <tr> <td align="left">-kern</td> <td align="left">0</td> <td align="left">0</td> <td align="left">∞</td> <td align="left">Turn feature off</td> </tr> <tr> <td align="left">kern=0</td> <td align="left">0</td> <td align="left">0</td> <td align="left">∞</td> <td align="left">Turn feature off</td> </tr> <tr> <td align="left">kern=1</td> <td align="left">1</td> <td align="left">0</td> <td align="left">∞</td> <td align="left">Turn feature on</td> </tr> <tr> <td align="left">aalt=2</td> <td align="left">2</td> <td align="left">0</td> <td align="left">∞</td> <td align="left">Choose 2nd alternate</td> </tr> <tr> <td align="left">Setting index:</td> <td class="auto-generated"> </td> <td class="auto-generated"> </td> <td class="auto-generated"> </td> <td class="auto-generated"> </td> </tr> <tr> <td align="left">kern[]</td> <td align="left">1</td> <td align="left">0</td> <td align="left">∞</td> <td align="left">Turn feature on</td> </tr> <tr> <td align="left">kern[:]</td> <td align="left">1</td> <td align="left">0</td> <td align="left">∞</td> <td align="left">Turn feature on</td> </tr> <tr> <td align="left">kern[5:]</td> <td align="left">1</td> <td align="left">5</td> <td align="left">∞</td> <td align="left">Turn feature on, partial</td> </tr> <tr> <td align="left">kern[:5]</td> <td align="left">1</td> <td align="left">0</td> <td align="left">5</td> <td align="left">Turn feature on, partial</td> </tr> <tr> <td align="left">kern[3:5]</td> <td align="left">1</td> <td align="left">3</td> <td align="left">5</td> <td align="left">Turn feature on, range</td> </tr> <tr> <td align="left">kern[3]</td> <td align="left">1</td> <td align="left">3</td> <td align="left">3+1</td> <td align="left">Turn feature on, single char</td> </tr> <tr> <td align="left">Mixing it all:</td> <td class="auto-generated"> </td> <td class="auto-generated"> </td> <td class="auto-generated"> </td> <td class="auto-generated"> </td> </tr> <tr> <td align="left">aalt[3:5]=2</td> <td align="left">2</td> <td align="left">3</td> <td align="left">5</td> <td align="left">Turn 2nd alternate on for range</td> </tr> </tbody> </table></div> <div class="refsect3"> <a name="hb-feature-from-string.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>str</p></td> <td class="parameter_description"><p>a string to parse. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> uint8_t]</span></td> </tr> <tr> <td class="parameter_name"><p>len</p></td> <td class="parameter_description"><p>length of <em class="parameter"><code>str</code></em> , or -1 if string is <code class="literal">NULL</code> terminated</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>feature</p></td> <td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> to initialize with the parsed values. </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>]</span></td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="hb-feature-from-string.returns"></a><h4>Returns</h4> <p><code class="literal">true</code> if <em class="parameter"><code>str</code></em> is successfully parsed, <code class="literal">false</code> otherwise</p> </div> <p class="since">Since: <a class="link" href="api-index-0-9-5.html#api-index-0.9.5">0.9.5</a></p> </div> <hr> <div class="refsect2"> <a name="hb-feature-to-string"></a><h3>hb_feature_to_string ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> hb_feature_to_string (<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> *feature</code></em>, <em class="parameter"><code><span class="type">char</span> *buf</code></em>, <em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);</pre> <p>Converts a <a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> into a <code class="literal">NULL</code>-terminated string in the format understood by <a class="link" href="harfbuzz-hb-common.html#hb-feature-from-string" title="hb_feature_from_string ()"><code class="function">hb_feature_from_string()</code></a>. The client in responsible for allocating big enough size for <em class="parameter"><code>buf</code></em> , 128 bytes is more than enough.</p> <div class="refsect3"> <a name="hb-feature-to-string.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>feature</p></td> <td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> to convert</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>buf</p></td> <td class="parameter_description"><p>output string. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>size</p></td> <td class="parameter_description"><p>the allocated size of <em class="parameter"><code>buf</code></em> </p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-0-9-5.html#api-index-0.9.5">0.9.5</a></p> </div> <hr> <div class="refsect2"> <a name="hb-variation-from-string"></a><h3>hb_variation_from_string ()</h3> <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a> hb_variation_from_string (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>, <em class="parameter"><code><span class="type">int</span> len</code></em>, <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-variation-t" title="hb_variation_t"><span class="type">hb_variation_t</span></a> *variation</code></em>);</pre> <p class="since">Since: <a class="link" href="api-index-1-4-2.html#api-index-1.4.2">1.4.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-variation-to-string"></a><h3>hb_variation_to_string ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> hb_variation_to_string (<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-variation-t" title="hb_variation_t"><span class="type">hb_variation_t</span></a> *variation</code></em>, <em class="parameter"><code><span class="type">char</span> *buf</code></em>, <em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);</pre> <p class="since">Since: <a class="link" href="api-index-1-4-2.html#api-index-1.4.2">1.4.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-destroy-func-t"></a><h3>hb_destroy_func_t ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> <span class="c_punctuation">(</span>*hb_destroy_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre> </div> <hr> <div class="refsect2"> <a name="HB-TAG:CAPS"></a><h3>HB_TAG()</h3> <pre class="programlisting">#define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint32_t)(c1)&0xFF)<<24)|(((uint32_t)(c2)&0xFF)<<16)|(((uint32_t)(c3)&0xFF)<<8)|((uint32_t)(c4)&0xFF))) </pre> <p>Constructs an <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> from four characters.</p> </div> <hr> <div class="refsect2"> <a name="HB-UNTAG:CAPS"></a><h3>HB_UNTAG()</h3> <pre class="programlisting">#define HB_UNTAG(tag) (uint8_t)(((tag)>>24)&0xFF), (uint8_t)(((tag)>>16)&0xFF), (uint8_t)(((tag)>>8)&0xFF), (uint8_t)((tag)&0xFF) </pre> <p>Extracts the characters from an <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a>.</p> </div> <hr> <div class="refsect2"> <a name="HB-DIRECTION-REVERSE:CAPS"></a><h3>HB_DIRECTION_REVERSE()</h3> <pre class="programlisting">#define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsigned int) (dir)) ^ 1)) </pre> <p>Reverses a text direction. Requires that the direction be valid.</p> <div class="refsect3"> <a name="HB-DIRECTION-REVERSE.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>dir</p></td> <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> to reverse</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="HB-DIRECTION-IS-BACKWARD:CAPS"></a><h3>HB_DIRECTION_IS_BACKWARD()</h3> <pre class="programlisting">#define HB_DIRECTION_IS_BACKWARD(dir) ((((unsigned int) (dir)) & ~2U) == 5) </pre> <p>Tests whether a text direction moves backward (from right to left, or from bottom to top). Requires that the direction be valid.</p> <div class="refsect3"> <a name="HB-DIRECTION-IS-BACKWARD.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>dir</p></td> <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> to test</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="HB-DIRECTION-IS-FORWARD:CAPS"></a><h3>HB_DIRECTION_IS_FORWARD()</h3> <pre class="programlisting">#define HB_DIRECTION_IS_FORWARD(dir) ((((unsigned int) (dir)) & ~2U) == 4) </pre> <p>Tests whether a text direction moves forward (from left to right, or from top to bottom). Requires that the direction be valid.</p> <div class="refsect3"> <a name="HB-DIRECTION-IS-FORWARD.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>dir</p></td> <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> to test</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="HB-DIRECTION-IS-HORIZONTAL:CAPS"></a><h3>HB_DIRECTION_IS_HORIZONTAL()</h3> <pre class="programlisting">#define HB_DIRECTION_IS_HORIZONTAL(dir) ((((unsigned int) (dir)) & ~1U) == 4) </pre> <p>Tests whether a text direction is horizontal. Requires that the direction be valid.</p> <div class="refsect3"> <a name="HB-DIRECTION-IS-HORIZONTAL.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>dir</p></td> <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> to test</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="HB-DIRECTION-IS-VALID:CAPS"></a><h3>HB_DIRECTION_IS_VALID()</h3> <pre class="programlisting">#define HB_DIRECTION_IS_VALID(dir) ((((unsigned int) (dir)) & ~3U) == 4) </pre> <p>Tests whether a text direction is valid.</p> <div class="refsect3"> <a name="HB-DIRECTION-IS-VALID.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>dir</p></td> <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> to test</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="HB-DIRECTION-IS-VERTICAL:CAPS"></a><h3>HB_DIRECTION_IS_VERTICAL()</h3> <pre class="programlisting">#define HB_DIRECTION_IS_VERTICAL(dir) ((((unsigned int) (dir)) & ~1U) == 6) </pre> <p>Tests whether a text direction is vertical. Requires that the direction be valid.</p> <div class="refsect3"> <a name="HB-DIRECTION-IS-VERTICAL.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>dir</p></td> <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-common.html#hb-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> to test</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> </div> </div> <div class="refsect1"> <a name="harfbuzz-hb-common.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="hb-bool-t"></a><h3>hb_bool_t</h3> <pre class="programlisting">typedef int hb_bool_t; </pre> <p>Data type for booleans.</p> </div> <hr> <div class="refsect2"> <a name="hb-codepoint-t"></a><h3>hb_codepoint_t</h3> <pre class="programlisting">typedef uint32_t hb_codepoint_t; </pre> <p>Data type for holding Unicode codepoints. Also used to hold glyph IDs.</p> </div> <hr> <div class="refsect2"> <a name="hb-direction-t"></a><h3>enum hb_direction_t</h3> <p>The direction of a text segment or buffer.</p> <p>A segment can also be tested for horizontal or vertical orientation (irrespective of specific direction) with <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-IS-HORIZONTAL:CAPS" title="HB_DIRECTION_IS_HORIZONTAL()"><code class="function">HB_DIRECTION_IS_HORIZONTAL()</code></a> or <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-IS-VERTICAL:CAPS" title="HB_DIRECTION_IS_VERTICAL()"><code class="function">HB_DIRECTION_IS_VERTICAL()</code></a>.</p> <div class="refsect3"> <a name="hb-direction-t.members"></a><h4>Members</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="300px" class="enum_members_name"> <col class="enum_members_description"> <col width="200px" class="enum_members_annotations"> </colgroup> <tbody> <tr> <td class="enum_member_name"><p><a name="HB-DIRECTION-INVALID:CAPS"></a>HB_DIRECTION_INVALID</p></td> <td class="enum_member_description"> <p>Initial, unset direction.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-DIRECTION-LTR:CAPS"></a>HB_DIRECTION_LTR</p></td> <td class="enum_member_description"> <p>Text is set horizontally from left to right.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-DIRECTION-RTL:CAPS"></a>HB_DIRECTION_RTL</p></td> <td class="enum_member_description"> <p>Text is set horizontally from right to left.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-DIRECTION-TTB:CAPS"></a>HB_DIRECTION_TTB</p></td> <td class="enum_member_description"> <p>Text is set vertically from top to bottom.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-DIRECTION-BTT:CAPS"></a>HB_DIRECTION_BTT</p></td> <td class="enum_member_description"> <p>Text is set vertically from bottom to top.</p> </td> <td class="enum_member_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="hb-language-t"></a><h3>hb_language_t</h3> <pre class="programlisting">typedef const struct hb_language_impl_t *hb_language_t; </pre> </div> <hr> <div class="refsect2"> <a name="hb-feature-t"></a><h3>hb_feature_t</h3> <pre class="programlisting">typedef struct { hb_tag_t tag; uint32_t value; unsigned int start; unsigned int end; } hb_feature_t; </pre> <p>The <a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> is the structure that holds information about requested feature application. The feature will be applied with the given value to all glyphs which are in clusters between <em class="parameter"><code>start</code></em> (inclusive) and <em class="parameter"><code>end</code></em> (exclusive). Setting start to <em class="parameter"><code>HB_FEATURE_GLOBAL_START</code></em> and end to <em class="parameter"><code>HB_FEATURE_GLOBAL_END</code></em> specifies that the feature always applies to the entire buffer.</p> <div class="refsect3"> <a name="hb-feature-t.members"></a><h4>Members</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="300px" class="struct_members_name"> <col class="struct_members_description"> <col width="200px" class="struct_members_annotations"> </colgroup> <tbody> <tr> <td class="struct_member_name"><p><a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> <em class="structfield"><code><a name="hb-feature-t.tag"></a>tag</code></em>;</p></td> <td class="struct_member_description"><p>The <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> tag of the feature</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><span class="type">uint32_t</span> <em class="structfield"><code><a name="hb-feature-t.value"></a>value</code></em>;</p></td> <td class="struct_member_description"><p>The value of the feature. 0 disables the feature, non-zero (usually 1) enables the feature. For features implemented as lookup type 3 (like 'salt') the <em class="parameter"><code>value</code></em> is a one based index into the alternates.</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p>unsigned <span class="type">int</span> <em class="structfield"><code><a name="hb-feature-t.start"></a>start</code></em>;</p></td> <td class="struct_member_description"><p>the cluster to start applying this feature setting (inclusive).</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p>unsigned <span class="type">int</span> <em class="structfield"><code><a name="hb-feature-t.end"></a>end</code></em>;</p></td> <td class="struct_member_description"><p>the cluster to end applying this feature setting (exclusive).</p></td> <td class="struct_member_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="hb-variation-t"></a><h3>hb_variation_t</h3> <pre class="programlisting">typedef struct { hb_tag_t tag; float value; } hb_variation_t; </pre> <p>Data type for holding variation data. Registered OpenType variation-axis tags are listed at https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg</p> <div class="refsect3"> <a name="hb-variation-t.members"></a><h4>Members</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="300px" class="struct_members_name"> <col class="struct_members_description"> <col width="200px" class="struct_members_annotations"> </colgroup> <tbody> <tr> <td class="struct_member_name"><p><a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> <em class="structfield"><code><a name="hb-variation-t.tag"></a>tag</code></em>;</p></td> <td class="struct_member_description"><p>The <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> tag of the variation-axis name</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><span class="type">float</span> <em class="structfield"><code><a name="hb-variation-t.value"></a>value</code></em>;</p></td> <td class="struct_member_description"><p>The value of the variation axis</p></td> <td class="struct_member_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-1-4-2.html#api-index-1.4.2">1.4.2</a></p> </div> <hr> <div class="refsect2"> <a name="hb-mask-t"></a><h3>hb_mask_t</h3> <pre class="programlisting">typedef uint32_t hb_mask_t; </pre> <p>Data type for bitmasks.</p> </div> <hr> <div class="refsect2"> <a name="hb-position-t"></a><h3>hb_position_t</h3> <pre class="programlisting">typedef int32_t hb_position_t; </pre> <p>Data type for holding a single coordinate value. Contour points and other multi-dimensional data are stored as tuples of <a class="link" href="harfbuzz-hb-common.html#hb-position-t" title="hb_position_t"><span class="type">hb_position_t</span></a>'s.</p> </div> <hr> <div class="refsect2"> <a name="hb-tag-t"></a><h3>hb_tag_t</h3> <pre class="programlisting">typedef uint32_t hb_tag_t; </pre> </div> <hr> <div class="refsect2"> <a name="hb-script-t"></a><h3>enum hb_script_t</h3> <p>Data type for scripts. Each <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a>'s value is an <a class="link" href="harfbuzz-hb-common.html#hb-tag-t" title="hb_tag_t"><span class="type">hb_tag_t</span></a> corresponding to the four-letter values defined by <a class="ulink" href="https://unicode.org/iso15924/" target="_top">ISO 15924</a>.</p> <p>See also the Script (sc) property of the Unicode Character Database.</p> <div class="refsect3"> <a name="hb-script-t.members"></a><h4>Members</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="300px" class="enum_members_name"> <col class="enum_members_description"> <col width="200px" class="enum_members_annotations"> </colgroup> <tbody> <tr> <td class="enum_member_name"><p><a name="HB-SCRIPT-BASSA-VAH:CAPS"></a>HB_SCRIPT_BASSA_VAH</p></td> <td> </td> <td> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-SCRIPT-ADLAM:CAPS"></a>HB_SCRIPT_ADLAM</p></td> <td> </td> <td> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-SCRIPT-MASARAM-GONDI:CAPS"></a>HB_SCRIPT_MASARAM_GONDI</p></td> <td> </td> <td> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-SCRIPT-DOGRA:CAPS"></a>HB_SCRIPT_DOGRA</p></td> <td> </td> <td> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-SCRIPT-ELYMAIC:CAPS"></a>HB_SCRIPT_ELYMAIC</p></td> <td> </td> <td> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-SCRIPT-CHORASMIAN:CAPS"></a>HB_SCRIPT_CHORASMIAN</p></td> <td> </td> <td> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-SCRIPT-INVALID:CAPS"></a>HB_SCRIPT_INVALID</p></td> <td class="enum_member_description"> <p><a class="link" href="harfbuzz-hb-common.html#HB-TAG-NONE:CAPS" title="HB_TAG_NONE"><span class="type">HB_TAG_NONE</span></a></p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-SCRIPT-MAX-VALUE:CAPS"></a>_HB_SCRIPT_MAX_VALUE</p></td> <td> </td> <td> </td> </tr> <tr> <td class="enum_member_name"><p><a name="HB-SCRIPT-MAX-VALUE-SIGNED:CAPS"></a>_HB_SCRIPT_MAX_VALUE_SIGNED</p></td> <td> </td> <td> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="hb-user-data-key-t"></a><h3>hb_user_data_key_t</h3> <pre class="programlisting">typedef struct { } hb_user_data_key_t; </pre> <p>Data structure for holding user-data keys.</p> </div> <hr> <div class="refsect2"> <a name="hb-var-int-t"></a><h3>hb_var_int_t</h3> </div> <hr> <div class="refsect2"> <a name="HB-TAG-NONE:CAPS"></a><h3>HB_TAG_NONE</h3> <pre class="programlisting">#define HB_TAG_NONE HB_TAG(0,0,0,0) </pre> </div> <hr> <div class="refsect2"> <a name="HB-TAG-MAX:CAPS"></a><h3>HB_TAG_MAX</h3> <pre class="programlisting">#define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff) </pre> </div> <hr> <div class="refsect2"> <a name="HB-TAG-MAX-SIGNED:CAPS"></a><h3>HB_TAG_MAX_SIGNED</h3> <pre class="programlisting">#define HB_TAG_MAX_SIGNED HB_TAG(0x7f,0xff,0xff,0xff) </pre> </div> <hr> <div class="refsect2"> <a name="HB-LANGUAGE-INVALID:CAPS"></a><h3>HB_LANGUAGE_INVALID</h3> <pre class="programlisting">#define HB_LANGUAGE_INVALID ((hb_language_t) 0) </pre> </div> <hr> <div class="refsect2"> <a name="HB-FEATURE-GLOBAL-END:CAPS"></a><h3>HB_FEATURE_GLOBAL_END</h3> <pre class="programlisting">#define HB_FEATURE_GLOBAL_END ((unsigned int) -1) </pre> <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> <hr> <div class="refsect2"> <a name="HB-FEATURE-GLOBAL-START:CAPS"></a><h3>HB_FEATURE_GLOBAL_START</h3> <pre class="programlisting">#define HB_FEATURE_GLOBAL_START 0 </pre> <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.32</div> </body> </html>