📄 pangofcfontmap.html
字号:
</tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2917533"></a><h3><a name="pango-fc-font-description-from-pattern"></a>pango_fc_font_description_from_pattern ()</h3><a class="indexterm" name="id2917550"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a>* pango_fc_font_description_from_pattern (FcPattern *pattern, <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> include_size);</pre><p>Creates a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> that matches the specifiedFontconfig pattern as closely as possible. Many possible Fontconfigpattern values, such as <code class="literal">FC_RASTERIZER</code> or <code class="literal">FC_DPI</code>, don't make sense inthe context of <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>, so will be ignored.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>pattern</code></em> :</span></td><td> a <span class="type">FcPattern</span></td></tr><tr><td><span class="term"><em class="parameter"><code>include_size</code></em> :</span></td><td> if <ahref="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the pattern will include the size from the <em class="parameter"><code>pattern</code></em>; otherwise the resulting pattern will be unsized. (only <code class="literal">FC_SIZE</code> is examined, not <code class="literal">FC_PIXEL_SIZE</code>)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a new <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>. Free with <a href="pango-Fonts.html#pango-font-description-free"><code class="function">pango_font_description_free()</code></a>.</td></tr></tbody></table></div><p>Since 1.4</p></div><hr><div class="refsect2" lang="en"><a name="id2917751"></a><h3><a name="pango-fc-font-map-cache-clear"></a>pango_fc_font_map_cache_clear ()</h3><a class="indexterm" name="id2917766"></a><pre class="programlisting">void pango_fc_font_map_cache_clear (<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);</pre><p>Clear all cached information and fontsets for this font map;this should be called whenever there is a change in theoutput of the <code class="function">default_substitute()</code> virtual function.</p><p>This function is intended to be used only by backend implementationsderiving from <span class="type">PangoFcFontmap</span>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></td><td> a <span class="type">PangoFcFontmap</span></td></tr></tbody></table></div><p>Since 1.4</p></div><hr><div class="refsect2" lang="en"><a name="id2917858"></a><h3><a name="pango-fc-font-map-create-context"></a>pango_fc_font_map_create_context ()</h3><a class="indexterm" name="id2917874"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* pango_fc_font_map_create_context (<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);</pre><p>Creates a new context for this fontmap. This function is intendedonly for backend implementations deriving from <span class="type">PangoFcFontmap</span>;it is possible that a backend will store additional informationneeded for correct operation on the <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> after callingthis function.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></td><td> a <a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a new <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a></td></tr></tbody></table></div><p>Since 1.4</p></div><hr><div class="refsect2" lang="en"><a name="id2917977"></a><h3><a name="pango-fc-font-map-shutdown"></a>pango_fc_font_map_shutdown ()</h3><a class="indexterm" name="id2917993"></a><pre class="programlisting">void pango_fc_font_map_shutdown (<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);</pre><p>Clears all cached information for the fontmap and marksall fonts open for the fontmap as dead. (See the <code class="function">shutdown()</code>virtual function of <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a>.) 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 <span class="type">PangoFcFontmap</span>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></td><td> a <span class="type">PangoFcFontmap</span></td></tr></tbody></table></div><p>Since 1.4</p></div><hr><div class="refsect2" lang="en"><a name="id2918088"></a><h3><a name="pango-fc-font-map-add-decoder-find-func"></a>pango_fc_font_map_add_decoder_find_func ()</h3><a class="indexterm" name="id2918104"></a><pre class="programlisting">void pango_fc_font_map_add_decoder_find_func (<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap, <a href="PangoFcFontMap.html#PangoFcDecoderFindFunc">PangoFcDecoderFindFunc</a> findfunc, <ahref="../glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data, <ahref="../glib/glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> dnotify);</pre><p>This function saves a callback method in the <a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> thatwill be called whenever new fonts are created. If thefunction returns a <a href="PangoFcDecoder.html" title="PangoFcDecoder"><span class="type">PangoFcDecoder</span></a>, that decoder will be used todetermine both coverage via a <span class="type">FcCharSet</span> and a one-to-one mapping ofcharacters to glyphs. This will allow applications to haveapplication-specific encodings for various fonts.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></td><td> The <a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> to add this method to.</td></tr><tr><td><span class="term"><em class="parameter"><code>findfunc</code></em> :</span></td><td> The <a href="PangoFcFontMap.html#PangoFcDecoderFindFunc"><span class="type">PangoFcDecoderFindFunc</span></a> callback function</td></tr><tr><td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td><td> User data.</td></tr><tr><td><span class="term"><em class="parameter"><code>dnotify</code></em> :</span></td><td> A <ahref="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> callback that will be called when the fontmap is finalized and the decoder is released.</td></tr></tbody></table></div><p>Since 1.6.</p></div><hr><div class="refsect2" lang="en"><a name="id2918284"></a><h3><a name="PangoFcDecoderFindFunc"></a>PangoFcDecoderFindFunc ()</h3><a class="indexterm" name="id2918298"></a><pre class="programlisting"><a href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a>* (*PangoFcDecoderFindFunc) (FcPattern *pattern, <ahref="../glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre><p>Callback function passed to <a href="PangoFcFontMap.html#pango-fc-font-map-add-decoder-find-func"><code class="function">pango_fc_font_map_add_decoder_find_func()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>pattern</code></em> :</span></td><td> a fully resolved <span class="type">FcPattern</span> specifying the font on the system</td></tr><tr><td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td><td> user data passed to <a href="PangoFcFontMap.html#pango-fc-font-map-add-decoder-find-func"><code class="function">pango_fc_font_map_add_decoder_find_func()</code></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a new reference to a custom decoder for this pattern, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the default decoder handling should be used.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id2918425"></a><h2>See Also</h2><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a></span></td><td><p>The base class for fonts; creating a newFontconfig-based backend involves deriving from both<a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> and <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a>.</p></td></tr></tbody></table></div><p></p></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -