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

📄 glyphs.xml

📁 Pango is a library for layout and rendering of text, with an emphasis on internationalization. Pang
💻 XML
📖 第 1 页 / 共 5 页
字号:
<refsect2 id="pango-matrix-transform-rectangle" role="function" condition="since:1.16"><title>pango_matrix_transform_rectangle ()</title><indexterm zone="pango-matrix-transform-rectangle" role="1.16"><primary>pango_matrix_transform_rectangle</primary></indexterm><programlisting><link linkend="void">void</link>                pango_matrix_transform_rectangle    (const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                                         <link linkend="PangoRectangle">PangoRectangle</link> *rect);</programlisting><para>First transforms <parameter>rect</parameter> using <parameter>matrix</parameter>, then calculates the bounding boxof the transformed rectangle.  The rectangle should be in Pango units.</para><para>This function is useful for example when you want to draw a rotated<parameter>PangoLayout</parameter> to an image buffer, and want to know how large the imageshould be and how much you should shift the layout when rendering.</para><para>If you have a rectangle in device units (pixels), use<link linkend="pango-matrix-transform-pixel-rectangle"><function>pango_matrix_transform_pixel_rectangle()</function></link>.</para><para>If you have the rectangle in Pango units and want to convert totransformed pixel bounding box, it is more accurate to transform it first(using this function) and pass the result to <link linkend="pango-extents-to-pixels"><function>pango_extents_to_pixels()</function></link>,first argument, for an inclusive rounded rectangle.However, there are valid reasons that you may want to convertto pixels first and then transform, for example when the transformedcoordinates may overflow in Pango units (large matrix translation forexample).</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><parameter>rect</parameter>&nbsp;:</term><listitem><simpara> in/out bounding box in Pango units, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry></variablelist><para role="since">Since  1.16</para></refsect2><refsect2 id="pango-matrix-transform-pixel-rectangle" role="function" condition="since:1.16"><title>pango_matrix_transform_pixel_rectangle ()</title><indexterm zone="pango-matrix-transform-pixel-rectangle" role="1.16"><primary>pango_matrix_transform_pixel_rectangle</primary></indexterm><programlisting><link linkend="void">void</link>                pango_matrix_transform_pixel_rectangle                                                        (const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,                                                         <link linkend="PangoRectangle">PangoRectangle</link> *rect);</programlisting><para>First transforms the <parameter>rect</parameter> using <parameter>matrix</parameter>, then calculates the bounding boxof the transformed rectangle.  The rectangle should be in device units(pixels).</para><para>This function is useful for example when you want to draw a rotated<parameter>PangoLayout</parameter> to an image buffer, and want to know how large the imageshould be and how much you should shift the layout when rendering.</para><para>For better accuracy, you should use <link linkend="pango-matrix-transform-rectangle"><function>pango_matrix_transform_rectangle()</function></link> onoriginal rectangle in Pango units and convert to pixels afterwardusing <link linkend="pango-extents-to-pixels"><function>pango_extents_to_pixels()</function></link>'s first argument.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><parameter>rect</parameter>&nbsp;:</term><listitem><simpara> in/out bounding box in device units, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry></variablelist><para role="since">Since  1.16</para></refsect2><refsect2 id="pango-matrix-get-font-scale-factor" role="function" condition="since:1.12"><title>pango_matrix_get_font_scale_factor ()</title><indexterm zone="pango-matrix-get-font-scale-factor" role="1.12"><primary>pango_matrix_get_font_scale_factor</primary></indexterm><programlisting><link linkend="double">double</link>              pango_matrix_get_font_scale_factor  (const <link linkend="PangoMatrix">PangoMatrix</link> *matrix);</programlisting><para>Returns the scale factor of a matrix on the height of the font.That is, the scale factor in the direction perpendicular to thevector that the X coordinate is mapped to.</para><para></para><variablelist role="params"><varlistentry><term><parameter>matrix</parameter>&nbsp;:</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the scale factor of <parameter>matrix</parameter> on the height of the font,or 1.0 if <parameter>matrix</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</simpara></listitem></varlistentry></variablelist><para role="since">Since  1.12</para></refsect2><refsect2 id="PangoGlyph" role="typedef"><title>PangoGlyph</title><indexterm zone="PangoGlyph"><primary>PangoGlyph</primary></indexterm><programlisting>typedef guint32 PangoGlyph;</programlisting><para>A <link linkend="PangoGlyph"><type>PangoGlyph</type></link> represents a single glyph in the output form of a string.</para></refsect2><refsect2 id="PANGO-GLYPH-EMPTY:CAPS" role="macro"><title>PANGO_GLYPH_EMPTY</title><indexterm zone="PANGO-GLYPH-EMPTY:CAPS"><primary>PANGO_GLYPH_EMPTY</primary></indexterm><programlisting>#define PANGO_GLYPH_EMPTY           ((PangoGlyph)0x0FFFFFFF)</programlisting><para>The <link linkend="PANGO-GLYPH-EMPTY:CAPS"><literal>PANGO_GLYPH_EMPTY</literal></link> macro represents a <link linkend="PangoGlyph"><type>PangoGlyph</type></link> value that has aspecial meaning, which is a zero-width empty glyph.  This is useful forexample in shaper modules, to use as the glyph for various zero-widthUnicode characters (those passing <link linkend="pango-is-zero-width"><function>pango_is_zero_width()</function></link>).</para></refsect2><refsect2 id="PANGO-GLYPH-INVALID-INPUT:CAPS" role="macro" condition="since:1.20"><title>PANGO_GLYPH_INVALID_INPUT</title><indexterm zone="PANGO-GLYPH-INVALID-INPUT:CAPS" role="1.20"><primary>PANGO_GLYPH_INVALID_INPUT</primary></indexterm><programlisting>#define PANGO_GLYPH_INVALID_INPUT   ((PangoGlyph)0xFFFFFFFF)</programlisting><para>The <link linkend="PANGO-GLYPH-EMPTY:CAPS"><literal>PANGO_GLYPH_EMPTY</literal></link> macro represents a <link linkend="PangoGlyph"><type>PangoGlyph</type></link> value that has aspecial meaning of invalid input.  <link linkend="PangoLayout"><type>PangoLayout</type></link> produces one such glyphper invalid input UTF-8 byte and such a glyph is rendered as a crossedbox.Note that this value is defined such that it has the <link linkend="PANGO-GLYPH-UNKNOWN-FLAG:CAPS"><literal>PANGO_GLYPH_UNKNOWN_FLAG</literal></link>on.</para><para role="since">Since 1.20</para></refsect2><refsect2 id="PANGO-GLYPH-UNKNOWN-FLAG:CAPS" role="macro"><title>PANGO_GLYPH_UNKNOWN_FLAG</title><indexterm zone="PANGO-GLYPH-UNKNOWN-FLAG:CAPS"><primary>PANGO_GLYPH_UNKNOWN_FLAG</primary></indexterm><programlisting>#define PANGO_GLYPH_UNKNOWN_FLAG    ((PangoGlyph)0x10000000)</programlisting><para>The <link linkend="PANGO-GLYPH-UNKNOWN-FLAG:CAPS"><literal>PANGO_GLYPH_UNKNOWN_FLAG</literal></link> macro is a flag value that can be added toa <link linkend="gunichar"><type>gunichar</type></link> value of a valid Unicode character, to produce a <link linkend="PangoGlyph"><type>PangoGlyph</type></link>value, representing an unknown-character glyph for the respective <link linkend="gunichar"><type>gunichar</type></link>.</para></refsect2><refsect2 id="PANGO-GET-UNKNOWN-GLYPH:CAPS" role="macro"><title>PANGO_GET_UNKNOWN_GLYPH()</title><indexterm zone="PANGO-GET-UNKNOWN-GLYPH:CAPS"><primary>PANGO_GET_UNKNOWN_GLYPH</primary></indexterm><programlisting>#define PANGO_GET_UNKNOWN_GLYPH(wc) ((PangoGlyph)(wc)|PANGO_GLYPH_UNKNOWN_FLAG)</programlisting><para>Returns a <link linkend="PangoGlyph"><type>PangoGlyph</type></link> value that means no glyph was found for <parameter>wc</parameter>.The way this unknown glyphs are rendered is backend specific.  For example,a box with the hexadecimal Unicode code-point of the character written in itis what is done in the most common backends.</para><variablelist role="params"><varlistentry><term><parameter>wc</parameter>&nbsp;:</term><listitem><simpara>a Unicode character</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="PangoGlyphInfo" role="struct"><title>PangoGlyphInfo</title><indexterm zone="PangoGlyphInfo"><primary>PangoGlyphInfo</primary></indexterm><programlisting>typedef struct {  PangoGlyph    glyph;  PangoGlyphGeometry geometry;  PangoGlyphVisAttr  attr;} PangoGlyphInfo;</programlisting><para>The <link linkend="PangoGlyphInfo"><type>PangoGlyphInfo</type></link> structure represents a single glyph together withpositioning information and visual attributes.It contains the following fields.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoGlyph">PangoGlyph</link>&nbsp;<structfield>glyph</structfield>;</term><listitem><simpara>the glyph itself.</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoGlyphGeometry">PangoGlyphGeometry</link>&nbsp;<structfield>geometry</structfield>;</term><listitem><simpara>the positional information about the glyph.</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoGlyphVisAttr">PangoGlyphVisAttr</link>&nbsp;<structfield>attr</structfield>;</term><listitem><simpara>the visual attributes of the glyph.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="PangoGlyphGeometry" role="struct"><title>PangoGlyphGeometry</title><indexterm zone="PangoGlyphGeometry"><primary>PangoGlyphGeometry</primary></indexterm><programlisting>typedef struct {  PangoGlyphUnit width;  PangoGlyphUnit x_offset;  PangoGlyphUnit y_offset;} PangoGlyphGeometry;</programlisting><para>The <link linkend="PangoGlyphGeometry"><type>PangoGlyphGeometry</type></link> structure contains width and positioninginformation for a single glyph. </para><variablelist role="struct"><varlistentry><term><link linkend="PangoGlyphUnit">PangoGlyphUnit</link>&nbsp;<structfield>width</structfield>;</term><listitem><simpara>the logical width to use for the the character.</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoGlyphUnit">PangoGlyphUnit</link>&nbsp;<structfield>x_offset</structfield>;</term><listitem><simpara>horizontal offset from nominal character position.</simpara></listitem></varlistentry><varlistentry><term><link linkend="PangoGlyphUnit">PangoGlyphUnit</link>&nbsp;<structfield>y_offset</structfield>;</term><listitem><simpara>vertical offset from nominal character position.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="PangoGlyphUnit" role="typedef"><title>PangoGlyphUnit</title><indexterm zone="PangoGlyphUnit"><primary>PangoGlyphUnit</primary></indexterm><programlisting>typedef gint32 PangoGlyphUnit;</programlisting><para>The <link linkend="PangoGlyphUnit"><type>PangoGlyphUnit</type></link> type is used to store dimensions withinPango. Dimensions are stored in 1/<link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> of a device unit.(A device unit might be a pixel for screen display, ora point on a printer.) <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> is currently 1024, andmay change in the future (unlikely though), but you should notdepend on its exact value. The <link linkend="PANGO-PIXELS:CAPS"><function>PANGO_PIXELS()</function></link> macro can be usedto convert from glyph units into device units with correct rounding.

⌨️ 快捷键说明

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