📄 text-attributes.xml
字号:
</varlistentry><varlistentry><term><anchor id="PANGO-ATTR-LANGUAGE:CAPS" role="constant"/><literal>PANGO_ATTR_LANGUAGE</literal></term><listitem><simpara>language (<link linkend="PangoAttrLanguage"><type>PangoAttrLanguage</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-FAMILY:CAPS" role="constant"/><literal>PANGO_ATTR_FAMILY</literal></term><listitem><simpara>font family name list (<link linkend="PangoAttrString"><type>PangoAttrString</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-STYLE:CAPS" role="constant"/><literal>PANGO_ATTR_STYLE</literal></term><listitem><simpara>font slant style (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-WEIGHT:CAPS" role="constant"/><literal>PANGO_ATTR_WEIGHT</literal></term><listitem><simpara>font weight (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-VARIANT:CAPS" role="constant"/><literal>PANGO_ATTR_VARIANT</literal></term><listitem><simpara>font variant (normal or small caps) (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-STRETCH:CAPS" role="constant"/><literal>PANGO_ATTR_STRETCH</literal></term><listitem><simpara>font stretch (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-SIZE:CAPS" role="constant"/><literal>PANGO_ATTR_SIZE</literal></term><listitem><simpara>font size in points scaled by <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-FONT-DESC:CAPS" role="constant"/><literal>PANGO_ATTR_FONT_DESC</literal></term><listitem><simpara>font description (<link linkend="PangoAttrFontDesc"><type>PangoAttrFontDesc</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-FOREGROUND:CAPS" role="constant"/><literal>PANGO_ATTR_FOREGROUND</literal></term><listitem><simpara>foreground color (<link linkend="PangoAttrColor"><type>PangoAttrColor</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-BACKGROUND:CAPS" role="constant"/><literal>PANGO_ATTR_BACKGROUND</literal></term><listitem><simpara>background color (<link linkend="PangoAttrColor"><type>PangoAttrColor</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-UNDERLINE:CAPS" role="constant"/><literal>PANGO_ATTR_UNDERLINE</literal></term><listitem><simpara>whether the text has an underline (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-STRIKETHROUGH:CAPS" role="constant"/><literal>PANGO_ATTR_STRIKETHROUGH</literal></term><listitem><simpara>whether the text is struck-through (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-RISE:CAPS" role="constant"/><literal>PANGO_ATTR_RISE</literal></term><listitem><simpara>baseline displacement (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-SHAPE:CAPS" role="constant"/><literal>PANGO_ATTR_SHAPE</literal></term><listitem><simpara>shape (<link linkend="PangoAttrShape"><type>PangoAttrShape</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-SCALE:CAPS" role="constant"/><literal>PANGO_ATTR_SCALE</literal></term><listitem><simpara>font size scale factor (<link linkend="PangoAttrFloat"><type>PangoAttrFloat</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-FALLBACK:CAPS" role="constant"/><literal>PANGO_ATTR_FALLBACK</literal></term><listitem><simpara>whether fallback is enabled (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-LETTER-SPACING:CAPS" role="constant"/><literal>PANGO_ATTR_LETTER_SPACING</literal></term><listitem><simpara>letter spacing (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-UNDERLINE-COLOR:CAPS" role="constant"/><literal>PANGO_ATTR_UNDERLINE_COLOR</literal></term><listitem><simpara>underline color (<link linkend="PangoAttrColor"><type>PangoAttrColor</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-STRIKETHROUGH-COLOR:CAPS" role="constant"/><literal>PANGO_ATTR_STRIKETHROUGH_COLOR</literal></term><listitem><simpara>strikethrough color (<link linkend="PangoAttrColor"><type>PangoAttrColor</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-ABSOLUTE-SIZE:CAPS" role="constant"/><literal>PANGO_ATTR_ABSOLUTE_SIZE</literal></term><listitem><simpara>font size in pixels scaled by <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-GRAVITY:CAPS" role="constant"/><literal>PANGO_ATTR_GRAVITY</literal></term><listitem><simpara>base text gravity (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry><varlistentry><term><anchor id="PANGO-ATTR-GRAVITY-HINT:CAPS" role="constant"/><literal>PANGO_ATTR_GRAVITY_HINT</literal></term><listitem><simpara>gravity hint (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PANGO-TYPE-ATTR-TYPE:CAPS" role="macro"/>PANGO_TYPE_ATTR_TYPE</title><indexterm><primary>PANGO_TYPE_ATTR_TYPE</primary></indexterm><programlisting>#define PANGO_TYPE_ATTR_TYPE (pango_attr_type_get_type())</programlisting><para>The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoAttrType"><type>PangoAttrType</type></link>.</para></refsect2><refsect2><title><anchor id="PangoAttrClass" role="struct"/>PangoAttrClass</title><indexterm><primary>PangoAttrClass</primary></indexterm><programlisting>typedef struct { PangoAttrType type; PangoAttribute * (*copy) (const PangoAttribute *attr); void (*destroy) (PangoAttribute *attr); gboolean (*equal) (const PangoAttribute *attr1, const PangoAttribute *attr2);} PangoAttrClass;</programlisting><para>The <link linkend="PangoAttrClass"><type>PangoAttrClass</type></link> structure stores the type and operations fora particular type of attribute. The functions in this structure shouldnot be called directly. Instead, one should use the wrapper functionsprovided for <link linkend="PangoAttribute"><type>PangoAttribute</type></link>.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoAttrType">PangoAttrType</link> <structfield>type</structfield>;</term><listitem><simpara>the type ID for this attribute</simpara></listitem></varlistentry><varlistentry><term><structfield>copy</structfield> ()</term><listitem><simpara>function to duplicate an attribute of this type (see <link linkend="pango-attribute-copy"><function>pango_attribute_copy()</function></link>)</simpara></listitem></varlistentry><varlistentry><term><structfield>destroy</structfield> ()</term><listitem><simpara>function to free an attribute of this type (see <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>)</simpara></listitem></varlistentry><varlistentry><term><structfield>equal</structfield> ()</term><listitem><simpara>function to check two attributes of this type for equality (see <link linkend="pango-attribute-equal"><function>pango_attribute_equal()</function></link>)</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PangoAttribute" role="struct"/>PangoAttribute</title><indexterm><primary>PangoAttribute</primary></indexterm><programlisting>typedef struct { const PangoAttrClass *klass; guint start_index; /* in bytes */ guint end_index; /* in bytes. The character at this index is not included */} PangoAttribute;</programlisting><para>The <link linkend="PangoAttribute"><type>PangoAttribute</type></link> structure represents the common portions of allattributes. Particular types of attributes include this structureas their initial portion. The common portion of the attribute holdsthe range to which the value in the type-specific part of the attributeapplies. </para><variablelist role="struct"><varlistentry><term>const <link linkend="PangoAttrClass">PangoAttrClass</link> *<structfield>klass</structfield>;</term><listitem><simpara>the class structure holding information about the type of the attribute</simpara></listitem></varlistentry><varlistentry><term><link linkend="guint">guint</link> <structfield>start_index</structfield>;</term><listitem><simpara>the start index of the range (in bytes).</simpara></listitem></varlistentry><varlistentry><term><link linkend="guint">guint</link> <structfield>end_index</structfield>;</term><listitem><simpara>end index of the range (in bytes). The character at this index is not included in the range.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="PangoAttrString" role="struct"/>PangoAttrString</title><indexterm><primary>PangoAttrString</primary></indexterm><programlisting>typedef struct { PangoAttribute attr; char *value;} PangoAttrString;</programlisting><para>The <link linkend="PangoAttrString"><type>PangoAttrString</type></link> structure is used to represent attributes witha string value.</para><variablelist role="struct"><varlistentry><term><link linkend="PangoAttribute">PangoAttribute</link> <structfield>attr</structfield>;</term><listitem><simpara>the common portion of the attribute</simpara></listitem></varlistentry><varlistentry><term><link linkend="char">char</link> *<structfield>value</structfield>;</term><listitem><simpara>the string which is the value of the attribute</simpara></listitem></varlistentry></variablelist></refsect2><refsect2>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -