📄 main.xml
字号:
</variablelist><para role="since">Since 1.16</para></refsect2><refsect2><title><anchor id="pango-context-get-matrix" role="function" condition="since:1.6"/>pango_context_get_matrix ()</title><indexterm role="1.6"><primary>pango_context_get_matrix</primary></indexterm><programlisting>const <link linkend="PangoMatrix">PangoMatrix</link>* pango_context_get_matrix (<link linkend="PangoContext">PangoContext</link> *context);</programlisting><para>Gets the transformation matrix that will be applied whenrendering with this context. See <link linkend="pango-context-set-matrix"><function>pango_context_set_matrix()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the matrix, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if no matrix has been set (which is the same as the identity matrix). The returned matrix is owned by Pango and must not be modified or freed.</simpara></listitem></varlistentry></variablelist><para role="since">Since 1.6</para></refsect2><refsect2><title><anchor id="pango-context-set-matrix" role="function" condition="since:1.6"/>pango_context_set_matrix ()</title><indexterm role="1.6"><primary>pango_context_set_matrix</primary></indexterm><programlisting><link linkend="void">void</link> pango_context_set_matrix (<link linkend="PangoContext">PangoContext</link> *context, const <link linkend="PangoMatrix">PangoMatrix</link> *matrix);</programlisting><para>Sets the transformation matrix that will be applied when renderingwith this context. Note that reported metrics are in the user spacecoordinates before the application of the matrix, not device-spacecoordinates after the application of the matrix. So, they don't scalewith the matrix, though they may change slightly for differentmatrices, depending on how the text is fit to the pixel grid.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>matrix</parameter> :</term><listitem><simpara> a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to unset any existing matrix. (No matrix set is the same as setting the identity matrix.)</simpara></listitem></varlistentry></variablelist><para role="since">Since 1.6</para></refsect2><refsect2><title><anchor id="pango-context-load-font" role="function"/>pango_context_load_font ()</title><indexterm><primary>pango_context_load_font</primary></indexterm><programlisting><link linkend="PangoFont">PangoFont</link>* pango_context_load_font (<link linkend="PangoContext">PangoContext</link> *context, const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc);</programlisting><para>Loads the font in one of the fontmaps in the contextthat is the closest match for <parameter>desc</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> describing the font to load</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>the font loaded, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if no font matched.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-load-fontset" role="function"/>pango_context_load_fontset ()</title><indexterm><primary>pango_context_load_fontset</primary></indexterm><programlisting><link linkend="PangoFontset">PangoFontset</link>* pango_context_load_fontset (<link linkend="PangoContext">PangoContext</link> *context, const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc, <link linkend="PangoLanguage">PangoLanguage</link> *language);</programlisting><para>Load a set of fonts in the context that can be used to rendera font matching <parameter>desc</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> describing the fonts to load</simpara></listitem></varlistentry><varlistentry><term><parameter>language</parameter> :</term><listitem><simpara> a <link linkend="PangoLanguage"><type>PangoLanguage</type></link> the fonts will be used for</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>the fontset, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if no font matched.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-get-metrics" role="function"/>pango_context_get_metrics ()</title><indexterm><primary>pango_context_get_metrics</primary></indexterm><programlisting><link linkend="PangoFontMetrics">PangoFontMetrics</link>* pango_context_get_metrics (<link linkend="PangoContext">PangoContext</link> *context, const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc, <link linkend="PangoLanguage">PangoLanguage</link> *language);</programlisting><para>Get overall metric information for a particular fontdescription. Since the metrics may be substantially different fordifferent scripts, a language tag can be provided to indicate thatthe metrics should be retrieved that correspond to the script(s)used by that language.</para><para>The <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> is interpreted in the same way asby <link linkend="pango-itemize"><function>pango_itemize()</function></link>, and the family name may be a comma separatedlist of figures. If characters from multiple of these familieswould be used to render the string, then the returned fonts wouldbe a composite of the metrics for the fonts loaded for theindividual families.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>desc</parameter> :</term><listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> structure</simpara></listitem></varlistentry><varlistentry><term><parameter>language</parameter> :</term><listitem><simpara> language tag used to determine which script to get the metrics for. <link linkend="NULL:CAPS"><literal>NULL</literal></link> means that the language tag from the context will be used. If no language tag is set on the context, metrics large enough to cover a range of languages will be returned. The process of determining such metrics is slow, so it is best to always make sure some real language tag will be used.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a <link linkend="PangoFontMetrics"><type>PangoFontMetrics</type></link> object. The caller must call <link linkend="pango-font-metrics-unref"><function>pango_font_metrics_unref()</function></link> when finished using the object.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-context-list-families" role="function"/>pango_context_list_families ()</title><indexterm><primary>pango_context_list_families</primary></indexterm><programlisting><link linkend="void">void</link> pango_context_list_families (<link linkend="PangoContext">PangoContext</link> *context, <link linkend="PangoFontFamily">PangoFontFamily</link> ***families, <link linkend="int">int</link> *n_families);</programlisting><para>List all families for a context.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> a <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>families</parameter> :</term><listitem><simpara> location to store a pointer to an array of <link linkend="PangoFontFamily"><type>PangoFontFamily</type></link> *. This array should be freed with <link linkend="g-free"><function>g_free()</function></link>.</simpara></listitem></varlistentry><varlistentry><term><parameter>n_families</parameter> :</term><listitem><simpara> location to store the number of elements in <parameter>descs</parameter></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-get-mirror-char" role="function" condition="deprecated:"/>pango_get_mirror_char ()</title><indexterm role="deprecated"><primary>pango_get_mirror_char</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> pango_get_mirror_char (<link linkend="gunichar">gunichar</link> ch, <link linkend="gunichar">gunichar</link> *mirrored_ch);</programlisting><warning><para><literal>pango_get_mirror_char</literal> is deprecated and should not be used in newly-written code.</para></warning><para>If <parameter>ch</parameter> has the Unicode mirrored property and there is another Unicodecharacter that typically has a glyph that is the mirror image of <parameter>ch</parameter>'sglyph, puts that character in the address pointed to by <parameter>mirrored_ch</parameter>.</para><para>Use <link linkend="g-unichar-get-mirror-char"><function>g_unichar_get_mirror_char()</function></link> instead; the docs for that functionprovide full details.</para><para></para><variablelist role="params"><varlistentry><term><parameter>ch</parameter> :</term><listitem><simpara> a Unicode character</simpara></listitem></varlistentry><varlistentry><term><parameter>mirrored_ch</parameter> :</term><listitem><simpara> location to store the mirrored character</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>ch</parameter> has a mirrored character and <parameter>mirrored_ch</parameter> isfilled in, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-unichar-direction" role="function"/>pango_unichar_direction ()</title><indexterm><primary>pango_unichar_direction</primary></indexterm><programlisting><link linkend="PangoDirection">PangoDirection</link> pango_unichar_direction (<link linkend="gunichar">gunichar</link> ch);</programlisting><para>Determines the direction of a character; either<link linkend="PANGO-DIRECTION-LTR:CAPS"><literal>PANGO_DIRECTION_LTR</literal></link>, <link linkend="PANGO-DIRECTION-RTL:CAPS"><literal>PANGO_DIRECTION_RTL</literal></link>, or<link linkend="PANGO-DIRECTION-NEUTRAL:CAPS"><literal>PANGO_DIRECTION_NEUTRAL</literal></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>ch</parameter> :</term><listitem><simpara> a Unicode character</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the direction of the character, as used in theUnicode bidirectional algorithm.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-find-base-dir" role="function" condition="since:1.4"/>pango_find_base_dir ()</title><indexterm role="1.4"><primary>pango_find_base_dir</primary></indexterm><programlisting><link linkend="PangoDirection">PangoDirection</link> pango_find_base_dir (const <link linkend="gchar">gchar</link> *text, <link linkend="gint">gint</
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -