⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pango-freetype-fonts-and-rendering.html

📁 GTK+-2.0源码之pango-1.15.6.tar.gz
💻 HTML
📖 第 1 页 / 共 3 页
字号:
href="../glib/glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> notify);</pre><p>Sets a function that will be called to do final configurationsubstitution on a <span class="type">FcPattern</span> before it is used to loadthe font. This function can be used to do things like sethinting and antialiasing options.</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>&#160;:</span></td><td> a <a href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap"><span class="type">PangoFT2FontMap</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></td><td> function to call to to do final config tweaking       on <span class="type">FcPattern</span> objects.</td></tr><tr><td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td><td> data to pass to <em class="parameter"><code>func</code></em></td></tr><tr><td><span class="term"><em class="parameter"><code>notify</code></em>&#160;:</span></td><td> function to call when <em class="parameter"><code>data</code></em> is no longer used.</td></tr></tbody></table></div><p>Since  1.2</p></div><hr><div class="refsect2" lang="en"><a name="id2878639"></a><h3><a name="pango-ft2-font-map-substitute-changed"></a>pango_ft2_font_map_substitute_changed ()</h3><a class="indexterm" name="id2878655"></a><pre class="programlisting">void        pango_ft2_font_map_substitute_changed                                            (<a href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a> *fontmap);</pre><p>Call this function any time the results of thedefault substitution function set with<a href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-set-default-substitute"><code class="function">pango_ft2_font_map_set_default_substitute()</code></a> change.That is, if your substitution function will return differentresults for the same input pattern, you must call this 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>fontmap</code></em>&#160;:</span></td><td> a <span class="type">PangoFT2Fontmap</span></td></tr></tbody></table></div><p>Since  1.2</p></div><hr><div class="refsect2" lang="en"><a name="id2878734"></a><h3><a name="pango-ft2-get-context"></a>pango_ft2_get_context ()</h3><a class="indexterm" name="id2878750"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* pango_ft2_get_context         (double dpi_x,                                             double dpi_y);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">pango_ft2_get_context</code> is deprecated and should not be used in newly-written code.</p></div><p>Retrieves a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> for the default PangoFT2 fontmap(see <code class="function">pango_ft2_fontmap_get_for_display()</code>) and sets the resolutionfor the default fontmap to <em class="parameter"><code>dpi_x</code></em> by <em class="parameter"><code>dpi_y</code></em>.</p><p>Use of this function is deprecated; see <code class="function">pango_ft2_fontmap_create_context()</code>instead.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>dpi_x</code></em>&#160;:</span></td><td>  the horizontal DPI of the target device</td></tr><tr><td><span class="term"><em class="parameter"><code>dpi_y</code></em>&#160;:</span></td><td>  the vertical DPI of the target device</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the new <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2878905"></a><h3><a name="pango-ft2-render"></a>pango_ft2_render ()</h3><a class="indexterm" name="id2878918"></a><pre class="programlisting">void        pango_ft2_render                (FT_Bitmap *bitmap,                                             <a href="pango-Fonts.html#PangoFont">PangoFont</a> *font,                                             <a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs,                                             <ahref="../glib/glib-Basic-Types.html#gint">gint</a> x,                                             <ahref="../glib/glib-Basic-Types.html#gint">gint</a> y);</pre><p>Renders a <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a> onto a FreeType2 bitmap.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>bitmap</code></em>&#160;:</span></td><td>  the FreeType2 bitmap onto which to draw the string</td></tr><tr><td><span class="term"><em class="parameter"><code>font</code></em>&#160;:</span></td><td>    the font in which to draw the string</td></tr><tr><td><span class="term"><em class="parameter"><code>glyphs</code></em>&#160;:</span></td><td>  the glyph string to draw</td></tr><tr><td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td><td>       the x position of the start of the string (in pixels)</td></tr><tr><td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td><td>       the y position of the baseline (in pixels)</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2879065"></a><h3><a name="pango-ft2-render-transformed"></a>pango_ft2_render_transformed ()</h3><a class="indexterm" name="id2879081"></a><pre class="programlisting">void        pango_ft2_render_transformed    (FT_Bitmap *bitmap,                                             const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix,                                             <a href="pango-Fonts.html#PangoFont">PangoFont</a> *font,                                             <a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs,                                             int x,                                             int y);</pre><p>Renders a <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a> onto a FreeType2 bitmap, possiblytransforming the layed-out coordinates through a transformationmatrix. Note that the transformation matrix for <em class="parameter"><code>font</code></em> is notchanged, so to produce correct rendering results, the <em class="parameter"><code>font</code></em>must have been loaded using a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> with an identicaltransformation matrix to that passed in to this 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>bitmap</code></em>&#160;:</span></td><td>  the FreeType2 bitmap onto which to draw the string</td></tr><tr><td><span class="term"><em class="parameter"><code>matrix</code></em>&#160;:</span></td><td>  a <a href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a>, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use an identity transformation</td></tr><tr><td><span class="term"><em class="parameter"><code>font</code></em>&#160;:</span></td><td>    the font in which to draw the string</td></tr><tr><td><span class="term"><em class="parameter"><code>glyphs</code></em>&#160;:</span></td><td>  the glyph string to draw</td></tr><tr><td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td><td>       the x position of the start of the string (in Pango          units in user space coordinates)</td></tr><tr><td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td><td>       the y position of the baseline (in Pango units          in user space coordinates)</td></tr></tbody></table></div><p>Since  1.6</p></div><hr><div class="refsect2" lang="en"><a name="id2879298"></a><h3><a name="pango-ft2-render-layout-line"></a>pango_ft2_render_layout_line ()</h3><a class="indexterm" name="id2879312"></a><pre class="programlisting">void        pango_ft2_render_layout_line    (FT_Bitmap *bitmap,                                             <a href="pango-Layout-Objects.html#PangoLayoutLine">PangoLayoutLine</a> *line,                                             int x,                                             int y);</pre><p>Render a <a href="pango-Layout-Objects.html#PangoLayoutLine"><span class="type">PangoLayoutLine</span></a> onto a FreeType2 bitmap</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>bitmap</code></em>&#160;:</span></td><td>    a <span class="type">FT_Bitmap</span> to render the line onto</td></tr><tr><td><span class="term"><em class="parameter"><code>line</code></em>&#160;:</span></td><td>      a <a href="pango-Layout-Objects.html#PangoLayoutLine"><span class="type">PangoLayoutLine</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td><td>         the x position of start of string (in pixels)</td></tr><tr><td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td><td>         the y position of baseline (in pixels)</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2879447"></a><h3><a name="pango-ft2-render-layout-line-subpixel"></a>pango_ft2_render_layout_line_subpixel ()</h3><a class="indexterm" name="id2879463"></a><pre class="programlisting">void        pango_ft2_render_layout_line_subpixel                                            (FT_Bitmap *bitmap,                                             <a href="pango-Layout-Objects.html#PangoLayoutLine">PangoLayoutLine</a> *line,                                             int x,                                             int y);</pre><p>Render a <a href="pango-Layout-Objects.html#PangoLayoutLine"><span class="type">PangoLayoutLine</span></a> onto a FreeType2 bitmap, with helocation specified in fixed-point Pango units rather thanpixels. (Using this will avoid extra inaccuracies fromrounding to integer pixels multiple times, even if thefinal glyph positions are integers.)</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>bitmap</code></em>&#160;:</span></td><td>    a <span class="type">FT_Bitmap</span> to render the line onto</td></tr><tr><td><span class="term"><em class="parameter"><code>line</code></em>&#160;:</span></td><td>      a <a href="pango-Layout-Objects.html#PangoLayoutLine"><span class="type">PangoLayoutLine</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td><td>         the x position of start of string (in Pango units)</td></tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -