?? pango-cairo-rendering.html
字號:
<a name="id3226520"></a><h3><a name="PangoCairoFontMap-struct"></a>PangoCairoFontMap</h3><a class="indexterm" name="id3226533"></a><pre class="programlisting">typedef struct _PangoCairoFontMap PangoCairoFontMap;</pre><p><a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a> is an interface exported by font maps foruse with Cairo. The actual type of the font map will dependon the particular font technology Cairo was compiled to use.</p><p></p><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3226570"></a><h3><a name="pango-cairo-font-map-get-default"></a>pango_cairo_font_map_get_default ()</h3><a class="indexterm" name="id3226586"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>* pango_cairo_font_map_get_default (void);</pre><p>Gets a default font map to use with Cairo.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the default Cairo fontmap for <span class="type">Pango</span>. This object is owned by Pango and must not be freed.</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3226644"></a><h3><a name="pango-cairo-font-map-new"></a>pango_cairo_font_map_new ()</h3><a class="indexterm" name="id3226659"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>* pango_cairo_font_map_new (void);</pre><p>Creates a new <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a> object; a fontmap is usedto cache information about available fonts, and holdscertain global parameters such as the resolution.In most cases, you can use <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-get-default"><code class="function">pango_cairo_font_map_get_default()</code></a>instead.</p><p>Note that the type of the returned object will dependon the particular font backend Cairo was compiled to use;You generally should only use the <a href="pango-Fonts.html#PangoFontMap"><span class="type">PangoFontMap</span></a> and<a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a> interfaces on the returned object.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the newly allocated <a href="pango-Fonts.html#PangoFontMap"><span class="type">PangoFontMap</span></a>, which should be freed with <ahref="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3226772"></a><h3><a name="pango-cairo-font-map-new-for-font-type"></a>pango_cairo_font_map_new_for_font_type ()</h3><a class="indexterm" name="id3226788"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>* pango_cairo_font_map_new_for_font_type (<ahref="../cairo/cairo-cairo-font-face-t.html#cairo-font-type-t">cairo_font_type_t</a> fonttype);</pre><p>Creates a new <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a> object of the type suitableto be used with cairo font backend of type <em class="parameter"><code>fonttype</code></em>.</p><p>In most cases one should simply use @<a href="pango-Cairo-Rendering.html#pango-cairo-font-map-new"><code class="function">pango_cairo_font_map_new()</code></a>,or in fact in most of those cases, just use@<a href="pango-Cairo-Rendering.html#pango-cairo-font-map-get-default"><code class="function">pango_cairo_font_map_get_default()</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>fonttype</code></em> :</span></td><td> desired <ahref="../cairo/cairo-cairo-font-face-t.html#cairo-font-type-t"><span class="type">cairo_font_type_t</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the newly allocated <a href="pango-Fonts.html#PangoFontMap"><span class="type">PangoFontMap</span></a> of suitable type which should be freed with <ahref="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the requested cairo font backend is not supported.</td></tr></tbody></table></div><p class="since">Since 1.18</p></div><hr><div class="refsect2" lang="en"><a name="id3226939"></a><h3><a name="pango-cairo-font-map-get-font-type"></a>pango_cairo_font_map_get_font_type ()</h3><a class="indexterm" name="id3226956"></a><pre class="programlisting"><ahref="../cairo/cairo-cairo-font-face-t.html#cairo-font-type-t">cairo_font_type_t</a> pango_cairo_font_map_get_font_type (<a href="pango-Cairo-Rendering.html#PangoCairoFontMap">PangoCairoFontMap</a> *fontmap);</pre><p>Gets the type of Cairo font backend that <em class="parameter"><code>fontmap</code></em> uses.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>fontmap</code></em> :</span></td><td> a <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the <ahref="../cairo/cairo-cairo-font-face-t.html#cairo-font-type-t"><span class="type">cairo_font_type_t</span></a> cairo font backend type</td></tr></tbody></table></div><p class="since">Since 1.18</p></div><hr><div class="refsect2" lang="en"><a name="id3227047"></a><h3><a name="pango-cairo-font-map-set-resolution"></a>pango_cairo_font_map_set_resolution ()</h3><a class="indexterm" name="id3227063"></a><pre class="programlisting">void pango_cairo_font_map_set_resolution (<a href="pango-Cairo-Rendering.html#PangoCairoFontMap">PangoCairoFontMap</a> *fontmap, double dpi);</pre><p>Sets the resolution for the fontmap. This is a scale factor betweenpoints specified in a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> and Cairo units. Thedefault value is 96, meaning that a 10 point font will be 13units high. (10 * 96. / 72. = 13.3).</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>fontmap</code></em> :</span></td><td> a <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>dpi</code></em> :</span></td><td> the resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.)</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3227163"></a><h3><a name="pango-cairo-font-map-get-resolution"></a>pango_cairo_font_map_get_resolution ()</h3><a class="indexterm" name="id3227180"></a><pre class="programlisting">double pango_cairo_font_map_get_resolution (<a href="pango-Cairo-Rendering.html#PangoCairoFontMap">PangoCairoFontMap</a> *fontmap);</pre><p>Gets the resolution for the fontmap. See <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-set-resolution"><code class="function">pango_cairo_font_map_set_resolution()</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>fontmap</code></em> :</span></td><td> a <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the resolution in "dots per inch"</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3227267"></a><h3><a name="pango-cairo-font-map-create-context"></a>pango_cairo_font_map_create_context ()</h3><a class="indexterm" name="id3227283"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* pango_cairo_font_map_create_context (<a href="pango-Cairo-Rendering.html#PangoCairoFontMap">PangoCairoFontMap</a> *fontmap);</pre><p>Create a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> for the given fontmap.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>fontmap</code></em> :</span></td><td> a <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the newly created context; free with <ahref="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3227378"></a><h3><a name="pango-cairo-font-get-scaled-font"></a>pango_cairo_font_get_scaled_font ()</h3><a class="indexterm" name="id3227394"></a><pre class="programlisting"><ahref="../cairo/cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* pango_cairo_font_get_scaled_font (<a href="pango-Cairo-Rendering.html#PangoCairoFont">PangoCairoFont</a> *font);</pre><p>Gets the <ahref="../cairo/cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a> used by <em class="parameter"><code>font</code></em>.The scaled font can be referenced and kept using<ahref="../cairo/cairo-Scaled-Fonts.html#cairo-scaled-font-reference"><code class="function">cairo_scaled_font_reference()</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>font</code></em> :</span></td><td> a <a href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a> from a <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the <ahref="../cairo/cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a> used by <em class="parameter"><code>font</code></em></td></tr></tbody></table></div><p class="since">Since 1.18</p></div><hr><div class="refsect2" lang="en"><a name="id3227520"></a><h3><a name="pango-cairo-context-set-resolution"></a>pango_cairo_context_set_resolution ()</h3><a class="indexterm" name="id3227536"></a><pre class="programlisting">void pango_cairo_context_set_resolution (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, double dpi);</pre><p>Sets the resolution for the context. This is a scale factor betweenpoints specified in a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> and Cairo units. Thedefault value is 96, meaning that a 10 point font will be 13units high. (10 * 96. / 72. = 13.3).</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>, from <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-create-context"><code class="function">pango_cairo_font_map_create_context()</code></a></td></tr><tr><td><span class="term"><em class="parameter"><code>dpi</code></em> :</span></td><td> the resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.) A 0 or negative value means to use the resolution from the font map.</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3227650"></a><h3><a name="pango-cairo-context-get-resolution"></a>pango_cairo_context_get_resolution ()</h3><a class="indexterm" name="id3227665"></a><pre class="programlisting">double pango_cairo_context_get_resolution (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);</pre><p>Gets the resolution for the context. See <a href="pango-Cairo-Rendering.html#pango-cairo-context-set-resolution"><code class="function">pango_cairo_context_set_resolution()</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>context</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>, from <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-create-context"><code class="function">pango_cairo_font_map_create_context()</code></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the resolution in "dots per inch". A negative value will
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -