📄 pango-x-fonts-and-rendering.html
字号:
<a class="indexterm" name="id2901930"></a><pre class="programlisting">void pango_x_render (Display *display, Drawable d, GC gc, <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><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">pango_x_render</code> is deprecated and should not be used in newly-written code.</p></div><p>Renders a <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a> onto an X drawable.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>display</code></em> :</span></td><td> the X display.</td></tr><tr><td><span class="term"><em class="parameter"><code>d</code></em> :</span></td><td> the drawable on which to draw string.</td></tr><tr><td><span class="term"><em class="parameter"><code>gc</code></em> :</span></td><td> the graphics context.</td></tr><tr><td><span class="term"><em class="parameter"><code>font</code></em> :</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> :</span></td><td> the glyph string to draw.</td></tr><tr><td><span class="term"><em class="parameter"><code>x</code></em> :</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> :</span></td><td> the y position of baseline (in pixels).</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2902132"></a><h3><a name="pango-x-render-layout-line"></a>pango_x_render_layout_line ()</h3><a class="indexterm" name="id2902148"></a><pre class="programlisting">void pango_x_render_layout_line (Display *display, Drawable drawable, GC gc, <a href="pango-Layout-Objects.html#PangoLayoutLine">PangoLayoutLine</a> *line, int x, int y);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">pango_x_render_layout_line</code> is deprecated and should not be used in newly-written code.</p></div><p>Renders a <a href="pango-Layout-Objects.html#PangoLayoutLine"><span class="type">PangoLayoutLine</span></a> onto an X drawable.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>display</code></em> :</span></td><td> the X display.</td></tr><tr><td><span class="term"><em class="parameter"><code>drawable</code></em> :</span></td><td> the drawable on which to draw.</td></tr><tr><td><span class="term"><em class="parameter"><code>gc</code></em> :</span></td><td> GC to use for uncolored drawing.</td></tr><tr><td><span class="term"><em class="parameter"><code>line</code></em> :</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> :</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> :</span></td><td> the y position of baseline (in pixels).</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2902334"></a><h3><a name="pango-x-render-layout"></a>pango_x_render_layout ()</h3><a class="indexterm" name="id2902350"></a><pre class="programlisting">void pango_x_render_layout (Display *display, Drawable drawable, GC gc, <a href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> *layout, int x, int y);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">pango_x_render_layout</code> is deprecated and should not be used in newly-written code.</p></div><p>Renders a <a href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> onto an X drawable.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>display</code></em> :</span></td><td> the X display.</td></tr><tr><td><span class="term"><em class="parameter"><code>drawable</code></em> :</span></td><td> the drawable on which to draw.</td></tr><tr><td><span class="term"><em class="parameter"><code>gc</code></em> :</span></td><td> GC to use for uncolored drawing.</td></tr><tr><td><span class="term"><em class="parameter"><code>layout</code></em> :</span></td><td> a <a href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a>.</td></tr><tr><td><span class="term"><em class="parameter"><code>x</code></em> :</span></td><td> the x position of the left of the layout (in pixels).</td></tr><tr><td><span class="term"><em class="parameter"><code>y</code></em> :</span></td><td> the y position of the top of the layout (in pixels).</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2902536"></a><h3><a name="PangoXSubfont"></a>PangoXSubfont</h3><a class="indexterm" name="id2902551"></a><pre class="programlisting">typedef guint16 PangoXSubfont;</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">PangoXSubfont</code> is deprecated and should not be used in newly-written code.</p></div><p>The <span class="type">PangoXSubFont</span> type is an integer ID that identifies oneparticular X font within the fonts referenced in a <a href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id2902598"></a><h3><a name="PANGO-X-MAKE-GLYPH:CAPS"></a>PANGO_X_MAKE_GLYPH()</h3><a class="indexterm" name="id2902614"></a><pre class="programlisting">#define PANGO_X_MAKE_GLYPH(subfont,index_) ((subfont)<<16 | (index_))</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">PANGO_X_MAKE_GLYPH</code> is deprecated and should not be used in newly-written code.</p></div><p>Make a glyph index from a <span class="type">PangoXSubFont</span> index and a indexof a character with the corresponding X font.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>subfont</code></em> :</span></td><td>a <a href="pango-X-Fonts-and-Rendering.html#PangoXSubfont"><span class="type">PangoXSubfont</span></a> index</td></tr><tr><td><span class="term"><em class="parameter"><code>index_</code></em> :</span></td><td>the index of a character within an X font.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2902693"></a><h3><a name="PANGO-X-GLYPH-SUBFONT:CAPS"></a>PANGO_X_GLYPH_SUBFONT()</h3><a class="indexterm" name="id2902709"></a><pre class="programlisting">#define PANGO_X_GLYPH_SUBFONT(glyph) ((glyph)>>16)</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">PANGO_X_GLYPH_SUBFONT</code> is deprecated and should not be used in newly-written code.</p></div><p>Extract the subfont index from a glyph index.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>glyph</code></em> :</span></td><td>a <span class="type">PangoGlyphIndex</span></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2902767"></a><h3><a name="PANGO-X-GLYPH-INDEX:CAPS"></a>PANGO_X_GLYPH_INDEX()</h3><a class="indexterm" name="id2902782"></a><pre class="programlisting">#define PANGO_X_GLYPH_INDEX(glyph) ((glyph) & 0xffff)</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">PANGO_X_GLYPH_INDEX</code> is deprecated and should not be used in newly-written code.</p></div><p>Extract the character index within the X font from aglyph index.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>glyph</code></em> :</span></td><td>a <span class="type">PangoGlyphIndex</span></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2902838"></a><h3><a name="pango-x-load-font"></a>pango_x_load_font ()</h3><a class="indexterm" name="id2902854"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFont">PangoFont</a>* pango_x_load_font (Display *display, const <ahref="../glib/glib-Basic-Types.html#gchar">gchar</a> *spec);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">pango_x_load_font</code> is deprecated and should not be used in newly-written code.</p></div><p>Loads up a logical font based on a "fontset" style textspecification. This is not remotely useful (Pango API's generallywork in terms of <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>) and the result may notwork correctly in all circumstances. Use of this function shouldbe avoided.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>display</code></em> :</span></td><td> the X display.</td></tr><tr><td><span class="term"><em class="parameter"><code>spec</code></em> :</span></td><td> a comma-separated list of XLFD's.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new <a href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>.</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -