⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pango-text-processing.html

📁 linux
💻 HTML
📖 第 1 页 / 共 5 页
字号:
href="../glib/glib-Basic-Types.html#gint">gint</a>&#160;<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>&#160;<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="id3083841"></a><h3><a name="PangoAnalysis"></a>PangoAnalysis</h3><a class="indexterm" name="id3083853"></a><pre class="programlisting">typedef struct {  PangoEngineShape *shape_engine;  PangoEngineLang  *lang_engine;  PangoFont *font;  guint8 level;  guint8 gravity; /* PangoGravity */  guint8 flags;  guint8 script; /* PangoScript */  PangoLanguage *language;  GSList *extra_attrs;} PangoAnalysis;</pre><p>The <a href="pango-Text-Processing.html#PangoAnalysis"><span class="type">PangoAnalysis</span></a> structure stores information aboutthe properties of a segment of text. It has the followingfields:</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a href="PangoEngineShape.html" title="PangoEngineShape">PangoEngineShape</a>&#160;*<em class="structfield"><code>shape_engine</code></em>;</span></td><td>the engine for doing rendering-system-dependent processing.</td></tr><tr><td><span class="term"><a href="PangoEngineLang.html" title="PangoEngineLang">PangoEngineLang</a>&#160;*<em class="structfield"><code>lang_engine</code></em>;</span></td><td>the engine for doing rendering-system-independent processing.</td></tr><tr><td><span class="term"><a href="pango-Fonts.html#PangoFont">PangoFont</a>&#160;*<em class="structfield"><code>font</code></em>;</span></td><td>the font for this segment.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint8">guint8</a>&#160;<em class="structfield"><code>level</code></em>;</span></td><td>the bidirectional level for this segment.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint8">guint8</a>&#160;<em class="structfield"><code>gravity</code></em>;</span></td><td>the glyph orientation for this segment (A <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a>).</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint8">guint8</a>&#160;<em class="structfield"><code>flags</code></em>;</span></td><td>boolean flags for this segment (currently only one) (Since: 1.16).</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint8">guint8</a>&#160;<em class="structfield"><code>script</code></em>;</span></td><td>the detected script for this segment (A <a href="pango-Scripts.html#PangoScript"><span class="type">PangoScript</span></a>) (Since: 1.18).</td></tr><tr><td><span class="term"><a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>&#160;*<em class="structfield"><code>language</code></em>;</span></td><td>the detected language for this segment.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Singly-Linked-Lists.html#GSList">GSList</a>&#160;*<em class="structfield"><code>extra_attrs</code></em>;</span></td><td>extra attributes for this segment.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3084096"></a><h3><a name="PANGO-ANALYSIS-FLAG-CENTERED-BASELINE:CAPS"></a>PANGO_ANALYSIS_FLAG_CENTERED_BASELINE</h3><a class="indexterm" name="id3084110"></a><pre class="programlisting">#define PANGO_ANALYSIS_FLAG_CENTERED_BASELINE (1 &lt;&lt; 0)</pre><p>Whether the segment should be shifted to center around the baseline.Used in vertical writing directions mostly.Since: 1.16</p></div><hr><div class="refsect2" lang="en"><a name="id3084129"></a><h3><a name="PangoDirection"></a>enum PangoDirection</h3><a class="indexterm" name="id3084141"></a><pre class="programlisting">typedef enum {  PANGO_DIRECTION_LTR,  PANGO_DIRECTION_RTL,  PANGO_DIRECTION_TTB_LTR,  PANGO_DIRECTION_TTB_RTL,  PANGO_DIRECTION_WEAK_LTR,  PANGO_DIRECTION_WEAK_RTL,  PANGO_DIRECTION_NEUTRAL} PangoDirection;</pre><p>The <a href="pango-Text-Processing.html#PangoDirection"><span class="type">PangoDirection</span></a> type represents a direction in theUnicode bidirectional algorithm; not every value in thisenumeration makes sense for every usage of <a href="pango-Text-Processing.html#PangoDirection"><span class="type">PangoDirection</span></a>;for example, the return value of <a href="pango-Text-Processing.html#pango-unichar-direction"><code class="function">pango_unichar_direction()</code></a>and <a href="pango-Text-Processing.html#pango-find-base-dir"><code class="function">pango_find_base_dir()</code></a> cannot be <a href="pango-Text-Processing.html#PANGO-DIRECTION-WEAK-LTR:CAPS"><code class="literal">PANGO_DIRECTION_WEAK_LTR</code></a>or <a href="pango-Text-Processing.html#PANGO-DIRECTION-WEAK-RTL:CAPS"><code class="literal">PANGO_DIRECTION_WEAK_RTL</code></a>, since every character is eitherneutral or has a strong direction; on the other hand<a href="pango-Text-Processing.html#PANGO-DIRECTION-NEUTRAL:CAPS"><code class="literal">PANGO_DIRECTION_NEUTRAL</code></a> doesn't make sense to passto <a href="pango-Text-Processing.html#pango-itemize-with-base-dir"><code class="function">pango_itemize_with_base_dir()</code></a>.</p><p>The <a href="pango-Text-Processing.html#PANGO-DIRECTION-TTB-LTR:CAPS"><code class="literal">PANGO_DIRECTION_TTB_LTR</code></a>, <a href="pango-Text-Processing.html#PANGO-DIRECTION-TTB-RTL:CAPS"><code class="literal">PANGO_DIRECTION_TTB_RTL</code></a>values come from an earlier interpretation of thisenumeration as the writing direction of a block oftext and are no longer used; See <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> for howvertical text is handled in Pango.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a name="PANGO-DIRECTION-LTR:CAPS"></a><code class="literal">PANGO_DIRECTION_LTR</code></span></td><td> A strong left-to-right direction</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-RTL:CAPS"></a><code class="literal">PANGO_DIRECTION_RTL</code></span></td><td> A strong right-to-left direction</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-TTB-LTR:CAPS"></a><code class="literal">PANGO_DIRECTION_TTB_LTR</code></span></td><td> Deprecated value; treated the  same as <a href="pango-Text-Processing.html#PANGO-DIRECTION-RTL:CAPS"><code class="literal">PANGO_DIRECTION_RTL</code></a>.</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-TTB-RTL:CAPS"></a><code class="literal">PANGO_DIRECTION_TTB_RTL</code></span></td><td> Deprecated value; treated the  same as <a href="pango-Text-Processing.html#PANGO-DIRECTION-LTR:CAPS"><code class="literal">PANGO_DIRECTION_LTR</code></a></td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-WEAK-LTR:CAPS"></a><code class="literal">PANGO_DIRECTION_WEAK_LTR</code></span></td><td> A weak left-to-right direction</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-WEAK-RTL:CAPS"></a><code class="literal">PANGO_DIRECTION_WEAK_RTL</code></span></td><td> A weak right-to-left direction</td></tr><tr><td><span class="term"><a name="PANGO-DIRECTION-NEUTRAL:CAPS"></a><code class="literal">PANGO_DIRECTION_NEUTRAL</code></span></td><td> No direction specified</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3084477"></a><h3><a name="PANGO-TYPE-DIRECTION:CAPS"></a>PANGO_TYPE_DIRECTION</h3><a class="indexterm" name="id3084490"></a><pre class="programlisting">#define PANGO_TYPE_DIRECTION (pango_direction_get_type())</pre><p>The <ahref="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> type for <a href="pango-Text-Processing.html#PangoDirection"><span class="type">PangoDirection</span></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id3084522"></a><h3><a name="pango-itemize"></a>pango_itemize ()</h3><a class="indexterm" name="id3084534"></a><pre class="programlisting"><ahref="../glib/glib-Doubly-Linked-Lists.html#GList">GList</a>*              pango_itemize                       (<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);</pre><p>Breaks a piece of text into segments with consistentdirectional level and shaping engine. Each byte of <em class="parameter"><code>text</code></em> willbe contained in exactly one of the items in the returned list;the generated list of items will be in logical order (the startoffsets of the items are ascending).</p><p><em class="parameter"><code>cached_iter</code></em> should be an iterator over <em class="parameter"><code>attrs</code></em> currently positioned at arange before or containing <em class="parameter"><code>start_index</code></em>; <em class="parameter"><code>cached_iter</code></em> will be advanced tothe range covering the position just after <em class="parameter"><code>start_index</code></em> + <em class="parameter"><code>length</code></em>.(i.e. if itemizing in a loop, just keep passing in the same <em class="parameter"><code>cached_iter</code></em>).</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td><td>   a structure holding information that affects	       the itemization process.</td></tr><tr><td><span class="term"><em class="parameter"><code>text</code></em>&#160;:</span></td><td>      the text to itemize.</td></tr><tr><td><span class="term"><em class="parameter"><code>start_index</code></em>&#160;:</span></td><td> first byte in <em class="parameter"><code>text</code></em> to process</td></tr><tr><td><span class="term"><em class="parameter"><code>length</code></em>&#160;:</span></td><td>    the number of bytes (not characters) to process            after <em class="parameter"><code>start_index</code></em>.            This must be &gt;= 0.</td></tr><tr><td><span class="term"><em class="parameter"><code>attrs</code></em>&#160;:</span></td><td>     the set of attributes that apply to <em class="parameter"><code>text</code></em>.</td></tr><tr><td><span class="term"><em class="parameter"><code>cached_iter</code></em>&#160;:</span></td><td>      Cached attribute iterator, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -