📄 pango-text-processing.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>Rendering</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><link rel="start" href="index.html" title="Pango Reference Manual"><link rel="up" href="pango.html" title="Basic Pango Interfaces"><link rel="prev" href="pango.html" title="Basic Pango Interfaces"><link rel="next" href="pango-Glyph-Storage.html" title="Glyph Storage"><meta name="generator" content="GTK-Doc V1.6 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="pango.html" title="Basic Pango Interfaces"><link rel="chapter" href="rendering.html" title="Rendering with Pango"><link rel="chapter" href="lowlevel.html" title="Low Level Functionality"><link rel="chapter" href="tools.html" title="Pango Tools"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 1.2"><link rel="index" href="ix04.html" title="Index of new symbols in 1.4"><link rel="index" href="ix05.html" title="Index of new symbols in 1.6"><link rel="index" href="ix06.html" title="Index of new symbols in 1.8"><link rel="index" href="ix07.html" title="Index of new symbols in 1.10"><link rel="index" href="ix08.html" title="Index of new symbols in 1.12"><link rel="index" href="ix09.html" title="Index of new symbols in 1.14"><link rel="index" href="ix10.html" title="Index of new symbols in 1.16"></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="2"><tr valign="middle"><td><a accesskey="p" href="pango.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="pango.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Pango Reference Manual</th><td><a accesskey="n" href="pango-Glyph-Storage.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>  |  <a href="#desc" class="shortcut">Description</a>  |  <a href="#object_hierarchy" class="shortcut">Object Hierarchy</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="pango-Text-Processing"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle"><a name="top_of_page"></a>Rendering</span></h2><p>Rendering — Functions to run the rendering pipeline</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><a name="PangoContext"></a><pre class="synopsis"> <a href="pango-Text-Processing.html#PangoContext-struct">PangoContext</a>; <a href="pango-Text-Processing.html#PangoItem">PangoItem</a>; <a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a>;#define <a href="pango-Text-Processing.html#PANGO-ANALYSIS-FLAG-CENTERED-BASELINE:CAPS">PANGO_ANALYSIS_FLAG_CENTERED_BASELINE</a>enum <a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a>;#define <a href="pango-Text-Processing.html#PANGO-TYPE-DIRECTION:CAPS">PANGO_TYPE_DIRECTION</a><ahref="../glib/glib-Doubly-Linked-Lists.html#GList">GList</a>* <a href="pango-Text-Processing.html#pango-itemize">pango_itemize</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, const char *text, int start_index, int length, <a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *attrs, <a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *cached_iter);<ahref="../glib/glib-Doubly-Linked-Lists.html#GList">GList</a>* <a href="pango-Text-Processing.html#pango-itemize-with-base-dir">pango_itemize_with_base_dir</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> base_dir, const char *text, int start_index, int length, <a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *attrs, <a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *cached_iter);void <a href="pango-Text-Processing.html#pango-item-free">pango_item_free</a> (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *item);<a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* <a href="pango-Text-Processing.html#pango-item-copy">pango_item_copy</a> (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *item);<a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* <a href="pango-Text-Processing.html#pango-item-new">pango_item_new</a> (void);<a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* <a href="pango-Text-Processing.html#pango-item-split">pango_item_split</a> (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *orig, int split_index, int split_offset);<ahref="../glib/glib-Doubly-Linked-Lists.html#GList">GList</a>* <a href="pango-Text-Processing.html#pango-reorder-items">pango_reorder_items</a> (<ahref="../glib/glib-Doubly-Linked-Lists.html#GList">GList</a> *logical_items);<a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* <a href="pango-Text-Processing.html#pango-context-new">pango_context_new</a> (void);void <a href="pango-Text-Processing.html#pango-context-set-font-map">pango_context_set_font_map</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a> *font_map);<a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>* <a href="pango-Text-Processing.html#pango-context-get-font-map">pango_context_get_font_map</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);<a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a>* <a href="pango-Text-Processing.html#pango-context-get-font-description">pango_context_get_font_description</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);void <a href="pango-Text-Processing.html#pango-context-set-font-description">pango_context_set_font_description</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc);<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>* <a href="pango-Text-Processing.html#pango-context-get-language">pango_context_get_language</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);void <a href="pango-Text-Processing.html#pango-context-set-language">pango_context_set_language</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> <a href="pango-Text-Processing.html#pango-context-get-base-dir">pango_context_get_base_dir</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);void <a href="pango-Text-Processing.html#pango-context-set-base-dir">pango_context_set_base_dir</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> direction);<a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> <a href="pango-Text-Processing.html#pango-context-get-base-gravity">pango_context_get_base_gravity</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);void <a href="pango-Text-Processing.html#pango-context-set-base-gravity">pango_context_set_base_gravity</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> gravity);<a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> <a href="pango-Text-Processing.html#pango-context-get-gravity">pango_context_get_gravity</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);<a href="pango-Vertical-Text.html#PangoGravityHint">PangoGravityHint</a> <a href="pango-Text-Processing.html#pango-context-get-gravity-hint">pango_context_get_gravity_hint</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);void <a href="pango-Text-Processing.html#pango-context-set-gravity-hint">pango_context_set_gravity_hint</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <a href="pango-Vertical-Text.html#PangoGravityHint">PangoGravityHint</a> hint);const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a>* <a href="pango-Text-Processing.html#pango-context-get-matrix">pango_context_get_matrix</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);void <a href="pango-Text-Processing.html#pango-context-set-matrix">pango_context_set_matrix</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix);<a href="pango-Fonts.html#PangoFont">PangoFont</a>* <a href="pango-Text-Processing.html#pango-context-load-font">pango_context_load_font</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc);<a href="pango-Fonts.html#PangoFontset">PangoFontset</a>* <a href="pango-Text-Processing.html#pango-context-load-fontset">pango_context_load_fontset</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc, <a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);<a href="pango-Fonts.html#PangoFontMetrics">PangoFontMetrics</a>* <a href="pango-Text-Processing.html#pango-context-get-metrics">pango_context_get_metrics</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc, <a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);void <a href="pango-Text-Processing.html#pango-context-list-families">pango_context_list_families</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <a href="pango-Fonts.html#PangoFontFamily">PangoFontFamily</a> ***families, int *n_families);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="pango-Text-Processing.html#pango-get-mirror-char">pango_get_mirror_char</a> (<ahref="../glib/glib-Unicode-Manipulation.html#gunichar">gunichar</a> ch, <ahref="../glib/glib-Unicode-Manipulation.html#gunichar">gunichar</a> *mirrored_ch);<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> <a href="pango-Text-Processing.html#pango-unichar-direction">pango_unichar_direction</a> (<ahref="../glib/glib-Unicode-Manipulation.html#gunichar">gunichar</a> ch);<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> <a href="pango-Text-Processing.html#pango-find-base-dir">pango_find_base_dir</a> (const <ahref="../glib/glib-Basic-Types.html#gchar">gchar</a> *text, <ahref="../glib/glib-Basic-Types.html#gint">gint</a> length);double <a href="pango-Text-Processing.html#pango-gravity-to-rotation">pango_gravity_to_rotation</a> (<a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> gravity);void <a href="pango-Text-Processing.html#pango-break">pango_break</a> (const <ahref="../glib/glib-Basic-Types.html#gchar">gchar</a> *text, int length, <a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis, <a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *attrs, int attrs_len);void <a href="pango-Text-Processing.html#pango-get-log-attrs">pango_get_log_attrs</a> (const char *text, int length, int level, <a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language, <a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *log_attrs, int attrs_len);void <a href="pango-Text-Processing.html#pango-find-paragraph-boundary">pango_find_paragraph_boundary</a> (const <ahref="../glib/glib-Basic-Types.html#gchar">gchar</a> *text, <ahref="../glib/glib-Basic-Types.html#gint">gint</a> length, <ahref="../glib/glib-Basic-Types.html#gint">gint</a> *paragraph_delimiter_index, <ahref="../glib/glib-Basic-Types.html#gint">gint</a> *next_paragraph_start);void <a href="pango-Text-Processing.html#pango-default-break">pango_default_break</a> (const <ahref="../glib/glib-Basic-Types.html#gchar">gchar</a> *text, int length, <a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis, <a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *attrs, int attrs_len); <a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a>;void <a href="pango-Text-Processing.html#pango-shape">pango_shape</a> (const <ahref="../glib/glib-Basic-Types.html#gchar">gchar</a> *text, <ahref="../glib/glib-Basic-Types.html#gint">gint</a> length, const <a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis, <a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs);</pre></div><div class="refsect1" lang="en"><a name="object_hierarchy"></a><h2>Object Hierarchy</h2><pre class="synopsis"> <ahref="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> +----PangoContext</pre></div><div class="refsect1" lang="en"><a name="desc"></a><h2>Description</h2><p>The Pango rendering pipeline takes a string ofUnicode characters and converts it into glyphs.The functions described in this section accomplishvarious steps of this process.</p></div><div class="refsect1" lang="en"><a name="details"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2754910"></a><h3><a name="PangoContext-struct"></a>PangoContext</h3><a class="indexterm" name="id2754922"></a><pre class="programlisting">typedef struct _PangoContext PangoContext;</pre><p>The <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> structure stores global informationused to control the itemization process. </p></div><hr><div class="refsect2" lang="en"><a name="id2754948"></a><h3><a name="PangoItem"></a>PangoItem</h3><a class="indexterm" name="id2754960"></a><pre class="programlisting">typedef struct { gint offset; gint length; gint num_chars; PangoAnalysis analysis;} PangoItem;</pre><p>The <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> structure stores information abouta segment of text. It contains the following fields:</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>offset</code></em>;</span></td><td>the offset of the segment from the beginning of the string in bytes.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>length</code></em>;</span></td><td>the length of the segment in bytes.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>num_chars</code></em>;</span></td><td>the length of the segment in characters.</td></tr><tr><td><span class="term"><a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> <em class="structfield"><code>analysis</code></em>;</span></td><td>the properties of the segment.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755076"></a><h3><a name="PangoAnalysis"></a>PangoAnalysis</h3><a class="indexterm" name="id2755088"></a><pre class="programlisting">typedef struct { PangoEngineShape *shape_engine; PangoEngineLang *lang_engine; PangoFont *font;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -