📄 pangofc-fontmap.xml
字号:
<listitem><simpara> Compares two context keys for equality.</simpara></listitem></varlistentry><varlistentry><term><structfield>context_substitute</structfield> ()</term><listitem><simpara> Substitutes in default values for unspecified fields in a <link linkend="FcPattern"><type>FcPattern</type></link>. This will be called prior to creating a font for the pattern. May be <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</simpara></listitem></varlistentry><varlistentry><term><structfield>create_font</structfield> ()</term><listitem><simpara> Creates a new <link linkend="PangoFcFont"><type>PangoFcFont</type></link> for the specified pattern of the appropriate type for this font map using information from the context that is passed in. The <parameter>pattern</parameter> argument must be passed to the "pattern" property of <link linkend="PangoFcFont"><type>PangoFcFont</type></link> when you call <link linkend="g-object-new"><function>g_object_new()</function></link>. Deprecated in favor of @<link linkend="create-font"><function>create_font()</function></link>. If <link linkend="NULL:CAPS"><literal>NULL</literal></link>, <link linkend="new-font"><function>new_font()</function></link> is used.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="pango-fc-font-description-from-pattern" role="function" condition="since:1.4"/>pango_fc_font_description_from_pattern ()</title><indexterm role="1.4"><primary>pango_fc_font_description_from_pattern</primary></indexterm><programlisting><link linkend="PangoFontDescription">PangoFontDescription</link>* pango_fc_font_description_from_pattern (<link linkend="FcPattern">FcPattern</link> *pattern, <link linkend="gboolean">gboolean</link> include_size);</programlisting><para>Creates a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> that matches the specifiedFontconfig pattern as closely as possible. Many possible Fontconfigpattern values, such as <link linkend="FC-RASTERIZER:CAPS"><literal>FC_RASTERIZER</literal></link> or <link linkend="FC-DPI:CAPS"><literal>FC_DPI</literal></link>, don't make sense inthe context of <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>, so will be ignored.</para><para></para><variablelist role="params"><varlistentry><term><parameter>pattern</parameter> :</term><listitem><simpara> a <link linkend="FcPattern"><type>FcPattern</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>include_size</parameter> :</term><listitem><simpara> if <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, the pattern will include the size from the <parameter>pattern</parameter>; otherwise the resulting pattern will be unsized. (only <link linkend="FC-SIZE:CAPS"><literal>FC_SIZE</literal></link> is examined, not <link linkend="FC-PIXEL-SIZE:CAPS"><literal>FC_PIXEL_SIZE</literal></link>)</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>. Free with <link linkend="pango-font-description-free"><function>pango_font_description_free()</function></link>.</simpara></listitem></varlistentry></variablelist><para>Since 1.4</para></refsect2><refsect2><title><anchor id="pango-fc-font-map-cache-clear" role="function" condition="since:1.4"/>pango_fc_font_map_cache_clear ()</title><indexterm role="1.4"><primary>pango_fc_font_map_cache_clear</primary></indexterm><programlisting><link linkend="void">void</link> pango_fc_font_map_cache_clear (<link linkend="PangoFcFontMap">PangoFcFontMap</link> *fcfontmap);</programlisting><para>Clear all cached information and fontsets for this font map;this should be called whenever there is a change in theoutput of the <link linkend="default-substitute"><function>default_substitute()</function></link> virtual function.</para><para>This function is intended to be used only by backend implementationsderiving from <link linkend="PangoFcFontmap"><type>PangoFcFontmap</type></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>fcfontmap</parameter> :</term><listitem><simpara> a <link linkend="PangoFcFontmap"><type>PangoFcFontmap</type></link></simpara></listitem></varlistentry></variablelist><para>Since 1.4</para></refsect2><refsect2><title><anchor id="pango-fc-font-map-create-context" role="function" condition="since:1.4"/>pango_fc_font_map_create_context ()</title><indexterm role="1.4"><primary>pango_fc_font_map_create_context</primary></indexterm><programlisting><link linkend="PangoContext">PangoContext</link>* pango_fc_font_map_create_context (<link linkend="PangoFcFontMap">PangoFcFontMap</link> *fcfontmap);</programlisting><para>Creates a new context for this fontmap. This function is intendedonly for backend implementations deriving from <link linkend="PangoFcFontmap"><type>PangoFcFontmap</type></link>;it is possible that a backend will store additional informationneeded for correct operation on the <link linkend="PangoContext"><type>PangoContext</type></link> after callingthis function.</para><para></para><variablelist role="params"><varlistentry><term><parameter>fcfontmap</parameter> :</term><listitem><simpara> a <link linkend="PangoFcFontMap"><type>PangoFcFontMap</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="PangoContext"><type>PangoContext</type></link></simpara></listitem></varlistentry></variablelist><para>Since 1.4</para></refsect2><refsect2><title><anchor id="pango-fc-font-map-shutdown" role="function" condition="since:1.4"/>pango_fc_font_map_shutdown ()</title><indexterm role="1.4"><primary>pango_fc_font_map_shutdown</primary></indexterm><programlisting><link linkend="void">void</link> pango_fc_font_map_shutdown (<link linkend="PangoFcFontMap">PangoFcFontMap</link> *fcfontmap);</programlisting><para>Clears all cached information for the fontmap and marksall fonts open for the fontmap as dead. (See the <link linkend="shutdown"><function>shutdown()</function></link>virtual function of <link linkend="PangoFcFont"><type>PangoFcFont</type></link>.) This function might be usedby a backend when the underlying windowing system for the fontmap exits. This function is only intended to be called fromonly for backend implementations deriving from <link linkend="PangoFcFontmap"><type>PangoFcFontmap</type></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>fcfontmap</parameter> :</term><listitem><simpara> a <link linkend="PangoFcFontmap"><type>PangoFcFontmap</type></link></simpara></listitem></varlistentry></variablelist><para>Since 1.4</para></refsect2><refsect2><title><anchor id="pango-fc-font-map-add-decoder-find-func" role="function" condition="since:1.6."/>pango_fc_font_map_add_decoder_find_func ()</title><indexterm role="1.6."><primary>pango_fc_font_map_add_decoder_find_func</primary></indexterm><programlisting><link linkend="void">void</link> pango_fc_font_map_add_decoder_find_func (<link linkend="PangoFcFontMap">PangoFcFontMap</link> *fcfontmap, <link linkend="PangoFcDecoderFindFunc">PangoFcDecoderFindFunc</link> findfunc, <link linkend="gpointer">gpointer</link> user_data, <link linkend="GDestroyNotify">GDestroyNotify</link> dnotify);</programlisting><para>This function saves a callback method in the <link linkend="PangoFcFontMap"><type>PangoFcFontMap</type></link> thatwill be called whenever new fonts are created. If thefunction returns a <link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link>, that decoder will be used todetermine both coverage via a <link linkend="FcCharSet"><type>FcCharSet</type></link> and a one-to-one mapping ofcharacters to glyphs. This will allow applications to haveapplication-specific encodings for various fonts.</para><para></para><variablelist role="params"><varlistentry><term><parameter>fcfontmap</parameter> :</term><listitem><simpara> The <link linkend="PangoFcFontMap"><type>PangoFcFontMap</type></link> to add this method to.</simpara></listitem></varlistentry><varlistentry><term><parameter>findfunc</parameter> :</term><listitem><simpara> The <link linkend="PangoFcDecoderFindFunc"><type>PangoFcDecoderFindFunc</type></link> callback function</simpara></listitem></varlistentry><varlistentry><term><parameter>user_data</parameter> :</term><listitem><simpara> User data.</simpara></listitem></varlistentry><varlistentry><term><parameter>dnotify</parameter> :</term><listitem><simpara> A <link linkend="GDestroyNotify"><type>GDestroyNotify</type></link> callback that will be called when the fontmap is finalized and the decoder is released.</simpara></listitem></varlistentry></variablelist><para>Since 1.6.</para></refsect2><refsect2><title><anchor id="PangoFcDecoderFindFunc" role="function"/>PangoFcDecoderFindFunc ()</title><indexterm><primary>PangoFcDecoderFindFunc</primary></indexterm><programlisting><link linkend="PangoFcDecoder">PangoFcDecoder</link>* (*PangoFcDecoderFindFunc) (<link linkend="FcPattern">FcPattern</link> *pattern, <link linkend="gpointer">gpointer</link> user_data);</programlisting><para>Callback function passed to <link linkend="pango-fc-font-map-add-decoder-find-func"><function>pango_fc_font_map_add_decoder_find_func()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>pattern</parameter> :</term><listitem><simpara> a fully resolved <link linkend="FcPattern"><type>FcPattern</type></link> specifying the font on the system</simpara></listitem></varlistentry><varlistentry><term><parameter>user_data</parameter> :</term><listitem><simpara> user data passed to <link linkend="pango-fc-font-map-add-decoder-find-func"><function>pango_fc_font_map_add_decoder_find_func()</function></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new reference to a custom decoder for this pattern, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the default decoder handling should be used.</simpara></listitem></varlistentry></variablelist></refsect2></refsect1><refsect1><title>See Also</title><para><variablelist><varlistentry><term><link linkend="PangoFcFont"><type>PangoFcFont</type></link></term><listitem><para>The base class for fonts; creating a newFontconfig-based backend involves deriving from both<link linkend="PangoFcFontMap"><type>PangoFcFontMap</type></link> and <link linkend="PangoFcFont"><type>PangoFcFont</type></link>.</para></listitem></varlistentry></variablelist></para></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -