📄 fonts.xml
字号:
<refsect2><title><anchor id="pango-font-description-copy-static" role="function"/>pango_font_description_copy_static ()</title><indexterm><primary>pango_font_description_copy_static</primary></indexterm><programlisting><link linkend="PangoFontDescription">PangoFontDescription</link>* pango_font_description_copy_static (const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc);</programlisting><para>Like <link linkend="pango-font-description-copy"><function>pango_font_description_copy()</function></link>, but only a shallow copy is madeof the family name and other allocated fields. The result can onlybe used until <parameter>desc</parameter> is modified or freed. This is meant to be usedwhen the copy is only needed temporarily.</para><para></para><variablelist role="params"><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly allocated <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>, which should be freed with <link linkend="pango-font-description-free"><function>pango_font_description_free()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-description-hash" role="function"/>pango_font_description_hash ()</title><indexterm><primary>pango_font_description_hash</primary></indexterm><programlisting><link linkend="guint">guint</link> pango_font_description_hash (const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc);</programlisting><para>Computes a hash of a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> structure suitableto be used, for example, as an argument to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link>.The hash value is independent of <parameter>desc->mask</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the hash value.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-description-equal" role="function"/>pango_font_description_equal ()</title><indexterm><primary>pango_font_description_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> pango_font_description_equal (const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc1, const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc2);</programlisting><para>Compares two font descriptions for equality. Two font descriptionsare considered equal if the fonts they describe are provably identical.This means that their masks do not have to match, as long as other fieldsare all the same. (Two font descriptions may result in identical fontsbeing loaded, but still compare <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>.)</para><para></para><variablelist role="params"><varlistentry><term><parameter>desc1</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>desc2</parameter> :</term><listitem><simpara> another <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the two font descriptions are identical, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-description-free" role="function"/>pango_font_description_free ()</title><indexterm><primary>pango_font_description_free</primary></indexterm><programlisting><link linkend="void">void</link> pango_font_description_free (<link linkend="PangoFontDescription">PangoFontDescription</link> *desc);</programlisting><para>Frees a font description.</para><para></para><variablelist role="params"><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-descriptions-free" role="function"/>pango_font_descriptions_free ()</title><indexterm><primary>pango_font_descriptions_free</primary></indexterm><programlisting><link linkend="void">void</link> pango_font_descriptions_free (<link linkend="PangoFontDescription">PangoFontDescription</link> **descs, <link linkend="int">int</link> n_descs);</programlisting><para>Frees a list of font descriptions from <link linkend="pango-font-map-list-fonts"><function>pango_font_map_list_fonts()</function></link></para><para></para><variablelist role="params"><varlistentry><term><parameter>descs</parameter> :</term><listitem><simpara> a pointer to an array of <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>n_descs</parameter> :</term><listitem><simpara> number of font descriptions in <parameter>descs</parameter></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-description-set-family" role="function"/>pango_font_description_set_family ()</title><indexterm><primary>pango_font_description_set_family</primary></indexterm><programlisting><link linkend="void">void</link> pango_font_description_set_family (<link linkend="PangoFontDescription">PangoFontDescription</link> *desc, const <link linkend="char">char</link> *family);</programlisting><para>Sets the family name field of a font description. The familyname represents a family of related font styles, and willresolve to a particular <link linkend="PangoFontFamily"><type>PangoFontFamily</type></link>. In some uses of<link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>, it is also possible to use a commaseparated list of family names for this field.</para><para></para><variablelist role="params"><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>.</simpara></listitem></varlistentry><varlistentry><term><parameter>family</parameter> :</term><listitem><simpara> a string representing the family name.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-description-set-family-static" role="function"/>pango_font_description_set_family_static ()</title><indexterm><primary>pango_font_description_set_family_static</primary></indexterm><programlisting><link linkend="void">void</link> pango_font_description_set_family_static (<link linkend="PangoFontDescription">PangoFontDescription</link> *desc, const <link linkend="char">char</link> *family);</programlisting><para>Like <link linkend="pango-font-description-set-family"><function>pango_font_description_set_family()</function></link>, except that nocopy of <parameter>family</parameter> is made. The caller must make sure that thestring passed in stays around until <parameter>desc</parameter> has been freedor the name is set again. This function can be used if<parameter>family</parameter> is a static string such as a C string literal, orif <parameter>desc</parameter> is only needed temporarily.</para><para></para><variablelist role="params"><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>family</parameter> :</term><listitem><simpara> a string representing the family name.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-description-get-family" role="function"/>pango_font_description_get_family ()</title><indexterm><primary>pango_font_description_get_family</primary></indexterm><programlisting>const <link linkend="char">char</link>* pango_font_description_get_family (const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc);</programlisting><para>Gets the family name field of a font description. See<link linkend="pango-font-description-set-family"><function>pango_font_description_set_family()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the family name field for the font description, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if not previously set. This has the same life-time as the font description itself and should not be freed.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-description-set-style" role="function"/>pango_font_description_set_style ()</title><indexterm><primary>pango_font_description_set_style</primary></indexterm><programlisting><link linkend="void">void</link> pango_font_description_set_style (<link linkend="PangoFontDescription">PangoFontDescription</link> *desc, <link linkend="PangoStyle">PangoStyle</link> style);</programlisting><para>Sets the style field of a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>. The<link linkend="PangoStyle"><type>PangoStyle</type></link> enumeration describes whether the font is slanted andthe manner in which it is slanted; it can be either<link linkend="PANGO-STYLE-NORMAL:CAPS"><type>PANGO_STYLE_NORMAL</type></link>, <link linkend="PANGO-STYLE-ITALIC:CAPS"><type>PANGO_STYLE_ITALIC</type></link>, or <link linkend="PANGO-STYLE-OBLIQUE:CAPS"><type>PANGO_STYLE_OBLIQUE</type></link>.Most fonts will either have a italic style or an obliquestyle, but not both, and font matching in Pango willmatch italic specifications with oblique fonts and vice-versaif an exact match is not found.</para><para></para><variablelist role="params"><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>style</parameter> :</term><listitem><simpara> the style for the font description</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-description-get-style" role="function"/>pango_font_description_get_style ()</title><indexterm><primary>pango_font_description_get_style</primary></indexterm><programlisting><link linkend="PangoStyle">PangoStyle</link> pango_font_description_get_style (const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc);</programlisting><para>Gets the style field of a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>. See<link linkend="pango-font-description-set-style"><function>pango_font_description_set_style()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the style field for the font description. Use <link linkend="pango-font-description-get-set-fields"><function>pango_font_description_get_set_fields()</function></link> to find out if the field was explicitly set or not.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-font-description-set-variant" role="function"/>pango_font_description_set_variant ()</title><indexterm><primary>pango_font_description_set_variant</primary></indexterm><programlisting><link linkend="void">void</link> pango_font_description_set_variant (<link linkend="PangoFontDescription">PangoFontDescription</link> *desc, <link linkend="PangoVariant">PangoVariant</link> variant);</programlisting>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -