<!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-buffer: HarfBuzz Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="HarfBuzz Manual">
<link rel="up" href="core-api.html" title="Core API">
<link rel="prev" href="harfbuzz-hb-blob.html" title="hb-blob">
<link rel="next" href="harfbuzz-hb-common.html" title="hb-common">
<meta name="generator" content="GTK-Doc V1.33.1 (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-buffer.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="core-api.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="harfbuzz-hb-blob.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="harfbuzz-hb-common.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="harfbuzz-hb-buffer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="harfbuzz-hb-buffer.top_of_page"></a>hb-buffer</span></h2>
<p>hb-buffer — Input and output buffers</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="harfbuzz-hb-buffer.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-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="returnvalue">hb_buffer_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-create" title="hb_buffer_create ()">hb_buffer_create</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-buffer.html#hb-buffer-allocation-successful" title="hb_buffer_allocation_successful ()">hb_buffer_allocation_successful</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="returnvalue">hb_buffer_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-create-similar" title="hb_buffer_create_similar ()">hb_buffer_create_similar</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="returnvalue">hb_buffer_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-empty" title="hb_buffer_get_empty ()">hb_buffer_get_empty</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="returnvalue">hb_buffer_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-reference" title="hb_buffer_reference ()">hb_buffer_reference</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-buffer.html#hb-buffer-destroy" title="hb_buffer_destroy ()">hb_buffer_destroy</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-buffer.html#hb-buffer-set-user-data" title="hb_buffer_set_user_data ()">hb_buffer_set_user_data</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-buffer.html#hb-buffer-get-user-data" title="hb_buffer_get_user_data ()">hb_buffer_get_user_data</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-buffer.html#hb-buffer-reset" title="hb_buffer_reset ()">hb_buffer_reset</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-buffer.html#hb-buffer-clear-contents" title="hb_buffer_clear_contents ()">hb_buffer_clear_contents</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-buffer.html#hb-buffer-pre-allocate" title="hb_buffer_pre_allocate ()">hb_buffer_pre_allocate</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-buffer.html#hb-buffer-add" title="hb_buffer_add ()">hb_buffer_add</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-buffer.html#hb-buffer-add-codepoints" title="hb_buffer_add_codepoints ()">hb_buffer_add_codepoints</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-buffer.html#hb-buffer-add-utf32" title="hb_buffer_add_utf32 ()">hb_buffer_add_utf32</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-buffer.html#hb-buffer-add-utf16" title="hb_buffer_add_utf16 ()">hb_buffer_add_utf16</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-buffer.html#hb-buffer-add-utf8" title="hb_buffer_add_utf8 ()">hb_buffer_add_utf8</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-buffer.html#hb-buffer-add-latin1" title="hb_buffer_add_latin1 ()">hb_buffer_add_latin1</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-buffer.html#hb-buffer-append" title="hb_buffer_append ()">hb_buffer_append</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-buffer.html#hb-buffer-set-content-type" title="hb_buffer_set_content_type ()">hb_buffer_set_content_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-content-type-t" title="enum hb_buffer_content_type_t"><span class="returnvalue">hb_buffer_content_type_t</span></a>
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-content-type" title="hb_buffer_get_content_type ()">hb_buffer_get_content_type</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-buffer.html#hb-buffer-set-direction" title="hb_buffer_set_direction ()">hb_buffer_set_direction</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-buffer.html#hb-buffer-get-direction" title="hb_buffer_get_direction ()">hb_buffer_get_direction</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-buffer.html#hb-buffer-set-script" title="hb_buffer_set_script ()">hb_buffer_set_script</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-buffer.html#hb-buffer-get-script" title="hb_buffer_get_script ()">hb_buffer_get_script</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-buffer.html#hb-buffer-set-language" title="hb_buffer_set_language ()">hb_buffer_set_language</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-buffer.html#hb-buffer-get-language" title="hb_buffer_get_language ()">hb_buffer_get_language</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-buffer.html#hb-buffer-set-flags" title="hb_buffer_set_flags ()">hb_buffer_set_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-flags-t" title="enum hb_buffer_flags_t"><span class="returnvalue">hb_buffer_flags_t</span></a>
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-flags" title="hb_buffer_get_flags ()">hb_buffer_get_flags</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-buffer.html#hb-buffer-set-cluster-level" title="hb_buffer_set_cluster_level ()">hb_buffer_set_cluster_level</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t" title="enum hb_buffer_cluster_level_t"><span class="returnvalue">hb_buffer_cluster_level_t</span></a>
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-cluster-level" title="hb_buffer_get_cluster_level ()">hb_buffer_get_cluster_level</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-buffer.html#hb-buffer-set-length" title="hb_buffer_set_length ()">hb_buffer_set_length</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-buffer.html#hb-buffer-get-length" title="hb_buffer_get_length ()">hb_buffer_get_length</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-buffer.html#hb-buffer-set-segment-properties" title="hb_buffer_set_segment_properties ()">hb_buffer_set_segment_properties</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-buffer.html#hb-buffer-get-segment-properties" title="hb_buffer_get_segment_properties ()">hb_buffer_get_segment_properties</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-buffer.html#hb-buffer-guess-segment-properties" title="hb_buffer_guess_segment_properties ()">hb_buffer_guess_segment_properties</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-buffer.html#hb-buffer-set-unicode-funcs" title="hb_buffer_set_unicode_funcs ()">hb_buffer_set_unicode_funcs</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-unicode.html#hb-unicode-funcs-t" title="hb_unicode_funcs_t"><span class="returnvalue">hb_unicode_funcs_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-unicode-funcs" title="hb_buffer_get_unicode_funcs ()">hb_buffer_get_unicode_funcs</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="returnvalue">hb_glyph_info_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-glyph-infos" title="hb_buffer_get_glyph_infos ()">hb_buffer_get_glyph_infos</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-flags-t" title="enum hb_glyph_flags_t"><span class="returnvalue">hb_glyph_flags_t</span></a>
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-get-glyph-flags" title="hb_glyph_info_get_glyph_flags ()">hb_glyph_info_get_glyph_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t" title="hb_glyph_position_t"><span class="returnvalue">hb_glyph_position_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-glyph-positions" title="hb_buffer_get_glyph_positions ()">hb_buffer_get_glyph_positions</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-buffer.html#hb-buffer-has-positions" title="hb_buffer_has_positions ()">hb_buffer_has_positions</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-buffer.html#hb-buffer-set-invisible-glyph" title="hb_buffer_set_invisible_glyph ()">hb_buffer_set_invisible_glyph</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="returnvalue">hb_codepoint_t</span></a>
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-invisible-glyph" title="hb_buffer_get_invisible_glyph ()">hb_buffer_get_invisible_glyph</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-buffer.html#hb-buffer-set-not-found-glyph" title="hb_buffer_set_not_found_glyph ()">hb_buffer_set_not_found_glyph</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="returnvalue">hb_codepoint_t</span></a>
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-not-found-glyph" title="hb_buffer_get_not_found_glyph ()">hb_buffer_get_not_found_glyph</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-buffer.html#hb-buffer-set-replacement-codepoint" title="hb_buffer_set_replacement_codepoint ()">hb_buffer_set_replacement_codepoint</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="returnvalue">hb_codepoint_t</span></a>
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-replacement-codepoint" title="hb_buffer_get_replacement_codepoint ()">hb_buffer_get_replacement_codepoint</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-buffer.html#hb-buffer-normalize-glyphs" title="hb_buffer_normalize_glyphs ()">hb_buffer_normalize_glyphs</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-buffer.html#hb-buffer-reverse" title="hb_buffer_reverse ()">hb_buffer_reverse</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-buffer.html#hb-buffer-reverse-range" title="hb_buffer_reverse_range ()">hb_buffer_reverse_range</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-buffer.html#hb-buffer-reverse-clusters" title="hb_buffer_reverse_clusters ()">hb_buffer_reverse_clusters</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-buffer.html#hb-buffer-serialize" title="hb_buffer_serialize ()">hb_buffer_serialize</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-buffer.html#hb-buffer-serialize-glyphs" title="hb_buffer_serialize_glyphs ()">hb_buffer_serialize_glyphs</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-buffer.html#hb-buffer-deserialize-glyphs" title="hb_buffer_deserialize_glyphs ()">hb_buffer_deserialize_glyphs</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-buffer.html#hb-buffer-serialize-unicode" title="hb_buffer_serialize_unicode ()">hb_buffer_serialize_unicode</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-buffer.html#hb-buffer-deserialize-unicode" title="hb_buffer_deserialize_unicode ()">hb_buffer_deserialize_unicode</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="returnvalue">hb_buffer_serialize_format_t</span></a>
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-from-string" title="hb_buffer_serialize_format_from_string ()">hb_buffer_serialize_format_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-buffer.html#hb-buffer-serialize-format-to-string" title="hb_buffer_serialize_format_to_string ()">hb_buffer_serialize_format_to_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-buffer.html#hb-buffer-serialize-list-formats" title="hb_buffer_serialize_list_formats ()">hb_buffer_serialize_list_formats</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-buffer.html#hb-segment-properties-equal" title="hb_segment_properties_equal ()">hb_segment_properties_equal</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-buffer.html#hb-segment-properties-hash" title="hb_segment_properties_hash ()">hb_segment_properties_hash</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-buffer.html#hb-segment-properties-overlay" title="hb_segment_properties_overlay ()">hb_segment_properties_overlay</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-diff-flags-t" title="enum hb_buffer_diff_flags_t"><span class="returnvalue">hb_buffer_diff_flags_t</span></a>
</td>
<td class="function_name">
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-diff" title="hb_buffer_diff ()">hb_buffer_diff</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">
<span class="c_punctuation">(</span><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-message-func-t" title="hb_buffer_message_func_t ()">*hb_buffer_message_func_t</a><span class="c_punctuation">)</span> <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-buffer.html#hb-buffer-set-message-func" title="hb_buffer_set_message_func ()">hb_buffer_set_message_func</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="harfbuzz-hb-buffer.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="define_keyword">#define</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#HB-SEGMENT-PROPERTIES-DEFAULT:CAPS" title="HB_SEGMENT_PROPERTIES_DEFAULT">HB_SEGMENT_PROPERTIES_DEFAULT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-REPLACEMENT-CODEPOINT-DEFAULT:CAPS" title="HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT">HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT</a></td>
</tr>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t">hb_buffer_t</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t">hb_glyph_info_t</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-flags-t" title="enum hb_glyph_flags_t">hb_glyph_flags_t</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t" title="hb_glyph_position_t">hb_glyph_position_t</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-content-type-t" title="enum hb_buffer_content_type_t">hb_buffer_content_type_t</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-flags-t" title="enum hb_buffer_flags_t">hb_buffer_flags_t</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t" title="enum hb_buffer_cluster_level_t">hb_buffer_cluster_level_t</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t">hb_segment_properties_t</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t">hb_buffer_serialize_format_t</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-flags-t" title="enum hb_buffer_serialize_flags_t">hb_buffer_serialize_flags_t</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-diff-flags-t" title="enum hb_buffer_diff_flags_t">hb_buffer_diff_flags_t</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="harfbuzz-hb-buffer.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <hb.h>
</pre>
</div>
<div class="refsect1">
<a name="harfbuzz-hb-buffer.description"></a><h2>Description</h2>
<p>Buffers serve a dual role in HarfBuzz; before shaping, they hold
the input characters that are passed to <a class="link" href="harfbuzz-hb-shape.html#hb-shape" title="hb_shape ()"><code class="function">hb_shape()</code></a>, and after
shaping they hold the output glyphs.</p>
<p>The input buffer is a sequence of Unicode codepoints, with
associated attributes such as direction and script. The output
buffer is a sequence of glyphs, with associated attributes such
as position and cluster.</p>
</div>
<div class="refsect1">
<a name="harfbuzz-hb-buffer.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="hb-buffer-create"></a><h3>hb_buffer_create ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="returnvalue">hb_buffer_t</span></a> *
hb_buffer_create (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> with all properties to defaults.</p>
<div class="refsect3">
<a name="hb-buffer-create.returns"></a><h4>Returns</h4>
<p>A newly allocated <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> with a reference count of 1. The initial
reference count should be released with <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-destroy" title="hb_buffer_destroy ()"><code class="function">hb_buffer_destroy()</code></a> when you are done
using the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>. This function never returns <code class="literal">NULL</code>. If memory cannot
be allocated, a special <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> object will be returned on which
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-allocation-successful" title="hb_buffer_allocation_successful ()"><code class="function">hb_buffer_allocation_successful()</code></a> returns <code class="literal">false</code>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</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-buffer-allocation-successful"></a><h3>hb_buffer_allocation_successful ()</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_buffer_allocation_successful (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Check if allocating memory for the buffer succeeded.</p>
<div class="refsect3">
<a name="hb-buffer-allocation-successful.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-allocation-successful.returns"></a><h4>Returns</h4>
<p><code class="literal">true</code> if <em class="parameter"><code>buffer</code></em>
memory allocation succeeded, <code class="literal">false</code> otherwise.</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-buffer-create-similar"></a><h3>hb_buffer_create_similar ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="returnvalue">hb_buffer_t</span></a> *
hb_buffer_create_similar (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *src</code></em>);</pre>
<p>Creates a new <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>, similar to <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-create" title="hb_buffer_create ()"><code class="function">hb_buffer_create()</code></a>. The only
difference is that the buffer is configured similarly to <em class="parameter"><code>src</code></em>
.</p>
<div class="refsect3">
<a name="hb-buffer-create-similar.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>src</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-create-similar.returns"></a><h4>Returns</h4>
<p>A newly allocated <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>, similar to <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-create" title="hb_buffer_create ()"><code class="function">hb_buffer_create()</code></a>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-3-0.html#api-index-3.3.0">3.3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-get-empty"></a><h3>hb_buffer_get_empty ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="returnvalue">hb_buffer_t</span></a> *
hb_buffer_get_empty (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Fetches an empty <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>.</p>
<div class="refsect3">
<a name="hb-buffer-get-empty.returns"></a><h4>Returns</h4>
<p>The empty buffer. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</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-buffer-reference"></a><h3>hb_buffer_reference ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="returnvalue">hb_buffer_t</span></a> *
hb_buffer_reference (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Increases the reference count on <em class="parameter"><code>buffer</code></em>
by one. This prevents <em class="parameter"><code>buffer</code></em>
from
being destroyed until a matching call to <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-destroy" title="hb_buffer_destroy ()"><code class="function">hb_buffer_destroy()</code></a> is made.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="hb-buffer-reference.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-reference.returns"></a><h4>Returns</h4>
<p>The referenced <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</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-buffer-destroy"></a><h3>hb_buffer_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_destroy (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Deallocate the <em class="parameter"><code>buffer</code></em>
.
Decreases the reference count on <em class="parameter"><code>buffer</code></em>
by one. If the result is zero, then
<em class="parameter"><code>buffer</code></em>
and all associated resources are freed. See <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-reference" title="hb_buffer_reference ()"><code class="function">hb_buffer_reference()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="hb-buffer-destroy.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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-buffer-set-user-data"></a><h3>hb_buffer_set_user_data ()</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_buffer_set_user_data (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-user-data-key-t" title="hb_user_data_key_t"><span class="type">hb_user_data_key_t</span></a> *key</code></em>,
<em class="parameter"><code><span class="type">void</span> *data</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-destroy-func-t" title="hb_destroy_func_t ()"><span class="type">hb_destroy_func_t</span></a> destroy</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="type">hb_bool_t</span></a> replace</code></em>);</pre>
<p>Attaches a user-data key/data pair to the specified buffer.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="hb-buffer-set-user-data.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>The user-data key</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>A pointer to the user data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>A callback to call when <em class="parameter"><code>data</code></em>
is not needed anymore. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>replace</p></td>
<td class="parameter_description"><p>Whether to replace an existing data with the same key</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-set-user-data.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> if success, <code class="literal">false</code> otherwise</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-buffer-get-user-data"></a><h3>hb_buffer_get_user_data ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> *
hb_buffer_get_user_data (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-user-data-key-t" title="hb_user_data_key_t"><span class="type">hb_user_data_key_t</span></a> *key</code></em>);</pre>
<p>Fetches the user data associated with the specified key,
attached to the specified buffer.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="hb-buffer-get-user-data.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>The user-data key to query</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-user-data.returns"></a><h4>Returns</h4>
<p>A pointer to the user data. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><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-buffer-reset"></a><h3>hb_buffer_reset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_reset (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Resets the buffer to its initial status, as if it was just newly created
with <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-create" title="hb_buffer_create ()"><code class="function">hb_buffer_create()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-reset.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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-buffer-clear-contents"></a><h3>hb_buffer_clear_contents ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_clear_contents (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Similar to <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-reset" title="hb_buffer_reset ()"><code class="function">hb_buffer_reset()</code></a>, but does not clear the Unicode functions and
the replacement code point.</p>
<div class="refsect3">
<a name="hb-buffer-clear-contents.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-11.html#api-index-0.9.11">0.9.11</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-pre-allocate"></a><h3>hb_buffer_pre_allocate ()</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_buffer_pre_allocate (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);</pre>
<p>Pre allocates memory for <em class="parameter"><code>buffer</code></em>
to fit at least <em class="parameter"><code>size</code></em>
number of items.</p>
<div class="refsect3">
<a name="hb-buffer-pre-allocate.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>Number of items to pre allocate.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-pre-allocate.returns"></a><h4>Returns</h4>
<p><code class="literal">true</code> if <em class="parameter"><code>buffer</code></em>
memory allocation succeeded, <code class="literal">false</code> otherwise</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-buffer-add"></a><h3>hb_buffer_add ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_add (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> codepoint</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> cluster</code></em>);</pre>
<p>Appends a character with the Unicode value of <em class="parameter"><code>codepoint</code></em>
to <em class="parameter"><code>buffer</code></em>
, and
gives it the initial cluster value of <em class="parameter"><code>cluster</code></em>
. Clusters can be any thing
the client wants, they are usually used to refer to the index of the
character in the input text stream and are output in
<a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t.cluster"><span class="type">hb_glyph_info_t.cluster</span></a> field.</p>
<p>This function does not check the validity of <em class="parameter"><code>codepoint</code></em>
, it is up to the
caller to ensure it is a valid Unicode code point.</p>
<div class="refsect3">
<a name="hb-buffer-add.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>codepoint</p></td>
<td class="parameter_description"><p>A Unicode code point.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cluster</p></td>
<td class="parameter_description"><p>The cluster value of <em class="parameter"><code>codepoint</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-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-add-codepoints"></a><h3>hb_buffer_add_codepoints ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_add_codepoints (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> *text</code></em>,
<em class="parameter"><code><span class="type">int</span> text_length</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> item_offset</code></em>,
<em class="parameter"><code><span class="type">int</span> item_length</code></em>);</pre>
<p>Appends characters from <em class="parameter"><code>text</code></em>
array to <em class="parameter"><code>buffer</code></em>
. The <em class="parameter"><code>item_offset</code></em>
is the
position of the first character from <em class="parameter"><code>text</code></em>
that will be appended, and
<em class="parameter"><code>item_length</code></em>
is the number of character. When shaping part of a larger text
(e.g. a run of text from a paragraph), instead of passing just the substring
corresponding to the run, it is preferable to pass the whole
paragraph and specify the run start and length as <em class="parameter"><code>item_offset</code></em>
and
<em class="parameter"><code>item_length</code></em>
, respectively, to give HarfBuzz the full context to be able,
for example, to do cross-run Arabic shaping or properly handle combining
marks at stat of run.</p>
<p>This function does not check the validity of <em class="parameter"><code>text</code></em>
, it is up to the caller
to ensure it contains a valid Unicode scalar values. In contrast,
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-utf32" title="hb_buffer_add_utf32 ()"><code class="function">hb_buffer_add_utf32()</code></a> can be used that takes similar input but performs
sanity-check on the input.</p>
<div class="refsect3">
<a name="hb-buffer-add-codepoints.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>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> to append characters to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>an array of Unicode code points to append. </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=text_length]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>text_length</p></td>
<td class="parameter_description"><p>the length of the <em class="parameter"><code>text</code></em>
, or -1 if it is <code class="literal">NULL</code> terminated.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_offset</p></td>
<td class="parameter_description"><p>the offset of the first code point to add to the <em class="parameter"><code>buffer</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_length</p></td>
<td class="parameter_description"><p>the number of code points to add to the <em class="parameter"><code>buffer</code></em>
, or -1 for the
end of <em class="parameter"><code>text</code></em>
(assuming it is <code class="literal">NULL</code> terminated).</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-31.html#api-index-0.9.31">0.9.31</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-add-utf32"></a><h3>hb_buffer_add_utf32 ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_add_utf32 (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>const <span class="type">uint32_t</span> *text</code></em>,
<em class="parameter"><code><span class="type">int</span> text_length</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> item_offset</code></em>,
<em class="parameter"><code><span class="type">int</span> item_length</code></em>);</pre>
<p>See <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-codepoints" title="hb_buffer_add_codepoints ()"><code class="function">hb_buffer_add_codepoints()</code></a>.</p>
<p>Replaces invalid UTF-32 characters with the <em class="parameter"><code>buffer</code></em>
replacement code point,
see <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-replacement-codepoint" title="hb_buffer_set_replacement_codepoint ()"><code class="function">hb_buffer_set_replacement_codepoint()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-add-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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>An array of UTF-32 characters to append. </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=text_length]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>text_length</p></td>
<td class="parameter_description"><p>The length of the <em class="parameter"><code>text</code></em>
, or -1 if it is <code class="literal">NULL</code> terminated</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_offset</p></td>
<td class="parameter_description"><p>The offset of the first character to add to the <em class="parameter"><code>buffer</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_length</p></td>
<td class="parameter_description"><p>The number of characters to add to the <em class="parameter"><code>buffer</code></em>
, or -1 for the
end of <em class="parameter"><code>text</code></em>
(assuming it is <code class="literal">NULL</code> terminated)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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-buffer-add-utf16"></a><h3>hb_buffer_add_utf16 ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_add_utf16 (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>const <span class="type">uint16_t</span> *text</code></em>,
<em class="parameter"><code><span class="type">int</span> text_length</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> item_offset</code></em>,
<em class="parameter"><code><span class="type">int</span> item_length</code></em>);</pre>
<p>See <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-codepoints" title="hb_buffer_add_codepoints ()"><code class="function">hb_buffer_add_codepoints()</code></a>.</p>
<p>Replaces invalid UTF-16 characters with the <em class="parameter"><code>buffer</code></em>
replacement code point,
see <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-replacement-codepoint" title="hb_buffer_set_replacement_codepoint ()"><code class="function">hb_buffer_set_replacement_codepoint()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-add-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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>An array of UTF-16 characters to append. </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=text_length]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>text_length</p></td>
<td class="parameter_description"><p>The length of the <em class="parameter"><code>text</code></em>
, or -1 if it is <code class="literal">NULL</code> terminated</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_offset</p></td>
<td class="parameter_description"><p>The offset of the first character to add to the <em class="parameter"><code>buffer</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_length</p></td>
<td class="parameter_description"><p>The number of characters to add to the <em class="parameter"><code>buffer</code></em>
, or -1 for the
end of <em class="parameter"><code>text</code></em>
(assuming it is <code class="literal">NULL</code> terminated)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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-buffer-add-utf8"></a><h3>hb_buffer_add_utf8 ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_add_utf8 (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *text</code></em>,
<em class="parameter"><code><span class="type">int</span> text_length</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> item_offset</code></em>,
<em class="parameter"><code><span class="type">int</span> item_length</code></em>);</pre>
<p>See <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-codepoints" title="hb_buffer_add_codepoints ()"><code class="function">hb_buffer_add_codepoints()</code></a>.</p>
<p>Replaces invalid UTF-8 characters with the <em class="parameter"><code>buffer</code></em>
replacement code point,
see <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-replacement-codepoint" title="hb_buffer_set_replacement_codepoint ()"><code class="function">hb_buffer_set_replacement_codepoint()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-add-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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>An array of UTF-8
characters to append. </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=text_length][<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>text_length</p></td>
<td class="parameter_description"><p>The length of the <em class="parameter"><code>text</code></em>
, or -1 if it is <code class="literal">NULL</code> terminated.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_offset</p></td>
<td class="parameter_description"><p>The offset of the first character to add to the <em class="parameter"><code>buffer</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_length</p></td>
<td class="parameter_description"><p>The number of characters to add to the <em class="parameter"><code>buffer</code></em>
, or -1 for the
end of <em class="parameter"><code>text</code></em>
(assuming it is <code class="literal">NULL</code> terminated).</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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-buffer-add-latin1"></a><h3>hb_buffer_add_latin1 ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_add_latin1 (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>const <span class="type">uint8_t</span> *text</code></em>,
<em class="parameter"><code><span class="type">int</span> text_length</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> item_offset</code></em>,
<em class="parameter"><code><span class="type">int</span> item_length</code></em>);</pre>
<p>Similar to <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-codepoints" title="hb_buffer_add_codepoints ()"><code class="function">hb_buffer_add_codepoints()</code></a>, but allows only access to first 256
Unicode code points that can fit in 8-bit strings.</p>
<div class="note">Has nothing to do with non-Unicode Latin-1 encoding.</div>
<div class="refsect3">
<a name="hb-buffer-add-latin1.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>an array of UTF-8
characters to append. </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=text_length][<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>text_length</p></td>
<td class="parameter_description"><p>the length of the <em class="parameter"><code>text</code></em>
, or -1 if it is <code class="literal">NULL</code> terminated</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_offset</p></td>
<td class="parameter_description"><p>the offset of the first character to add to the <em class="parameter"><code>buffer</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_length</p></td>
<td class="parameter_description"><p>the number of characters to add to the <em class="parameter"><code>buffer</code></em>
, or -1 for the
end of <em class="parameter"><code>text</code></em>
(assuming it is <code class="literal">NULL</code> terminated)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-39.html#api-index-0.9.39">0.9.39</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-append"></a><h3>hb_buffer_append ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_append (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *source</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> start</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> end</code></em>);</pre>
<p>Append (part of) contents of another buffer to this buffer.</p>
<div class="refsect3">
<a name="hb-buffer-append.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>source</p></td>
<td class="parameter_description"><p>source <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>start</p></td>
<td class="parameter_description"><p>start index into source buffer to copy. Use 0 to copy from start of buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>end</p></td>
<td class="parameter_description"><p>end index into source buffer to copy. Use <em class="parameter"><code>HB_FEATURE_GLOBAL_END</code></em>
to copy to end of buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-1-5-0.html#api-index-1.5.0">1.5.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-set-content-type"></a><h3>hb_buffer_set_content_type ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_content_type (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-content-type-t" title="enum hb_buffer_content_type_t"><span class="type">hb_buffer_content_type_t</span></a> content_type</code></em>);</pre>
<p>Sets the type of <em class="parameter"><code>buffer</code></em>
contents. Buffers are either empty, contain
characters (before shaping), or contain glyphs (the result of shaping).</p>
<p>You rarely need to call this function, since a number of other
functions transition the content type for you. Namely:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>A newly created buffer starts with content type
<a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-CONTENT-TYPE-INVALID:CAPS"><code class="literal">HB_BUFFER_CONTENT_TYPE_INVALID</code></a>. Calling <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-reset" title="hb_buffer_reset ()"><code class="function">hb_buffer_reset()</code></a>,
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-clear-contents" title="hb_buffer_clear_contents ()"><code class="function">hb_buffer_clear_contents()</code></a>, as well as calling <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-length" title="hb_buffer_set_length ()"><code class="function">hb_buffer_set_length()</code></a>
with an argument of zero all set the buffer content type to invalid
as well.</p></li>
<li class="listitem"><p>Calling <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-utf8" title="hb_buffer_add_utf8 ()"><code class="function">hb_buffer_add_utf8()</code></a>, <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-utf16" title="hb_buffer_add_utf16 ()"><code class="function">hb_buffer_add_utf16()</code></a>,
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-utf32" title="hb_buffer_add_utf32 ()"><code class="function">hb_buffer_add_utf32()</code></a>, <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-codepoints" title="hb_buffer_add_codepoints ()"><code class="function">hb_buffer_add_codepoints()</code></a> and
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add-latin1" title="hb_buffer_add_latin1 ()"><code class="function">hb_buffer_add_latin1()</code></a> expect that buffer is either empty and
have a content type of invalid, or that buffer content type is
<a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-CONTENT-TYPE-UNICODE:CAPS"><code class="literal">HB_BUFFER_CONTENT_TYPE_UNICODE</code></a>, and they also set the content
type to Unicode if they added anything to an empty buffer.</p></li>
<li class="listitem"><p>Finally <a class="link" href="harfbuzz-hb-shape.html#hb-shape" title="hb_shape ()"><code class="function">hb_shape()</code></a> and <a class="link" href="harfbuzz-hb-shape.html#hb-shape-full" title="hb_shape_full ()"><code class="function">hb_shape_full()</code></a> expect that the buffer
is either empty and have content type of invalid, or that buffer
content type is <a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-CONTENT-TYPE-UNICODE:CAPS"><code class="literal">HB_BUFFER_CONTENT_TYPE_UNICODE</code></a>, and upon
success they set the buffer content type to
<a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-CONTENT-TYPE-GLYPHS:CAPS"><code class="literal">HB_BUFFER_CONTENT_TYPE_GLYPHS</code></a>.</p></li>
</ul></div>
<p>The above transitions are designed such that one can use a buffer
in a loop of "reset : add-text : shape" without needing to ever
modify the content type manually.</p>
<div class="refsect3">
<a name="hb-buffer-set-content-type.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>content_type</p></td>
<td class="parameter_description"><p>The type of buffer contents to set</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-buffer-get-content-type"></a><h3>hb_buffer_get_content_type ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-content-type-t" title="enum hb_buffer_content_type_t"><span class="returnvalue">hb_buffer_content_type_t</span></a>
hb_buffer_get_content_type (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Fetches the type of <em class="parameter"><code>buffer</code></em>
contents. Buffers are either empty, contain
characters (before shaping), or contain glyphs (the result of shaping).</p>
<div class="refsect3">
<a name="hb-buffer-get-content-type.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-content-type.returns"></a><h4>Returns</h4>
<p>The type of <em class="parameter"><code>buffer</code></em>
contents</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-buffer-set-direction"></a><h3>hb_buffer_set_direction ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_direction (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<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>Set the text flow direction of the buffer. No shaping can happen without
setting <em class="parameter"><code>buffer</code></em>
direction, and it controls the visual direction for the
output glyphs; for RTL direction the glyphs will be reversed. Many layout
features depend on the proper setting of the direction, for example,
reversing RTL text before shaping, then shaping with LTR direction is not
the same as keeping the text in logical order and shaping with RTL
direction.</p>
<div class="refsect3">
<a name="hb-buffer-set-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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<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> of the <em class="parameter"><code>buffer</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-2.html#api-index-0.9.2">0.9.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-get-direction"></a><h3>hb_buffer_get_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_buffer_get_direction (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>See <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-direction" title="hb_buffer_set_direction ()"><code class="function">hb_buffer_set_direction()</code></a></p>
<div class="refsect3">
<a name="hb-buffer-get-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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-direction.returns"></a><h4>Returns</h4>
<p>The direction of the <em class="parameter"><code>buffer</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-buffer-set-script"></a><h3>hb_buffer_set_script ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_script (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<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>Sets the script of <em class="parameter"><code>buffer</code></em>
to <em class="parameter"><code>script</code></em>
.</p>
<p>Script is crucial for choosing the proper shaping behaviour for scripts that
require it (e.g. Arabic) and the which OpenType features defined in the font
to be applied.</p>
<p>You can pass one of the predefined <a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a> values, or use
<a class="link" href="harfbuzz-hb-common.html#hb-script-from-string" title="hb_script_from_string ()"><code class="function">hb_script_from_string()</code></a> or <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> to get the
corresponding script from an ISO 15924 script tag.</p>
<div class="refsect3">
<a name="hb-buffer-set-script.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<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 set.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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-buffer-get-script"></a><h3>hb_buffer_get_script ()</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_buffer_get_script (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Fetches the script of <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="hb-buffer-get-script.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-script.returns"></a><h4>Returns</h4>
<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> of the <em class="parameter"><code>buffer</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-buffer-set-language"></a><h3>hb_buffer_set_language ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_language (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</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>);</pre>
<p>Sets the language of <em class="parameter"><code>buffer</code></em>
to <em class="parameter"><code>language</code></em>
.</p>
<p>Languages are crucial for selecting which OpenType feature to apply to the
buffer which can result in applying language-specific behaviour. Languages
are orthogonal to the scripts, and though they are related, they are
different concepts and should not be confused with each other.</p>
<p>Use <a class="link" href="harfbuzz-hb-common.html#hb-language-from-string" title="hb_language_from_string ()"><code class="function">hb_language_from_string()</code></a> to convert from BCP 47 language tags to
<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-buffer-set-language.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>language</p></td>
<td class="parameter_description"><p>An hb_language_t to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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-buffer-get-language"></a><h3>hb_buffer_get_language ()</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_buffer_get_language (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>See <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-language" title="hb_buffer_set_language ()"><code class="function">hb_buffer_set_language()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-get-language.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-language.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> of the buffer. Must not be freed by the caller. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><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-buffer-set-flags"></a><h3>hb_buffer_set_flags ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_flags (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-flags-t" title="enum hb_buffer_flags_t"><span class="type">hb_buffer_flags_t</span></a> flags</code></em>);</pre>
<p>Sets <em class="parameter"><code>buffer</code></em>
flags to <em class="parameter"><code>flags</code></em>
. See <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-flags-t" title="enum hb_buffer_flags_t"><span class="type">hb_buffer_flags_t</span></a>.</p>
<div class="refsect3">
<a name="hb-buffer-set-flags.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>The buffer flags to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-get-flags"></a><h3>hb_buffer_get_flags ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-flags-t" title="enum hb_buffer_flags_t"><span class="returnvalue">hb_buffer_flags_t</span></a>
hb_buffer_get_flags (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Fetches the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-flags-t" title="enum hb_buffer_flags_t"><span class="type">hb_buffer_flags_t</span></a> of <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="hb-buffer-get-flags.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-flags.returns"></a><h4>Returns</h4>
<p>The <em class="parameter"><code>buffer</code></em>
flags</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-set-cluster-level"></a><h3>hb_buffer_set_cluster_level ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_cluster_level (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t" title="enum hb_buffer_cluster_level_t"><span class="type">hb_buffer_cluster_level_t</span></a> cluster_level</code></em>);</pre>
<p>Sets the cluster level of a buffer. The <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t" title="enum hb_buffer_cluster_level_t"><span class="type">hb_buffer_cluster_level_t</span></a>
dictates one aspect of how HarfBuzz will treat non-base characters
during shaping.</p>
<div class="refsect3">
<a name="hb-buffer-set-cluster-level.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cluster_level</p></td>
<td class="parameter_description"><p>The cluster level to set on the buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-42.html#api-index-0.9.42">0.9.42</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-get-cluster-level"></a><h3>hb_buffer_get_cluster_level ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t" title="enum hb_buffer_cluster_level_t"><span class="returnvalue">hb_buffer_cluster_level_t</span></a>
hb_buffer_get_cluster_level (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Fetches the cluster level of a buffer. The <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-cluster-level-t" title="enum hb_buffer_cluster_level_t"><span class="type">hb_buffer_cluster_level_t</span></a>
dictates one aspect of how HarfBuzz will treat non-base characters
during shaping.</p>
<div class="refsect3">
<a name="hb-buffer-get-cluster-level.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-cluster-level.returns"></a><h4>Returns</h4>
<p> The cluster level of <em class="parameter"><code>buffer</code></em>
</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-42.html#api-index-0.9.42">0.9.42</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-set-length"></a><h3>hb_buffer_set_length ()</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_buffer_set_length (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> length</code></em>);</pre>
<p>Similar to <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-pre-allocate" title="hb_buffer_pre_allocate ()"><code class="function">hb_buffer_pre_allocate()</code></a>, but clears any new items added at the
end.</p>
<div class="refsect3">
<a name="hb-buffer-set-length.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>The new length of <em class="parameter"><code>buffer</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-set-length.returns"></a><h4>Returns</h4>
<p><code class="literal">true</code> if <em class="parameter"><code>buffer</code></em>
memory allocation succeeded, <code class="literal">false</code> otherwise.</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-buffer-get-length"></a><h3>hb_buffer_get_length ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span>
hb_buffer_get_length (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Returns the number of items in the buffer.</p>
<div class="refsect3">
<a name="hb-buffer-get-length.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-length.returns"></a><h4>Returns</h4>
<p>The <em class="parameter"><code>buffer</code></em>
length.
The value valid as long as buffer has not been modified.</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-buffer-set-segment-properties"></a><h3>hb_buffer_set_segment_properties ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_segment_properties (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *props</code></em>);</pre>
<p>Sets the segment properties of the buffer, a shortcut for calling
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-direction" title="hb_buffer_set_direction ()"><code class="function">hb_buffer_set_direction()</code></a>, <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-script" title="hb_buffer_set_script ()"><code class="function">hb_buffer_set_script()</code></a> and
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-language" title="hb_buffer_set_language ()"><code class="function">hb_buffer_set_language()</code></a> individually.</p>
<div class="refsect3">
<a name="hb-buffer-set-segment-properties.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>props</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> to use</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-get-segment-properties"></a><h3>hb_buffer_get_segment_properties ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_get_segment_properties (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *props</code></em>);</pre>
<p>Sets <em class="parameter"><code>props</code></em>
to the <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> of <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="hb-buffer-get-segment-properties.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>props</p></td>
<td class="parameter_description"><p>The output <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a>. </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>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-guess-segment-properties"></a><h3>hb_buffer_guess_segment_properties ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_guess_segment_properties (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Sets unset buffer segment properties based on buffer Unicode
contents. If buffer is not empty, it must have content type
<a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-CONTENT-TYPE-UNICODE:CAPS"><span class="type">HB_BUFFER_CONTENT_TYPE_UNICODE</span></a>.</p>
<p>If buffer script is not set (ie. is <a class="link" href="harfbuzz-hb-common.html#HB-SCRIPT-INVALID:CAPS"><span class="type">HB_SCRIPT_INVALID</span></a>), it
will be set to the Unicode script of the first character in
the buffer that has a script other than <a class="link" href="harfbuzz-hb-common.html#HB-SCRIPT-COMMON:CAPS"><span class="type">HB_SCRIPT_COMMON</span></a>,
<a class="link" href="harfbuzz-hb-common.html#HB-SCRIPT-INHERITED:CAPS"><span class="type">HB_SCRIPT_INHERITED</span></a>, and <a class="link" href="harfbuzz-hb-common.html#HB-SCRIPT-UNKNOWN:CAPS"><span class="type">HB_SCRIPT_UNKNOWN</span></a>.</p>
<p>Next, if buffer direction is not set (ie. is <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-INVALID:CAPS"><span class="type">HB_DIRECTION_INVALID</span></a>),
it will be set to the natural horizontal direction of the
buffer script as returned by <a class="link" href="harfbuzz-hb-common.html#hb-script-get-horizontal-direction" title="hb_script_get_horizontal_direction ()"><code class="function">hb_script_get_horizontal_direction()</code></a>.
If <a class="link" href="harfbuzz-hb-common.html#hb-script-get-horizontal-direction" title="hb_script_get_horizontal_direction ()"><code class="function">hb_script_get_horizontal_direction()</code></a> returns <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-INVALID:CAPS"><span class="type">HB_DIRECTION_INVALID</span></a>,
then <a class="link" href="harfbuzz-hb-common.html#HB-DIRECTION-LTR:CAPS"><span class="type">HB_DIRECTION_LTR</span></a> is used.</p>
<p>Finally, if buffer language is not set (ie. 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>),
it will be set to the process's default language as returned by
<a class="link" href="harfbuzz-hb-common.html#hb-language-get-default" title="hb_language_get_default ()"><code class="function">hb_language_get_default()</code></a>. This may change in the future by
taking buffer script into consideration when choosing a language.
Note that <a class="link" href="harfbuzz-hb-common.html#hb-language-get-default" title="hb_language_get_default ()"><code class="function">hb_language_get_default()</code></a> is NOT threadsafe the first time
it is called. See documentation for that function for details.</p>
<div class="refsect3">
<a name="hb-buffer-guess-segment-properties.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-set-unicode-funcs"></a><h3>hb_buffer_set_unicode_funcs ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_unicode_funcs (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-unicode.html#hb-unicode-funcs-t" title="hb_unicode_funcs_t"><span class="type">hb_unicode_funcs_t</span></a> *unicode_funcs</code></em>);</pre>
<p>Sets the Unicode-functions structure of a buffer to
<em class="parameter"><code>unicode_funcs</code></em>
.</p>
<div class="refsect3">
<a name="hb-buffer-set-unicode-funcs.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>unicode_funcs</p></td>
<td class="parameter_description"><p>The Unicode-functions structure</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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-buffer-get-unicode-funcs"></a><h3>hb_buffer_get_unicode_funcs ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-unicode.html#hb-unicode-funcs-t" title="hb_unicode_funcs_t"><span class="returnvalue">hb_unicode_funcs_t</span></a> *
hb_buffer_get_unicode_funcs (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Fetches the Unicode-functions structure of a buffer.</p>
<div class="refsect3">
<a name="hb-buffer-get-unicode-funcs.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-unicode-funcs.returns"></a><h4>Returns</h4>
<p> The Unicode-functions structure</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-buffer-get-glyph-infos"></a><h3>hb_buffer_get_glyph_infos ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="returnvalue">hb_glyph_info_t</span></a> *
hb_buffer_get_glyph_infos (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> *length</code></em>);</pre>
<p>Returns <em class="parameter"><code>buffer</code></em>
glyph information array. Returned pointer
is valid as long as <em class="parameter"><code>buffer</code></em>
contents are not modified.</p>
<div class="refsect3">
<a name="hb-buffer-get-glyph-infos.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>The output-array length. </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-buffer-get-glyph-infos.returns"></a><h4>Returns</h4>
<p>The <em class="parameter"><code>buffer</code></em>
glyph information array.
The value valid as long as buffer has not been modified. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</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-glyph-info-get-glyph-flags"></a><h3>hb_glyph_info_get_glyph_flags ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-flags-t" title="enum hb_glyph_flags_t"><span class="returnvalue">hb_glyph_flags_t</span></a>
hb_glyph_info_get_glyph_flags (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="type">hb_glyph_info_t</span></a> *info</code></em>);</pre>
<p>Returns glyph flags encoded within a <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="type">hb_glyph_info_t</span></a>.</p>
<div class="refsect3">
<a name="hb-glyph-info-get-glyph-flags.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>info</p></td>
<td class="parameter_description"><p>a <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="type">hb_glyph_info_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-glyph-info-get-glyph-flags.returns"></a><h4>Returns</h4>
<p>The <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-flags-t" title="enum hb_glyph_flags_t"><span class="type">hb_glyph_flags_t</span></a> encoded within <em class="parameter"><code>info</code></em>
</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-5-0.html#api-index-1.5.0">1.5.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-get-glyph-positions"></a><h3>hb_buffer_get_glyph_positions ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t" title="hb_glyph_position_t"><span class="returnvalue">hb_glyph_position_t</span></a> *
hb_buffer_get_glyph_positions (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> *length</code></em>);</pre>
<p>Returns <em class="parameter"><code>buffer</code></em>
glyph position array. Returned pointer
is valid as long as <em class="parameter"><code>buffer</code></em>
contents are not modified.</p>
<p>If buffer did not have positions before, the positions will be
initialized to zeros, unless this function is called from
within a buffer message callback (see <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-message-func" title="hb_buffer_set_message_func ()"><code class="function">hb_buffer_set_message_func()</code></a>),
in which case <code class="literal">NULL</code> is returned.</p>
<div class="refsect3">
<a name="hb-buffer-get-glyph-positions.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>The output length. </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-buffer-get-glyph-positions.returns"></a><h4>Returns</h4>
<p>The <em class="parameter"><code>buffer</code></em>
glyph position array.
The value valid as long as buffer has not been modified. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</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-buffer-has-positions"></a><h3>hb_buffer_has_positions ()</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_buffer_has_positions (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Returns whether <em class="parameter"><code>buffer</code></em>
has glyph position data.
A buffer gains position data when <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-glyph-positions" title="hb_buffer_get_glyph_positions ()"><code class="function">hb_buffer_get_glyph_positions()</code></a> is called on it,
and cleared of position data when <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-clear-contents" title="hb_buffer_clear_contents ()"><code class="function">hb_buffer_clear_contents()</code></a> is called.</p>
<div class="refsect3">
<a name="hb-buffer-has-positions.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>buffer</p></td>
<td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-has-positions.returns"></a><h4>Returns</h4>
<p><code class="literal">true</code> if the <em class="parameter"><code>buffer</code></em>
has position array, <code class="literal">false</code> otherwise.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-7-3.html#api-index-2.7.3">2.7.3</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-set-invisible-glyph"></a><h3>hb_buffer_set_invisible_glyph ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_invisible_glyph (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> invisible</code></em>);</pre>
<p>Sets the <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> that replaces invisible characters in
the shaping result. If set to zero (default), the glyph for the
U+0020 SPACE character is used. Otherwise, this value is used
verbatim.</p>
<div class="refsect3">
<a name="hb-buffer-set-invisible-glyph.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>invisible</p></td>
<td class="parameter_description"><p>the invisible <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<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-buffer-get-invisible-glyph"></a><h3>hb_buffer_get_invisible_glyph ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="returnvalue">hb_codepoint_t</span></a>
hb_buffer_get_invisible_glyph (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>See <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-invisible-glyph" title="hb_buffer_set_invisible_glyph ()"><code class="function">hb_buffer_set_invisible_glyph()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-get-invisible-glyph.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-invisible-glyph.returns"></a><h4>Returns</h4>
<p>The <em class="parameter"><code>buffer</code></em>
invisible <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a></p>
</div>
<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-buffer-set-not-found-glyph"></a><h3>hb_buffer_set_not_found_glyph ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_not_found_glyph (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> not_found</code></em>);</pre>
<p>Sets the <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> that replaces characters not found in
the font during shaping.</p>
<p>The not-found glyph defaults to zero, sometimes known as the
".notdef" glyph. This API allows for differentiating the two.</p>
<div class="refsect3">
<a name="hb-buffer-set-not-found-glyph.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>not_found</p></td>
<td class="parameter_description"><p>the not-found <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-1-0.html#api-index-3.1.0">3.1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-get-not-found-glyph"></a><h3>hb_buffer_get_not_found_glyph ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="returnvalue">hb_codepoint_t</span></a>
hb_buffer_get_not_found_glyph (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>See <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-not-found-glyph" title="hb_buffer_set_not_found_glyph ()"><code class="function">hb_buffer_set_not_found_glyph()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-get-not-found-glyph.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-not-found-glyph.returns"></a><h4>Returns</h4>
<p>The <em class="parameter"><code>buffer</code></em>
not-found <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-1-0.html#api-index-3.1.0">3.1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-set-replacement-codepoint"></a><h3>hb_buffer_set_replacement_codepoint ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_replacement_codepoint (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> replacement</code></em>);</pre>
<p>Sets the <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> that replaces invalid entries for a given encoding
when adding text to <em class="parameter"><code>buffer</code></em>
.</p>
<p>Default is <a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-REPLACEMENT-CODEPOINT-DEFAULT:CAPS" title="HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT"><span class="type">HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT</span></a>.</p>
<div class="refsect3">
<a name="hb-buffer-set-replacement-codepoint.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>replacement</p></td>
<td class="parameter_description"><p>the replacement <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-31.html#api-index-0.9.31">0.9.31</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-get-replacement-codepoint"></a><h3>hb_buffer_get_replacement_codepoint ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="returnvalue">hb_codepoint_t</span></a>
hb_buffer_get_replacement_codepoint (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Fetches the <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> that replaces invalid entries for a given encoding
when adding text to <em class="parameter"><code>buffer</code></em>
.</p>
<div class="refsect3">
<a name="hb-buffer-get-replacement-codepoint.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-get-replacement-codepoint.returns"></a><h4>Returns</h4>
<p>The <em class="parameter"><code>buffer</code></em>
replacement <a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-31.html#api-index-0.9.31">0.9.31</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-normalize-glyphs"></a><h3>hb_buffer_normalize_glyphs ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_normalize_glyphs (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Reorders a glyph buffer to have canonical in-cluster glyph order / position.
The resulting clusters should behave identical to pre-reordering clusters.</p>
<div class="note">This has nothing to do with Unicode normalization.</div>
<div class="refsect3">
<a name="hb-buffer-normalize-glyphs.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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-buffer-reverse"></a><h3>hb_buffer_reverse ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_reverse (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Reverses buffer contents.</p>
<div class="refsect3">
<a name="hb-buffer-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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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-buffer-reverse-range"></a><h3>hb_buffer_reverse_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_reverse_range (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> start</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> end</code></em>);</pre>
<p>Reverses buffer contents between <em class="parameter"><code>start</code></em>
and <em class="parameter"><code>end</code></em>
.</p>
<div class="refsect3">
<a name="hb-buffer-reverse-range.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>start</p></td>
<td class="parameter_description"><p>start index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>end</p></td>
<td class="parameter_description"><p>end index</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-41.html#api-index-0.9.41">0.9.41</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-reverse-clusters"></a><h3>hb_buffer_reverse_clusters ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_reverse_clusters (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>);</pre>
<p>Reverses buffer clusters. That is, the buffer contents are
reversed, then each cluster (consecutive items having the
same cluster number) are reversed again.</p>
<div class="refsect3">
<a name="hb-buffer-reverse-clusters.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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-buffer-serialize"></a><h3>hb_buffer_serialize ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span>
hb_buffer_serialize (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> start</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> end</code></em>,
<em class="parameter"><code><span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> buf_size</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> *buf_consumed</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> *font</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> format</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-flags-t" title="enum hb_buffer_serialize_flags_t"><span class="type">hb_buffer_serialize_flags_t</span></a> flags</code></em>);</pre>
<p>Serializes <em class="parameter"><code>buffer</code></em>
into a textual representation of its content, whether
Unicode codepoints or glyph identifiers and positioning information. This is
useful for showing the contents of the buffer, for example during debugging.
See the documentation of <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-unicode" title="hb_buffer_serialize_unicode ()"><code class="function">hb_buffer_serialize_unicode()</code></a> and
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-glyphs" title="hb_buffer_serialize_glyphs ()"><code class="function">hb_buffer_serialize_glyphs()</code></a> for a description of the output format.</p>
<div class="refsect3">
<a name="hb-buffer-serialize.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>buffer</p></td>
<td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>start</p></td>
<td class="parameter_description"><p>the first item in <em class="parameter"><code>buffer</code></em>
to serialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>end</p></td>
<td class="parameter_description"><p>the last item in <em class="parameter"><code>buffer</code></em>
to serialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>output string to
write serialized buffer into. </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="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=buf_size][<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>buf_size</p></td>
<td class="parameter_description"><p>the size of <em class="parameter"><code>buf</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf_consumed</p></td>
<td class="parameter_description"><p>if not <code class="literal">NULL</code>, will be set to the number of bytes written into <em class="parameter"><code>buf</code></em>
. </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 may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>font</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> used to shape this buffer, needed to
read glyph names and extents. If <code class="literal">NULL</code>, an empty font will be used. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> to use for formatting the output.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-flags-t" title="enum hb_buffer_serialize_flags_t"><span class="type">hb_buffer_serialize_flags_t</span></a> that control what glyph properties
to serialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-serialize.returns"></a><h4>Returns</h4>
<p>The number of serialized items.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-7-3.html#api-index-2.7.3">2.7.3</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-serialize-glyphs"></a><h3>hb_buffer_serialize_glyphs ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span>
hb_buffer_serialize_glyphs (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> start</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> end</code></em>,
<em class="parameter"><code><span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> buf_size</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> *buf_consumed</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> *font</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> format</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-flags-t" title="enum hb_buffer_serialize_flags_t"><span class="type">hb_buffer_serialize_flags_t</span></a> flags</code></em>);</pre>
<p>Serializes <em class="parameter"><code>buffer</code></em>
into a textual representation of its glyph content,
useful for showing the contents of the buffer, for example during debugging.
There are currently two supported serialization formats:</p>
<div class="refsect3">
<a name="id-1.3.3.3.7.54.5"></a><h4>text</h4>
<p>A human-readable, plain text format.
The serialized glyphs will look something like:</p>
<p><code class="literal">
[uni0651=0@518,0+0|uni0628=0+1897]
</code></p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>The serialized glyphs are delimited with <code class="literal">[</code> and <code class="literal">]</code>.</p></li>
<li class="listitem"><p>Glyphs are separated with <code class="literal">|</code></p></li>
<li class="listitem">
<p>Each glyph starts with glyph name, or glyph index if
<a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-NO-GLYPH-NAMES:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES</span></a> flag is set. Then,</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>If <a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-NO-CLUSTERS:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS</span></a> is not set, <code class="literal">=</code> then <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t.cluster"><span class="type">hb_glyph_info_t.cluster</span></a>.</p></li>
<li class="listitem">
<p>If <a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-NO-POSITIONS:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS</span></a> is not set, the <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t" title="hb_glyph_position_t"><span class="type">hb_glyph_position_t</span></a> in the format:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: square; ">
<li class="listitem"><p>If both <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t.x-offset"><span class="type">hb_glyph_position_t.x_offset</span></a> and <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t.y-offset"><span class="type">hb_glyph_position_t.y_offset</span></a> are not 0, <code class="literal">@x_offset,y_offset</code>. Then,</p></li>
<li class="listitem"><p><code class="literal">+x_advance</code>, then <code class="literal">,y_advance</code> if <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t.y-advance"><span class="type">hb_glyph_position_t.y_advance</span></a> is not 0. Then,</p></li>
</ul></div>
</li>
<li class="listitem"><p>If <a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-GLYPH-EXTENTS:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS</span></a> is set, the <a class="link" href="harfbuzz-hb-font.html#hb-glyph-extents-t" title="hb_glyph_extents_t"><span class="type">hb_glyph_extents_t</span></a> in the format <code class="literal"><x_bearing,y_bearing,width,height></code></p></li>
</ul></div>
</li>
</ul></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.3.7.54.6"></a><h4>json</h4>
<p>A machine-readable, structured format.
The serialized glyphs will look something like:</p>
<p><code class="literal">
[{"g":"uni0651","cl":0,"dx":518,"dy":0,"ax":0,"ay":0},
{"g":"uni0628","cl":0,"dx":0,"dy":0,"ax":1897,"ay":0}]
</code></p>
<p>Each glyph is a JSON object, with the following properties:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><code class="literal">g</code>: the glyph name or glyph index if
<a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-NO-GLYPH-NAMES:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES</span></a> flag is set.</p></li>
<li class="listitem"><p><code class="literal">cl</code>: <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t.cluster"><span class="type">hb_glyph_info_t.cluster</span></a> if
<a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-NO-CLUSTERS:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS</span></a> is not set.</p></li>
<li class="listitem"><p><code class="literal">dx</code>,<code class="literal">dy</code>,<code class="literal">ax</code>,<code class="literal">ay</code>: <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t.x-offset"><span class="type">hb_glyph_position_t.x_offset</span></a>, <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t.y-offset"><span class="type">hb_glyph_position_t.y_offset</span></a>,
<a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t.x-advance"><span class="type">hb_glyph_position_t.x_advance</span></a> and <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t.y-advance"><span class="type">hb_glyph_position_t.y_advance</span></a>
respectively, if <a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-NO-POSITIONS:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS</span></a> is not set.</p></li>
<li class="listitem"><p><code class="literal">xb</code>,<code class="literal">yb</code>,<code class="literal">w</code>,<code class="literal">h</code>: <a class="link" href="harfbuzz-hb-font.html#hb-glyph-extents-t.x-bearing"><span class="type">hb_glyph_extents_t.x_bearing</span></a>, <a class="link" href="harfbuzz-hb-font.html#hb-glyph-extents-t.y-bearing"><span class="type">hb_glyph_extents_t.y_bearing</span></a>,
<a class="link" href="harfbuzz-hb-font.html#hb-glyph-extents-t.width"><span class="type">hb_glyph_extents_t.width</span></a> and <a class="link" href="harfbuzz-hb-font.html#hb-glyph-extents-t.height"><span class="type">hb_glyph_extents_t.height</span></a> respectively if
<a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-GLYPH-EXTENTS:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS</span></a> is set.</p></li>
</ul></div>
</div>
<div class="refsect3">
<a name="hb-buffer-serialize-glyphs.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>buffer</p></td>
<td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>start</p></td>
<td class="parameter_description"><p>the first item in <em class="parameter"><code>buffer</code></em>
to serialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>end</p></td>
<td class="parameter_description"><p>the last item in <em class="parameter"><code>buffer</code></em>
to serialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>output string to
write serialized buffer into. </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="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=buf_size][<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>buf_size</p></td>
<td class="parameter_description"><p>the size of <em class="parameter"><code>buf</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf_consumed</p></td>
<td class="parameter_description"><p>if not <code class="literal">NULL</code>, will be set to the number of bytes written into <em class="parameter"><code>buf</code></em>
. </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 may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>font</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> used to shape this buffer, needed to
read glyph names and extents. If <code class="literal">NULL</code>, an empty font will be used. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> to use for formatting the output.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-flags-t" title="enum hb_buffer_serialize_flags_t"><span class="type">hb_buffer_serialize_flags_t</span></a> that control what glyph properties
to serialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-serialize-glyphs.returns"></a><h4>Returns</h4>
<p>The number of serialized items.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-deserialize-glyphs"></a><h3>hb_buffer_deserialize_glyphs ()</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_buffer_deserialize_glyphs (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code><span class="type">int</span> buf_len</code></em>,
<em class="parameter"><code>const <span class="type">char</span> **end_ptr</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> *font</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> format</code></em>);</pre>
<p>Deserializes glyphs <em class="parameter"><code>buffer</code></em>
from textual representation in the format
produced by <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-glyphs" title="hb_buffer_serialize_glyphs ()"><code class="function">hb_buffer_serialize_glyphs()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-deserialize-glyphs.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>buffer</p></td>
<td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>string to deserialize. </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=buf_len]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>buf_len</p></td>
<td class="parameter_description"><p>the size of <em class="parameter"><code>buf</code></em>
, or -1 if it is <code class="literal">NULL</code>-terminated</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>end_ptr</p></td>
<td class="parameter_description"><p>output pointer to the character after last
consumed one. </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 may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>font</p></td>
<td class="parameter_description"><p>font for getting glyph IDs. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> of the input <em class="parameter"><code>buf</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-deserialize-glyphs.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> if parse was successful, <code class="literal">false</code> if an error
occurred.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-serialize-unicode"></a><h3>hb_buffer_serialize_unicode ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span>
hb_buffer_serialize_unicode (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> start</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> end</code></em>,
<em class="parameter"><code><span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> buf_size</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> *buf_consumed</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> format</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-flags-t" title="enum hb_buffer_serialize_flags_t"><span class="type">hb_buffer_serialize_flags_t</span></a> flags</code></em>);</pre>
<p>Serializes <em class="parameter"><code>buffer</code></em>
into a textual representation of its content,
when the buffer contains Unicode codepoints (i.e., before shaping). This is
useful for showing the contents of the buffer, for example during debugging.
There are currently two supported serialization formats:</p>
<div class="refsect3">
<a name="id-1.3.3.3.7.56.5"></a><h4>text</h4>
<p>A human-readable, plain text format.
The serialized codepoints will look something like:</p>
<p><code class="literal">
<U+0651=0|U+0628=1>
</code></p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>Glyphs are separated with <code class="literal">|</code></p></li>
<li class="listitem"><p>Unicode codepoints are expressed as zero-padded four (or more)
digit hexadecimal numbers preceded by <code class="literal">U+</code></p></li>
<li class="listitem"><p>If <a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-NO-CLUSTERS:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS</span></a> is not set, the cluster
will be indicated with a <code class="literal">=</code> then <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t.cluster"><span class="type">hb_glyph_info_t.cluster</span></a>.</p></li>
</ul></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.3.7.56.6"></a><h4>json</h4>
<p>A machine-readable, structured format.
The serialized codepoints will be a list of objects with the following
properties:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><code class="literal">u</code>: the Unicode codepoint as a decimal integer</p></li>
<li class="listitem"><p><code class="literal">cl</code>: <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t.cluster"><span class="type">hb_glyph_info_t.cluster</span></a> if
<a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-SERIALIZE-FLAG-NO-CLUSTERS:CAPS"><span class="type">HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS</span></a> is not set.</p></li>
</ul></div>
<p>For example:</p>
<p><code class="literal">
[{u:1617,cl:0},{u:1576,cl:1}]
</code></p>
</div>
<div class="refsect3">
<a name="hb-buffer-serialize-unicode.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>buffer</p></td>
<td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>start</p></td>
<td class="parameter_description"><p>the first item in <em class="parameter"><code>buffer</code></em>
to serialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>end</p></td>
<td class="parameter_description"><p>the last item in <em class="parameter"><code>buffer</code></em>
to serialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>output string to
write serialized buffer into. </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="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=buf_size][<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>buf_size</p></td>
<td class="parameter_description"><p>the size of <em class="parameter"><code>buf</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf_consumed</p></td>
<td class="parameter_description"><p>if not <code class="literal">NULL</code>, will be set to the number of bytes written into <em class="parameter"><code>buf</code></em>
. </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 may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> to use for formatting the output.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-flags-t" title="enum hb_buffer_serialize_flags_t"><span class="type">hb_buffer_serialize_flags_t</span></a> that control what glyph properties
to serialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-serialize-unicode.returns"></a><h4>Returns</h4>
<p>The number of serialized items.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-7-3.html#api-index-2.7.3">2.7.3</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-deserialize-unicode"></a><h3>hb_buffer_deserialize_unicode ()</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_buffer_deserialize_unicode (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code><span class="type">int</span> buf_len</code></em>,
<em class="parameter"><code>const <span class="type">char</span> **end_ptr</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> format</code></em>);</pre>
<p>Deserializes Unicode <em class="parameter"><code>buffer</code></em>
from textual representation in the format
produced by <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-unicode" title="hb_buffer_serialize_unicode ()"><code class="function">hb_buffer_serialize_unicode()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-deserialize-unicode.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>buffer</p></td>
<td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>string to deserialize. </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=buf_len]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>buf_len</p></td>
<td class="parameter_description"><p>the size of <em class="parameter"><code>buf</code></em>
, or -1 if it is <code class="literal">NULL</code>-terminated</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>end_ptr</p></td>
<td class="parameter_description"><p>output pointer to the character after last
consumed one. </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 may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>the <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> of the input <em class="parameter"><code>buf</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-deserialize-unicode.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> if parse was successful, <code class="literal">false</code> if an error
occurred.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-7-3.html#api-index-2.7.3">2.7.3</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-serialize-format-from-string"></a><h3>hb_buffer_serialize_format_from_string ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="returnvalue">hb_buffer_serialize_format_t</span></a>
hb_buffer_serialize_format_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>Parses a string into an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a>. Does not check if
<em class="parameter"><code>str</code></em>
is a valid buffer serialization format, use
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-list-formats" title="hb_buffer_serialize_list_formats ()"><code class="function">hb_buffer_serialize_list_formats()</code></a> to get the list of supported formats.</p>
<div class="refsect3">
<a name="hb-buffer-serialize-format-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>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-serialize-format-from-string.returns"></a><h4>Returns</h4>
<p>The parsed <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-serialize-format-to-string"></a><h3>hb_buffer_serialize_format_to_string ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
hb_buffer_serialize_format_to_string (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> format</code></em>);</pre>
<p>Converts <em class="parameter"><code>format</code></em>
to the string corresponding it, or <code class="literal">NULL</code> if it is not a valid
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a>.</p>
<div class="refsect3">
<a name="hb-buffer-serialize-format-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>format</p></td>
<td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-format-t" title="enum hb_buffer_serialize_format_t"><span class="type">hb_buffer_serialize_format_t</span></a> to convert.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-serialize-format-to-string.returns"></a><h4>Returns</h4>
<p>A <code class="literal">NULL</code> terminated string corresponding to <em class="parameter"><code>format</code></em>
. Should not be freed. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-serialize-list-formats"></a><h3>hb_buffer_serialize_list_formats ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> **
hb_buffer_serialize_list_formats (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns a list of supported buffer serialization formats.</p>
<div class="refsect3">
<a name="hb-buffer-serialize-list-formats.returns"></a><h4>Returns</h4>
<p>A string array of buffer serialization formats. Should not be freed. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-segment-properties-equal"></a><h3>hb_segment_properties_equal ()</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_segment_properties_equal (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *b</code></em>);</pre>
<p>Checks the equality of two <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a>'s.</p>
<div class="refsect3">
<a name="hb-segment-properties-equal.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>a</p></td>
<td class="parameter_description"><p>first <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> to compare.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>second <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> to compare.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-segment-properties-equal.returns"></a><h4>Returns</h4>
<p><code class="literal">true</code> if all properties of <em class="parameter"><code>a</code></em>
equal those of <em class="parameter"><code>b</code></em>
, <code class="literal">false</code> otherwise.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-segment-properties-hash"></a><h3>hb_segment_properties_hash ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span>
hb_segment_properties_hash (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *p</code></em>);</pre>
<p>Creates a hash representing <em class="parameter"><code>p</code></em>
.</p>
<div class="refsect3">
<a name="hb-segment-properties-hash.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>p</p></td>
<td class="parameter_description"><p><a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> to hash.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-segment-properties-hash.returns"></a><h4>Returns</h4>
<p>A hash of <em class="parameter"><code>p</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-segment-properties-overlay"></a><h3>hb_segment_properties_overlay ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_segment_properties_overlay (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *p</code></em>,
<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *src</code></em>);</pre>
<p>Fills in missing fields of <em class="parameter"><code>p</code></em>
from <em class="parameter"><code>src</code></em>
in a considered manner.</p>
<p>First, if <em class="parameter"><code>p</code></em>
does not have direction set, direction is copied from <em class="parameter"><code>src</code></em>
.</p>
<p>Next, if <em class="parameter"><code>p</code></em>
and <em class="parameter"><code>src</code></em>
have the same direction (which can be unset), if <em class="parameter"><code>p</code></em>
does not have script set, script is copied from <em class="parameter"><code>src</code></em>
.</p>
<p>Finally, if <em class="parameter"><code>p</code></em>
and <em class="parameter"><code>src</code></em>
have the same direction and script (which either
can be unset), if <em class="parameter"><code>p</code></em>
does not have language set, language is copied from
<em class="parameter"><code>src</code></em>
.</p>
<div class="refsect3">
<a name="hb-segment-properties-overlay.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>p</p></td>
<td class="parameter_description"><p><a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> to fill in.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p><a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> to fill in from.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-3-0.html#api-index-3.3.0">3.3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-diff"></a><h3>hb_buffer_diff ()</h3>
<pre class="programlisting"><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-diff-flags-t" title="enum hb_buffer_diff_flags_t"><span class="returnvalue">hb_buffer_diff_flags_t</span></a>
hb_buffer_diff (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *reference</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> dottedcircle_glyph</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> position_fuzz</code></em>);</pre>
<p>If dottedcircle_glyph is (hb_codepoint_t) -1 then <a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-DIFF-FLAG-DOTTED-CIRCLE-PRESENT:CAPS"><span class="type">HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT</span></a>
and <a class="link" href="harfbuzz-hb-buffer.html#HB-BUFFER-DIFF-FLAG-NOTDEF-PRESENT:CAPS"><span class="type">HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT</span></a> are never returned. This should be used by most
callers if just comparing two buffers is needed.</p>
<div class="refsect3">
<a name="hb-buffer-diff.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>buffer</p></td>
<td class="parameter_description"><p>a buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>reference</p></td>
<td class="parameter_description"><p>other buffer to compare to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dottedcircle_glyph</p></td>
<td class="parameter_description"><p>glyph id of U+25CC DOTTED CIRCLE, or (hb_codepoint_t) -1.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position_fuzz</p></td>
<td class="parameter_description"><p>allowed absolute difference in position values.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-1-5-0.html#api-index-1.5.0">1.5.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-message-func-t"></a><h3>hb_buffer_message_func_t ()</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>
<span class="c_punctuation">(</span>*hb_buffer_message_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> *font</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *message</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>A callback method for <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>. The method gets called with the
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> it was set on, the <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> the buffer is shaped with and a
message describing what step of the shaping process will be performed.
Returning <code class="literal">false</code> from this method will skip this shaping step and move to
the next one.</p>
<div class="refsect3">
<a name="hb-buffer-message-func-t.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> to work upon</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>font</p></td>
<td class="parameter_description"><p>The <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> the <em class="parameter"><code>buffer</code></em>
is shaped with</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated message passed to the function</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>User data pointer passed by the caller</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="hb-buffer-message-func-t.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> to perform the shaping step, <code class="literal">false</code> to skip it.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-1-3.html#api-index-1.1.3">1.1.3</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-set-message-func"></a><h3>hb_buffer_set_message_func ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
hb_buffer_set_message_func (<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-message-func-t" title="hb_buffer_message_func_t ()"><span class="type">hb_buffer_message_func_t</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-destroy-func-t" title="hb_destroy_func_t ()"><span class="type">hb_destroy_func_t</span></a> destroy</code></em>);</pre>
<p>Sets the implementation function for <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-message-func-t" title="hb_buffer_message_func_t ()"><span class="type">hb_buffer_message_func_t</span></a>.</p>
<div class="refsect3">
<a name="hb-buffer-set-message-func.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>buffer</p></td>
<td class="parameter_description"><p>An <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>Callback function. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym> user_data][<acronym title="This parameter is a 'destroy_data', for callbacks."><span class="acronym">destroy</span></acronym> destroy][<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>Data to pass to <em class="parameter"><code>func</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>The function to call when <em class="parameter"><code>user_data</code></em>
is not needed anymore. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-1-1-3.html#api-index-1.1.3">1.1.3</a></p>
</div>
</div>
<div class="refsect1">
<a name="harfbuzz-hb-buffer.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="HB-SEGMENT-PROPERTIES-DEFAULT:CAPS"></a><h3>HB_SEGMENT_PROPERTIES_DEFAULT</h3>
<pre class="programlisting">#define HB_SEGMENT_PROPERTIES_DEFAULT</pre>
<p>The default <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> of of freshly created <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="HB-BUFFER-REPLACEMENT-CODEPOINT-DEFAULT:CAPS"></a><h3>HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT</h3>
<pre class="programlisting">#define HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT 0xFFFDu
</pre>
<p>The default code point for replacing invalid characters in a given encoding.
Set to U+FFFD REPLACEMENT CHARACTER.</p>
<p class="since">Since: <a class="link" href="api-index-0-9-31.html#api-index-0.9.31">0.9.31</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-t"></a><h3>hb_buffer_t</h3>
<pre class="programlisting">typedef struct hb_buffer_t hb_buffer_t;
</pre>
<p>The main structure holding the input text and its properties before shaping,
and output glyphs and their information after shaping.</p>
</div>
<hr>
<div class="refsect2">
<a name="hb-glyph-info-t"></a><h3>hb_glyph_info_t</h3>
<pre class="programlisting">typedef struct {
hb_codepoint_t codepoint;
uint32_t cluster;
} hb_glyph_info_t;
</pre>
<p>The <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="type">hb_glyph_info_t</span></a> is the structure that holds information about the
glyphs and their relation to input text.</p>
<div class="refsect3">
<a name="hb-glyph-info-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-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> <em class="structfield"><code><a name="hb-glyph-info-t.codepoint"></a>codepoint</code></em>;</p></td>
<td class="struct_member_description"><p>either a Unicode code point (before shaping) or a glyph index
(after shaping).</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-glyph-info-t.cluster"></a>cluster</code></em>;</p></td>
<td class="struct_member_description"><p>the index of the character in the original text that corresponds
to this <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="type">hb_glyph_info_t</span></a>, or whatever the client passes to
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-add" title="hb_buffer_add ()"><code class="function">hb_buffer_add()</code></a>. More than one <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="type">hb_glyph_info_t</span></a> can have the same
<em class="parameter"><code>cluster</code></em>
value, if they resulted from the same character (e.g. one
to many glyph substitution), and when more than one character gets
merged in the same glyph (e.g. many to one glyph substitution) the
<a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="type">hb_glyph_info_t</span></a> will have the smallest cluster value of them.
By default some characters are merged into the same cluster
(e.g. combining marks have the same cluster as their bases)
even if they are separate glyphs, <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-cluster-level" title="hb_buffer_set_cluster_level ()"><code class="function">hb_buffer_set_cluster_level()</code></a>
allow selecting more fine-grained cluster handling.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="hb-glyph-flags-t"></a><h3>enum hb_glyph_flags_t</h3>
<p>Flags for <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t" title="hb_glyph_info_t"><span class="type">hb_glyph_info_t</span></a>.</p>
<div class="refsect3">
<a name="hb-glyph-flags-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-GLYPH-FLAG-UNSAFE-TO-BREAK:CAPS"></a>HB_GLYPH_FLAG_UNSAFE_TO_BREAK</p></td>
<td class="enum_member_description">
<p>Indicates that if input text is broken at the
beginning of the cluster this glyph is part of,
then both sides need to be re-shaped, as the
result might be different.
On the flip side, it means that when this
flag is not present, then it is safe to break
the glyph-run at the beginning of this
cluster, and the two sides will represent the
exact same result one would get if breaking
input text at the beginning of this cluster
and shaping the two sides separately.
This can be used to optimize paragraph
layout, by avoiding re-shaping of each line
after line-breaking.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-GLYPH-FLAG-UNSAFE-TO-CONCAT:CAPS"></a>HB_GLYPH_FLAG_UNSAFE_TO_CONCAT</p></td>
<td class="enum_member_description">
<p>Indicates that if input text is changed on one
side of the beginning of the cluster this glyph
is part of, then the shaping results for the
other side might change.
Note that the absence of this flag will NOT by
itself mean that it IS safe to concat text.
Only two pieces of text both of which clear of
this flag can be concatenated safely.
This can be used to optimize paragraph
layout, by avoiding re-shaping of each line
after line-breaking, by limiting the
reshaping to a small piece around the
breaking position only, even if the breaking
position carries the
<a class="link" href="harfbuzz-hb-buffer.html#HB-GLYPH-FLAG-UNSAFE-TO-BREAK:CAPS"><span class="type">HB_GLYPH_FLAG_UNSAFE_TO_BREAK</span></a> or when
hyphenation or other text transformation
happens at line-break position, in the following
way:
1. Iterate back from the line-break position
until the first cluster start position that is
NOT unsafe-to-concat, 2. shape the segment from
there till the end of line, 3. check whether the
resulting glyph-run also is clear of the
unsafe-to-concat at its start-of-text position;
if it is, just splice it into place and the line
is shaped; If not, move on to a position further
back that is clear of unsafe-to-concat and retry
from there, and repeat.
At the start of next line a similar algorithm can
be implemented. That is: 1. Iterate forward from
the line-break position until the first cluster
start position that is NOT unsafe-to-concat, 2.
shape the segment from beginning of the line to
that position, 3. check whether the resulting
glyph-run also is clear of the unsafe-to-concat
at its end-of-text position; if it is, just splice
it into place and the beginning is shaped; If not,
move on to a position further forward that is clear
of unsafe-to-concat and retry up to there, and repeat.
A slight complication will arise in the
implementation of the algorithm above,
because while our buffer API has a way to
return flags for position corresponding to
start-of-text, there is currently no position
corresponding to end-of-text. This limitation
can be alleviated by shaping more text than needed
and looking for unsafe-to-concat flag within text
clusters.
The <a class="link" href="harfbuzz-hb-buffer.html#HB-GLYPH-FLAG-UNSAFE-TO-BREAK:CAPS"><span class="type">HB_GLYPH_FLAG_UNSAFE_TO_BREAK</span></a> flag will
always imply this flag.
To use this flag, you must enable the buffer flag
<em class="parameter"><code>HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT</code></em>
during
shaping, otherwise the buffer flag will not be
reliably produced.
Since: 4.0.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-GLYPH-FLAG-SAFE-TO-INSERT-TATWEEL:CAPS"></a>HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL</p></td>
<td class="enum_member_description">
<p>In scripts that use elongation (Arabic,
Mongolian, Syriac, etc.), this flag signifies
that it is safe to insert a U+0640 TATWEEL
character before this cluster for elongation.
This flag does not determine the
script-specific elongation places, but only
when it is safe to do the elongation without
interrupting text shaping.
Since: 5.1.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-GLYPH-FLAG-DEFINED:CAPS"></a>HB_GLYPH_FLAG_DEFINED</p></td>
<td class="enum_member_description">
<p>All the currently defined flags.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-1-5-0.html#api-index-1.5.0">1.5.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-glyph-position-t"></a><h3>hb_glyph_position_t</h3>
<pre class="programlisting">typedef struct {
hb_position_t x_advance;
hb_position_t y_advance;
hb_position_t x_offset;
hb_position_t y_offset;
} hb_glyph_position_t;
</pre>
<p>The <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t" title="hb_glyph_position_t"><span class="type">hb_glyph_position_t</span></a> is the structure that holds the positions of the
glyph in both horizontal and vertical directions. All positions in
<a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t" title="hb_glyph_position_t"><span class="type">hb_glyph_position_t</span></a> are relative to the current point.</p>
<div class="refsect3">
<a name="hb-glyph-position-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-position-t" title="hb_position_t"><span class="type">hb_position_t</span></a> <em class="structfield"><code><a name="hb-glyph-position-t.x-advance"></a>x_advance</code></em>;</p></td>
<td class="struct_member_description"><p>how much the line advances after drawing this glyph when setting
text in horizontal direction.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="harfbuzz-hb-common.html#hb-position-t" title="hb_position_t"><span class="type">hb_position_t</span></a> <em class="structfield"><code><a name="hb-glyph-position-t.y-advance"></a>y_advance</code></em>;</p></td>
<td class="struct_member_description"><p>how much the line advances after drawing this glyph when setting
text in vertical direction.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="harfbuzz-hb-common.html#hb-position-t" title="hb_position_t"><span class="type">hb_position_t</span></a> <em class="structfield"><code><a name="hb-glyph-position-t.x-offset"></a>x_offset</code></em>;</p></td>
<td class="struct_member_description"><p>how much the glyph moves on the X-axis before drawing it, this
should not affect how much the line advances.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="harfbuzz-hb-common.html#hb-position-t" title="hb_position_t"><span class="type">hb_position_t</span></a> <em class="structfield"><code><a name="hb-glyph-position-t.y-offset"></a>y_offset</code></em>;</p></td>
<td class="struct_member_description"><p>how much the glyph moves on the Y-axis before drawing it, this
should not affect how much the line advances.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-content-type-t"></a><h3>enum hb_buffer_content_type_t</h3>
<p>The type of <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> contents.</p>
<div class="refsect3">
<a name="hb-buffer-content-type-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-BUFFER-CONTENT-TYPE-INVALID:CAPS"></a>HB_BUFFER_CONTENT_TYPE_INVALID</p></td>
<td class="enum_member_description">
<p>Initial value for new buffer.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-CONTENT-TYPE-UNICODE:CAPS"></a>HB_BUFFER_CONTENT_TYPE_UNICODE</p></td>
<td class="enum_member_description">
<p>The buffer contains input characters (before shaping).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-CONTENT-TYPE-GLYPHS:CAPS"></a>HB_BUFFER_CONTENT_TYPE_GLYPHS</p></td>
<td class="enum_member_description">
<p>The buffer contains output glyphs (after shaping).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-flags-t"></a><h3>enum hb_buffer_flags_t</h3>
<p>Flags for <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>.</p>
<div class="refsect3">
<a name="hb-buffer-flags-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-BUFFER-FLAG-DEFAULT:CAPS"></a>HB_BUFFER_FLAG_DEFAULT</p></td>
<td class="enum_member_description">
<p>the default buffer flag.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-FLAG-BOT:CAPS"></a>HB_BUFFER_FLAG_BOT</p></td>
<td class="enum_member_description">
<p>flag indicating that special handling of the beginning
of text paragraph can be applied to this buffer. Should usually
be set, unless you are passing to the buffer only part
of the text without the full context.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-FLAG-EOT:CAPS"></a>HB_BUFFER_FLAG_EOT</p></td>
<td class="enum_member_description">
<p>flag indicating that special handling of the end of text
paragraph can be applied to this buffer, similar to
<em class="parameter"><code>HB_BUFFER_FLAG_BOT</code></em>
.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-FLAG-PRESERVE-DEFAULT-IGNORABLES:CAPS"></a>HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES</p></td>
<td class="enum_member_description">
<p>flag indication that character with Default_Ignorable
Unicode property should use the corresponding glyph
from the font, instead of hiding them (done by
replacing them with the space glyph and zeroing the
advance width.) This flag takes precedence over
<em class="parameter"><code>HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES</code></em>
.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-FLAG-REMOVE-DEFAULT-IGNORABLES:CAPS"></a>HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES</p></td>
<td class="enum_member_description">
<p>flag indication that character with Default_Ignorable
Unicode property should be removed from glyph string
instead of hiding them (done by replacing them with the
space glyph and zeroing the advance width.)
<em class="parameter"><code>HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES</code></em>
takes
precedence over this flag. Since: 1.8.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-FLAG-DO-NOT-INSERT-DOTTED-CIRCLE:CAPS"></a>HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE</p></td>
<td class="enum_member_description">
<p>flag indicating that a dotted circle should
not be inserted in the rendering of incorrect
character sequences (such at <0905 093E>). Since: 2.4.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-FLAG-VERIFY:CAPS"></a>HB_BUFFER_FLAG_VERIFY</p></td>
<td class="enum_member_description">
<p>flag indicating that the <a class="link" href="harfbuzz-hb-shape.html#hb-shape" title="hb_shape ()"><code class="function">hb_shape()</code></a> call and its variants
should perform various verification processes on the results
of the shaping operation on the buffer. If the verification
fails, then either a buffer message is sent, if a message
handler is installed on the buffer, or a message is written
to standard error. In either case, the shaping result might
be modified to show the failed output. Since: 3.4.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-FLAG-PRODUCE-UNSAFE-TO-CONCAT:CAPS"></a>HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT</p></td>
<td class="enum_member_description">
<p>flag indicating that the <em class="parameter"><code>HB_GLYPH_FLAG_UNSAFE_TO_CONCAT</code></em>
glyph-flag should be produced by the shaper. By default
it will not be produced since it incurs a cost. Since: 4.0.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-FLAG-PRODUCE-SAFE-TO-INSERT-TATWEEL:CAPS"></a>HB_BUFFER_FLAG_PRODUCE_SAFE_TO_INSERT_TATWEEL</p></td>
<td class="enum_member_description">
<p>flag indicating that the <em class="parameter"><code>HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL</code></em>
glyph-flag should be produced by the shaper. By default
it will not be produced. Since: 5.1.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-FLAG-DEFINED:CAPS"></a>HB_BUFFER_FLAG_DEFINED</p></td>
<td class="enum_member_description">
<p>All currently defined flags: Since: 4.4.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-20.html#api-index-0.9.20">0.9.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-cluster-level-t"></a><h3>enum hb_buffer_cluster_level_t</h3>
<p>Data type for holding HarfBuzz's clustering behavior options. The cluster level
dictates one aspect of how HarfBuzz will treat non-base characters
during shaping.</p>
<p>In <em class="parameter"><code>HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES</code></em>
, non-base
characters are merged into the cluster of the base character that precedes them.</p>
<p>In <em class="parameter"><code>HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS</code></em>
, non-base characters are initially
assigned their own cluster values, which are not merged into preceding base
clusters. This allows HarfBuzz to perform additional operations like reorder
sequences of adjacent marks.</p>
<p><em class="parameter"><code>HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES</code></em>
is the default, because it maintains
backward compatibility with older versions of HarfBuzz. New client programs that
do not need to maintain such backward compatibility are recommended to use
<em class="parameter"><code>HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS</code></em>
instead of the default.</p>
<div class="refsect3">
<a name="hb-buffer-cluster-level-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-BUFFER-CLUSTER-LEVEL-MONOTONE-GRAPHEMES:CAPS"></a>HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES</p></td>
<td class="enum_member_description">
<p>Return cluster values grouped by graphemes into
monotone order.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-CLUSTER-LEVEL-MONOTONE-CHARACTERS:CAPS"></a>HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS</p></td>
<td class="enum_member_description">
<p>Return cluster values grouped into monotone order.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-CLUSTER-LEVEL-CHARACTERS:CAPS"></a>HB_BUFFER_CLUSTER_LEVEL_CHARACTERS</p></td>
<td class="enum_member_description">
<p>Don't group cluster values.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-CLUSTER-LEVEL-DEFAULT:CAPS"></a>HB_BUFFER_CLUSTER_LEVEL_DEFAULT</p></td>
<td class="enum_member_description">
<p>Default cluster level,
equal to <em class="parameter"><code>HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES</code></em>
.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-42.html#api-index-0.9.42">0.9.42</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-segment-properties-t"></a><h3>hb_segment_properties_t</h3>
<pre class="programlisting">typedef struct {
hb_direction_t direction;
hb_script_t script;
hb_language_t language;
} hb_segment_properties_t;
</pre>
<p>The structure that holds various text properties of an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>. Can be
set and retrieved using <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-segment-properties" title="hb_buffer_set_segment_properties ()"><code class="function">hb_buffer_set_segment_properties()</code></a> and
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-get-segment-properties" title="hb_buffer_get_segment_properties ()"><code class="function">hb_buffer_get_segment_properties()</code></a>, respectively.</p>
<div class="refsect3">
<a name="hb-segment-properties-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-direction-t" title="enum hb_direction_t"><span class="type">hb_direction_t</span></a> <em class="structfield"><code><a name="hb-segment-properties-t.direction"></a>direction</code></em>;</p></td>
<td class="struct_member_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> of the buffer, see <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-direction" title="hb_buffer_set_direction ()"><code class="function">hb_buffer_set_direction()</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="harfbuzz-hb-common.html#hb-script-t" title="enum hb_script_t"><span class="type">hb_script_t</span></a> <em class="structfield"><code><a name="hb-segment-properties-t.script"></a>script</code></em>;</p></td>
<td class="struct_member_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> of the buffer, see <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-script" title="hb_buffer_set_script ()"><code class="function">hb_buffer_set_script()</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="harfbuzz-hb-common.html#hb-language-t" title="hb_language_t"><span class="type">hb_language_t</span></a> <em class="structfield"><code><a name="hb-segment-properties-t.language"></a>language</code></em>;</p></td>
<td class="struct_member_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> of the buffer, see <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-set-language" title="hb_buffer_set_language ()"><code class="function">hb_buffer_set_language()</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-serialize-format-t"></a><h3>enum hb_buffer_serialize_format_t</h3>
<p>The buffer serialization and de-serialization format used in
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-glyphs" title="hb_buffer_serialize_glyphs ()"><code class="function">hb_buffer_serialize_glyphs()</code></a> and <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-deserialize-glyphs" title="hb_buffer_deserialize_glyphs ()"><code class="function">hb_buffer_deserialize_glyphs()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-serialize-format-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-BUFFER-SERIALIZE-FORMAT-TEXT:CAPS"></a>HB_BUFFER_SERIALIZE_FORMAT_TEXT</p></td>
<td class="enum_member_description">
<p>a human-readable, plain text format.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-SERIALIZE-FORMAT-JSON:CAPS"></a>HB_BUFFER_SERIALIZE_FORMAT_JSON</p></td>
<td class="enum_member_description">
<p>a machine-readable JSON format.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-SERIALIZE-FORMAT-INVALID:CAPS"></a>HB_BUFFER_SERIALIZE_FORMAT_INVALID</p></td>
<td class="enum_member_description">
<p>invalid format.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</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-buffer-serialize-flags-t"></a><h3>enum hb_buffer_serialize_flags_t</h3>
<p>Flags that control what glyph information are serialized in <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-serialize-glyphs" title="hb_buffer_serialize_glyphs ()"><code class="function">hb_buffer_serialize_glyphs()</code></a>.</p>
<div class="refsect3">
<a name="hb-buffer-serialize-flags-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-BUFFER-SERIALIZE-FLAG-DEFAULT:CAPS"></a>HB_BUFFER_SERIALIZE_FLAG_DEFAULT</p></td>
<td class="enum_member_description">
<p>serialize glyph names, clusters and positions.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-SERIALIZE-FLAG-NO-CLUSTERS:CAPS"></a>HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS</p></td>
<td class="enum_member_description">
<p>do not serialize glyph cluster.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-SERIALIZE-FLAG-NO-POSITIONS:CAPS"></a>HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS</p></td>
<td class="enum_member_description">
<p>do not serialize glyph position information.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-SERIALIZE-FLAG-NO-GLYPH-NAMES:CAPS"></a>HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES</p></td>
<td class="enum_member_description">
<p>do no serialize glyph name.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-SERIALIZE-FLAG-GLYPH-EXTENTS:CAPS"></a>HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS</p></td>
<td class="enum_member_description">
<p>serialize glyph extents.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-SERIALIZE-FLAG-GLYPH-FLAGS:CAPS"></a>HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS</p></td>
<td class="enum_member_description">
<p>serialize glyph flags. Since: 1.5.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-SERIALIZE-FLAG-NO-ADVANCES:CAPS"></a>HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES</p></td>
<td class="enum_member_description">
<p>do not serialize glyph advances,
glyph offsets will reflect absolute glyph positions. Since: 1.8.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-SERIALIZE-FLAG-DEFINED:CAPS"></a>HB_BUFFER_SERIALIZE_FLAG_DEFINED</p></td>
<td class="enum_member_description">
<p>All currently defined flags. Since: 4.4.0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-0-9-20.html#api-index-0.9.20">0.9.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="hb-buffer-diff-flags-t"></a><h3>enum hb_buffer_diff_flags_t</h3>
<p>Flags from comparing two <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a>'s.</p>
<p>Buffer with different <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-content-type-t" title="enum hb_buffer_content_type_t"><span class="type">hb_buffer_content_type_t</span></a> cannot be meaningfully
compared in any further detail.</p>
<p>For buffers with differing length, the per-glyph comparison is not
attempted, though we do still scan reference buffer for dotted circle and
<code class="literal">.notdef</code> glyphs.</p>
<p>If the buffers have the same length, we compare them glyph-by-glyph and
report which aspect(s) of the glyph info/position are different.</p>
<div class="refsect3">
<a name="hb-buffer-diff-flags-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-BUFFER-DIFF-FLAG-EQUAL:CAPS"></a>HB_BUFFER_DIFF_FLAG_EQUAL</p></td>
<td class="enum_member_description">
<p>equal buffers.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-DIFF-FLAG-CONTENT-TYPE-MISMATCH:CAPS"></a>HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH</p></td>
<td class="enum_member_description">
<p>buffers with different
<a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-content-type-t" title="enum hb_buffer_content_type_t"><span class="type">hb_buffer_content_type_t</span></a>.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-DIFF-FLAG-LENGTH-MISMATCH:CAPS"></a>HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH</p></td>
<td class="enum_member_description">
<p>buffers with differing length.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-DIFF-FLAG-NOTDEF-PRESENT:CAPS"></a>HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT</p></td>
<td class="enum_member_description">
<p><code class="literal">.notdef</code> glyph is present in the
reference buffer.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-DIFF-FLAG-DOTTED-CIRCLE-PRESENT:CAPS"></a>HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT</p></td>
<td class="enum_member_description">
<p>dotted circle glyph is present
in the reference buffer.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-DIFF-FLAG-CODEPOINT-MISMATCH:CAPS"></a>HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH</p></td>
<td class="enum_member_description">
<p>difference in <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t.codepoint"><span class="type">hb_glyph_info_t.codepoint</span></a></p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-DIFF-FLAG-CLUSTER-MISMATCH:CAPS"></a>HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH</p></td>
<td class="enum_member_description">
<p>difference in <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-info-t.cluster"><span class="type">hb_glyph_info_t.cluster</span></a></p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-DIFF-FLAG-GLYPH-FLAGS-MISMATCH:CAPS"></a>HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH</p></td>
<td class="enum_member_description">
<p>difference in <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-flags-t" title="enum hb_glyph_flags_t"><span class="type">hb_glyph_flags_t</span></a>.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="HB-BUFFER-DIFF-FLAG-POSITION-MISMATCH:CAPS"></a>HB_BUFFER_DIFF_FLAG_POSITION_MISMATCH</p></td>
<td class="enum_member_description">
<p>difference in <a class="link" href="harfbuzz-hb-buffer.html#hb-glyph-position-t" title="hb_glyph_position_t"><span class="type">hb_glyph_position_t</span></a>.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-1-5-0.html#api-index-1.5.0">1.5.0</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>