?? pango-win32-fonts-and-rendering.html
字號(hào):
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>Win32 Fonts and Rendering</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="rendering.html" title="Rendering with Pango"><link rel="prev" href="rendering.html" title="Rendering with Pango"><link rel="next" href="pango-FreeType-Fonts-and-Rendering.html" title="FreeType Fonts and Rendering"><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="rendering.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="rendering.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-FreeType-Fonts-and-Rendering.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></nobr></td></tr></table><div class="refentry" lang="en"><a name="pango-Win32-Fonts-and-Rendering"></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>Win32 Fonts and Rendering</span></h2><p>Win32 Fonts and Rendering — Functions for shape engines to manipulate Win32 fonts</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><pre class="synopsis">#define <a href="pango-Win32-Fonts-and-Rendering.html#PANGO-RENDER-TYPE-WIN32:CAPS">PANGO_RENDER_TYPE_WIN32</a><a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-get-context">pango_win32_get_context</a> (void);void <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-render">pango_win32_render</a> (HDC hdc, <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);void <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-render-transformed">pango_win32_render_transformed</a> (HDC hdc, 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);void <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-render-layout-line">pango_win32_render_layout_line</a> (HDC hdc, <a href="pango-Layout-Objects.html#PangoLayoutLine">PangoLayoutLine</a> *line, int x, int y);void <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-render-layout">pango_win32_render_layout</a> (HDC hdc, <a href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> *layout, int x, int y);<a href="pango-Glyph-Storage.html#PangoGlyph">PangoGlyph</a> <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-get-unknown-glyph">pango_win32_get_unknown_glyph</a> (<a href="pango-Fonts.html#PangoFont">PangoFont</a> *font, <ahref="../glib/glib-Unicode-Manipulation.html#gunichar">gunichar</a> wc);<ahref="../glib/glib-Basic-Types.html#gint">gint</a> <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-get-glyph-index">pango_win32_font_get_glyph_index</a> (<a href="pango-Fonts.html#PangoFont">PangoFont</a> *font, <ahref="../glib/glib-Unicode-Manipulation.html#gunichar">gunichar</a> wc);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-select-font">pango_win32_font_select_font</a> (<a href="pango-Fonts.html#PangoFont">PangoFont</a> *font, HDC hdc);void <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-done-font">pango_win32_font_done_font</a> (<a href="pango-Fonts.html#PangoFont">PangoFont</a> *font);double <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-get-metrics-factor">pango_win32_font_get_metrics_factor</a> (<a href="pango-Fonts.html#PangoFont">PangoFont</a> *font);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-get-debug-flag">pango_win32_get_debug_flag</a> (void);HDC <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-get-dc">pango_win32_get_dc</a> (void); <a href="pango-Win32-Fonts-and-Rendering.html#PangoWin32FontCache">PangoWin32FontCache</a>;<a href="pango-Win32-Fonts-and-Rendering.html#PangoWin32FontCache">PangoWin32FontCache</a>* <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-cache-new">pango_win32_font_cache_new</a> (void);void <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-cache-free">pango_win32_font_cache_free</a> (<a href="pango-Win32-Fonts-and-Rendering.html#PangoWin32FontCache">PangoWin32FontCache</a> *cache);HFONT <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-cache-load">pango_win32_font_cache_load</a> (<a href="pango-Win32-Fonts-and-Rendering.html#PangoWin32FontCache">PangoWin32FontCache</a> *cache, const LOGFONT *logfont);void <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-cache-unload">pango_win32_font_cache_unload</a> (<a href="pango-Win32-Fonts-and-Rendering.html#PangoWin32FontCache">PangoWin32FontCache</a> *cache, HFONT hfont);<a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>* <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-map-for-display">pango_win32_font_map_for_display</a> (void);void <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-shutdown-display">pango_win32_shutdown_display</a> (void);<a href="pango-Win32-Fonts-and-Rendering.html#PangoWin32FontCache">PangoWin32FontCache</a>* <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-map-get-font-cache">pango_win32_font_map_get_font_cache</a> (<a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a> *font_map);LOGFONT* <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-logfont">pango_win32_font_logfont</a> (<a href="pango-Fonts.html#PangoFont">PangoFont</a> *font);<a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a>* <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-font-description-from-logfont">pango_win32_font_description_from_logfont</a> (const LOGFONT *lfp);</pre></div><div class="refsect1" lang="en"><a name="desc"></a><h2>Description</h2><p>The macros and functions in this section are used to access fonts natively onWin32 systems and to render text in conjunction with Win32 APIs.</p></div><div class="refsect1" lang="en"><a name="details"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2871760"></a><h3><a name="PANGO-RENDER-TYPE-WIN32:CAPS"></a>PANGO_RENDER_TYPE_WIN32</h3><a class="indexterm" name="id2871773"></a><pre class="programlisting">#define PANGO_RENDER_TYPE_WIN32 "PangoRenderWin32"</pre><p>A string constant identifying the Win32 renderer. The associated quark (see<ahref="../glib/glib-Quarks.html#g-quark-from-string"><code class="function">g_quark_from_string()</code></a>) is used to identify the renderer in <a href="pango-Modules.html#pango-find-map"><code class="function">pango_find_map()</code></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id2871814"></a><h3><a name="pango-win32-get-context"></a>pango_win32_get_context ()</h3><a class="indexterm" name="id2871828"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* pango_win32_get_context (void);</pre><p>Retrieves a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> appropriate for rendering with Windows fonts.</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 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="id2871885"></a><h3><a name="pango-win32-render"></a>pango_win32_render ()</h3><a class="indexterm" name="id2871898"></a><pre class="programlisting">void pango_win32_render (HDC hdc, <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>Render a <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a> onto a Windows DC</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>hdc</code></em> :</span></td><td> the device 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="id2872044"></a><h3><a name="pango-win32-render-transformed"></a>pango_win32_render_transformed ()</h3><a class="indexterm" name="id2872057"></a><pre class="programlisting">void pango_win32_render_transformed (HDC hdc, 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 windows DC, 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>hdc</code></em> :</span></td><td> a windows device context</td></tr><tr><td><span class="term"><em class="parameter"><code>matrix</code></em> :</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> :</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 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> :</span></td><td> the y position of the baseline (in Pango units in user space coordinates)</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2872269"></a><h3><a name="pango-win32-render-layout-line"></a>pango_win32_render_layout_line ()</h3><a class="indexterm" name="id2872282"></a><pre class="programlisting">void pango_win32_render_layout_line (HDC hdc, <a href="pango-Layout-Objects.html#PangoLayoutLine">PangoLayoutLine</a> *line, int x,
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -