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

📄 glyphs.xml

📁 linux
💻 XML
📖 第 1 页 / 共 5 页
字号:
  PangoGlyphInfo *glyphs;  /* This is a memory inefficient way of representing the information   * here - each value gives the byte index within the text   * corresponding to the glyph string of the start of the cluster to   * which the glyph belongs.   */  gint *log_clusters;} PangoGlyphString;</programlisting><para>The <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> structure is used to store stringsof glyphs with geometry and visual attribute information.The storage for the glyph information is ownedby the structure which simplifies memory management.</para><variablelist role="struct"><varlistentry><term><link linkend="gint">gint</link>&nbsp;<structfield>num_glyphs</structfield>;</term><listitem><simpara>the number of glyphs in the string.</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoGlyphInfo">PangoGlyphInfo</link>&nbsp;*<structfield>glyphs</structfield>;</term><listitem><simpara>an array of <link linkend="PangoGlyphInfo"><type>PangoGlyphInfo</type></link> structures of length <structfield>num_glyphs</structfield>.</simpara></listitem></varlistentry><varlistentry><term><link linkend="gint">gint</link>&nbsp;*<structfield>log_clusters</structfield>;</term><listitem><simpara>for each glyph, byte index of the starting character for thecluster. The indices are relative to the start of the textcorresponding to the PangoGlyphString.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PangoGlyphItem" role="struct"/>PangoGlyphItem</title><indexterm><primary>PangoGlyphItem</primary></indexterm><programlisting>typedef struct {  PangoItem        *item;  PangoGlyphString *glyphs;} PangoGlyphItem;</programlisting><para>A <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> is a pair of a <link linkend="PangoItem"><type>PangoItem</type></link> and the glyphsresulting from shaping the text corresponding to an item.As an example of the usage of <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link>, the resultsof shaping text with <link linkend="PangoLayout"><type>PangoLayout</type></link> is a list of <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link>,each of which contains a list of <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link>.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoItem">PangoItem</link>&nbsp;*<structfield>item</structfield>;</term><listitem><simpara>a <link linkend="PangoItem"><type>PangoItem</type></link> structure that provides information       about a segment of text.</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoGlyphString">PangoGlyphString</link>&nbsp;*<structfield>glyphs</structfield>;</term><listitem><simpara>the glyphs obtained by shaping the text         corresponding to <parameter>item</parameter>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PANGO-TYPE-GLYPH-STRING:CAPS" role="macro"/>PANGO_TYPE_GLYPH_STRING</title><indexterm><primary>PANGO_TYPE_GLYPH_STRING</primary></indexterm><programlisting>#define PANGO_TYPE_GLYPH_STRING (pango_glyph_string_get_type ())</programlisting><para>The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.</para></refsect2><refsect2><title><anchor id="pango-glyph-string-new" role="function"/>pango_glyph_string_new ()</title><indexterm><primary>pango_glyph_string_new</primary></indexterm><programlisting><link linkend="PangoGlyphString">PangoGlyphString</link>*   pango_glyph_string_new              (void);</programlisting><para>Create a new <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.</para><para></para><variablelist role="params"><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>, which              should be freed with <link linkend="pango-glyph-string-free"><function>pango_glyph_string_free()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-glyph-string-copy" role="function"/>pango_glyph_string_copy ()</title><indexterm><primary>pango_glyph_string_copy</primary></indexterm><programlisting><link linkend="PangoGlyphString">PangoGlyphString</link>*   pango_glyph_string_copy             (<link linkend="PangoGlyphString">PangoGlyphString</link> *string);</programlisting><para>Copy a glyph string and associated storage.</para><para></para><variablelist role="params"><varlistentry><term><parameter>string</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>, which              should be freed with <link linkend="pango-glyph-string-free"><function>pango_glyph_string_free()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-glyph-string-set-size" role="function"/>pango_glyph_string_set_size ()</title><indexterm><primary>pango_glyph_string_set_size</primary></indexterm><programlisting><link linkend="void">void</link>                pango_glyph_string_set_size         (<link linkend="PangoGlyphString">PangoGlyphString</link> *string,                                                         <link linkend="gint">gint</link> new_len);</programlisting><para>Resize a glyph string to the given length.</para><para></para><variablelist role="params"><varlistentry><term><parameter>string</parameter>&nbsp;:</term><listitem><simpara>    a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.</simpara></listitem></varlistentry><varlistentry><term><parameter>new_len</parameter>&nbsp;:</term><listitem><simpara>   the new length of the string.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-glyph-string-free" role="function"/>pango_glyph_string_free ()</title><indexterm><primary>pango_glyph_string_free</primary></indexterm><programlisting><link linkend="void">void</link>                pango_glyph_string_free             (<link linkend="PangoGlyphString">PangoGlyphString</link> *string);</programlisting><para>Free a glyph string and associated storage.</para><para></para><variablelist role="params"><varlistentry><term><parameter>string</parameter>&nbsp;:</term><listitem><simpara>    a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-glyph-string-extents" role="function"/>pango_glyph_string_extents ()</title><indexterm><primary>pango_glyph_string_extents</primary></indexterm><programlisting><link linkend="void">void</link>                pango_glyph_string_extents          (<link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,                                                         <link linkend="PangoFont">PangoFont</link> *font,                                                         <link linkend="PangoRectangle">PangoRectangle</link> *ink_rect,                                                         <link linkend="PangoRectangle">PangoRectangle</link> *logical_rect);</programlisting><para>Compute the logical and ink extents of a glyph string. See the documentationfor <link linkend="pango-font-get-glyph-extents"><function>pango_font_get_glyph_extents()</function></link> for details about the interpretationof the rectangles.</para><para></para><variablelist role="params"><varlistentry><term><parameter>glyphs</parameter>&nbsp;:</term><listitem><simpara>   a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>font</parameter>&nbsp;:</term><listitem><simpara>     a <link linkend="PangoFont"><type>PangoFont</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>ink_rect</parameter>&nbsp;:</term><listitem><simpara> rectangle used to store the extents of the glyph string as drawn           or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to indicate that the result is not needed.</simpara></listitem></varlistentry><varlistentry><term><parameter>logical_rect</parameter>&nbsp;:</term><listitem><simpara> rectangle used to store the logical extents of the glyph string           or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to indicate that the result is not needed.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-glyph-string-extents-range" role="function"/>pango_glyph_string_extents_range ()</title><indexterm><primary>pango_glyph_string_extents_range</primary></indexterm><programlisting><link linkend="void">void</link>                pango_glyph_string_extents_range    (<link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,                                                         <link linkend="int">int</link> start,                                                         <link linkend="int">int</link> end,                                                         <link linkend="PangoFont">PangoFont</link> *font,                                                         <link linkend="PangoRectangle">PangoRectangle</link> *ink_rect,                                                         <link linkend="PangoRectangle">PangoRectangle</link> *logical_rect);</programlisting><para>Computes the extents of a sub-portion of a glyph string. The extents arerelative to the start of the glyph string range (the origin of theircoordinate system is at the start of the range, not at the start of the entireglyph string).</para><para></para><variablelist role="params"><varlistentry><term><parameter>glyphs</parameter>&nbsp;:</term><listitem><simpara>   a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>start</parameter>&nbsp;:</term><listitem><simpara>    start index</simpara></listitem></varlistentry><varlistentry><term><parameter>end</parameter>&nbsp;:</term><listitem><simpara>      end index (the range is the set of bytes with	      indices such that start &lt;= index &lt; end)</simpara></listitem></varlistentry><varlistentry><term><parameter>font</parameter>&nbsp;:</term><listitem><simpara>     a <link linkend="PangoFont"><type>PangoFont</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>ink_rect</parameter>&nbsp;:</term><listitem><simpara> rectangle used to store the extents of the glyph string range as drawn           or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to indicate that the result is not needed.</simpara></listitem></varlistentry><varlistentry><term><parameter>logical_rect</parameter>&nbsp;:</term><listitem><simpara> rectangle used to store the logical extents of the glyph string range           or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to indicate that the result is not needed.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-glyph-string-get-width" role="function" condition="since:1.14"/>pango_glyph_string_get_width ()</title><indexterm role="1.14"><primary>pango_glyph_string_get_width</primary></indexterm><programlisting><link linkend="int">int</link>                 pango_glyph_string_get_width        (<link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs);</programlisting><para>Computes the logical width of the glyph string as can also be computedusing <link linkend="pango-glyph-string-extents"><function>pango_glyph_string_extents()</function></link>.  However, since this only computes thewidth, it's much faster.  This is in fact only a convenience function thatcomputes the sum of geometry.width for each glyph in the <parameter>glyphs</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>glyphs</parameter>&nbsp;:</term><listitem><simpara>   a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the logical width of the glyph string.</simpara></listitem></varlistentry></variablelist><para role="since">Since  1.14</para></refsect2><refsect2><title><anchor id="pango-glyph-string-index-to-x" role="function"/>pango_glyph_string_index_to_x ()</title><indexterm><primary>pango_glyph_string_index_to_x</primary></indexterm><programlisting><link linkend="void">void</link>                pango_glyph_string_index_to_x       (<link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,                                                         <link linkend="char">char</link> *text,                                                         <link linkend="int">int</link> length,                                                         <link linkend="PangoAnalysis">PangoAnalysis</link> *analysis,                                                         <link linkend="int">int</link> index_,

⌨️ 快捷键说明

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