📄 pangofcdecoder.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>PangoFcDecoder</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><link rel="start" href="index.html" title="Pango Reference Manual"><link rel="up" href="lowlevel.html" title="Low Level Functionality"><link rel="prev" href="PangoFcFont.html" title="PangoFcFont"><link rel="next" href="pango-OpenType-Font-Handling.html" title="OpenType Font Handling"><meta name="generator" content="GTK-Doc V1.6 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="pango.html" title="Basic Pango Interfaces"><link rel="chapter" href="rendering.html" title="Rendering with Pango"><link rel="chapter" href="lowlevel.html" title="Low Level Functionality"><link rel="chapter" href="tools.html" title="Pango Tools"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 1.2"><link rel="index" href="ix04.html" title="Index of new symbols in 1.4"><link rel="index" href="ix05.html" title="Index of new symbols in 1.6"><link rel="index" href="ix06.html" title="Index of new symbols in 1.8"><link rel="index" href="ix07.html" title="Index of new symbols in 1.10"><link rel="index" href="ix08.html" title="Index of new symbols in 1.12"><link rel="index" href="ix09.html" title="Index of new symbols in 1.14"><link rel="index" href="ix10.html" title="Index of new symbols in 1.16"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="PangoFcFont.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Pango Reference Manual</th><td><a accesskey="n" href="pango-OpenType-Font-Handling.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>  |  <a href="#desc" class="shortcut">Description</a>  |  <a href="#object_hierarchy" class="shortcut">Object Hierarchy</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="PangoFcDecoder"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle"><a name="top_of_page"></a>PangoFcDecoder</span></h2><p>PangoFcDecoder — Custom font encoding handling</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><pre class="synopsis"> <a href="PangoFcDecoder.html#PangoFcDecoder-struct">PangoFcDecoder</a>; <a href="PangoFcDecoder.html#PangoFcDecoderClass">PangoFcDecoderClass</a>;FcCharSet* <a href="PangoFcDecoder.html#pango-fc-decoder-get-charset">pango_fc_decoder_get_charset</a> (<a href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a> *decoder, <a href="PangoFcFont.html" title="PangoFcFont">PangoFcFont</a> *fcfont);<a href="pango-Glyph-Storage.html#PangoGlyph">PangoGlyph</a> <a href="PangoFcDecoder.html#pango-fc-decoder-get-glyph">pango_fc_decoder_get_glyph</a> (<a href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a> *decoder, <a href="PangoFcFont.html" title="PangoFcFont">PangoFcFont</a> *fcfont, <ahref="../glib/glib-Basic-Types.html#guint32">guint32</a> wc);</pre></div><div class="refsect1" lang="en"><a name="object_hierarchy"></a><h2>Object Hierarchy</h2><pre class="synopsis"> <ahref="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> +----PangoFcDecoder</pre></div><div class="refsect1" lang="en"><a name="desc"></a><h2>Description</h2><p>PangoFcDecoder represents a decoder that an application providesfor handling a font that is encoded in a custom way.</p></div><div class="refsect1" lang="en"><a name="details"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2923331"></a><h3><a name="PangoFcDecoder-struct"></a>PangoFcDecoder</h3><a class="indexterm" name="id2923343"></a><pre class="programlisting">typedef struct _PangoFcDecoder PangoFcDecoder;</pre><p><a href="PangoFcDecoder.html" title="PangoFcDecoder"><span class="type">PangoFcDecoder</span></a> is a virtual base class that implementations willinherit from. It's the interface that is used to define a customencoding for a font. These objects are created in your code from afunction callback that was originally registered with<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>. Pango requiresinformation about the supported charset for a font as well as theindividual character to glyph conversions. Pango gets thatinformation via the <span class="type">get_charset</span> and <span class="type">get_glyph</span> callbacks into yourobject implementation.</p><p></p><p>Since 1.6</p></div><hr><div class="refsect2" lang="en"><a name="id2923412"></a><h3><a name="PangoFcDecoderClass"></a>PangoFcDecoderClass</h3><a class="indexterm" name="id2923427"></a><pre class="programlisting">typedef struct { FcCharSet *(*get_charset) (PangoFcDecoder *decoder, PangoFcFont *fcfont); PangoGlyph (*get_glyph) (PangoFcDecoder *decoder, PangoFcFont *fcfont, guint32 wc);} PangoFcDecoderClass;</pre><p>Class structure for <a href="PangoFcDecoder.html" title="PangoFcDecoder"><span class="type">PangoFcDecoder</span></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="structfield"><code>get_charset</code></em> ()</span></td><td> This returns an <span class="type">FcCharset</span> given a <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> that includes a list of supported characters in the font. The <span class="type">FcCharSet</span> that is returned should be an internal reference to your code. Pango will not free this structure. It is important that you make this callback fast because this callback is called separately for each character to determine Unicode coverage.</td></tr><tr><td><span class="term"><em class="structfield"><code>get_glyph</code></em> ()</span></td><td> This returns a single <a href="pango-Glyph-Storage.html#PangoGlyph"><span class="type">PangoGlyph</span></a> for a given Unicode code point.</td></tr></tbody></table></div><p>Since 1.6</p></div><hr><div class="refsect2" lang="en"><a name="id2923533"></a><h3><a name="pango-fc-decoder-get-charset"></a>pango_fc_decoder_get_charset ()</h3><a class="indexterm" name="id2923549"></a><pre class="programlisting">FcCharSet* pango_fc_decoder_get_charset (<a href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a> *decoder, <a href="PangoFcFont.html" title="PangoFcFont">PangoFcFont</a> *fcfont);</pre><p>Generates an <span class="type">FcCharSet</span> of supported characters for the fcfontgiven. The returned <span class="type">FcCharSet</span> will be a reference to aninternal value stored by the <a href="PangoFcDecoder.html" title="PangoFcDecoder"><span class="type">PangoFcDecoder</span></a> and must notbe modified or freed.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>decoder</code></em> :</span></td><td> a <a href="PangoFcDecoder.html" title="PangoFcDecoder"><span class="type">PangoFcDecoder</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>fcfont</code></em> :</span></td><td> the <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> to query.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the <span class="type">FcCharset</span> for <em class="parameter"><code>fcfont</code></em>; must not be modified or freed.</td></tr></tbody></table></div><p>Since 1.6</p></div><hr><div class="refsect2" lang="en"><a name="id2923692"></a><h3><a name="pango-fc-decoder-get-glyph"></a>pango_fc_decoder_get_glyph ()</h3><a class="indexterm" name="id2923708"></a><pre class="programlisting"><a href="pango-Glyph-Storage.html#PangoGlyph">PangoGlyph</a> pango_fc_decoder_get_glyph (<a href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a> *decoder, <a href="PangoFcFont.html" title="PangoFcFont">PangoFcFont</a> *fcfont, <ahref="../glib/glib-Basic-Types.html#guint32">guint32</a> wc);</pre><p>Generates a <a href="pango-Glyph-Storage.html#PangoGlyph"><span class="type">PangoGlyph</span></a> for the given Unicode point using thecustom decoder. For complex scripts where there can be multipleglyphs for a single character, the decoder will return whateverglyph is most convenient for it. (Usually whatever glyph is directlyin the fonts character map table.)</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>decoder</code></em> :</span></td><td> a <a href="PangoFcDecoder.html" title="PangoFcDecoder"><span class="type">PangoFcDecoder</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>fcfont</code></em> :</span></td><td> a <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> to query.</td></tr><tr><td><span class="term"><em class="parameter"><code>wc</code></em> :</span></td><td> the Unicode code point to convert to a single <a href="pango-Glyph-Storage.html#PangoGlyph"><span class="type">PangoGlyph</span></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the glyph index, or 0 if the glyph isn'tcovered by the font.</td></tr></tbody></table></div><p>Since 1.6</p></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -