~ubuntu-branches/ubuntu/trusty/pango1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to docs/xml/win32-fonts.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-02-23 10:42:39 UTC
  • mfrom: (1.6.2 upstream) (63.3.16 lucid)
  • Revision ID: james.westby@ubuntu.com-20100223104239-yt4u4nop2nqtw65f
Tags: 1.27.1-1
* New upstream development release:
  + debian/rules:
    - Include check-dist.mk to prevent accidental uploads to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<refentry id="pango-Win32-Fonts-and-Rendering">
2
 
<refmeta>
3
 
<refentrytitle role="top_of_page" id="pango-Win32-Fonts-and-Rendering.top_of_page">Win32 Fonts and Rendering</refentrytitle>
4
 
<manvolnum>3</manvolnum>
5
 
<refmiscinfo>PANGO Library</refmiscinfo>
6
 
</refmeta>
7
 
 
8
 
<refnamediv>
9
 
<refname>Win32 Fonts and Rendering</refname>
10
 
<refpurpose>Functions for shape engines to manipulate Win32 fonts</refpurpose>
11
 
</refnamediv>
12
 
 
13
 
<refsynopsisdiv id="pango-Win32-Fonts-and-Rendering.synopsis" role="synopsis">
14
 
<title role="synopsis.title">Synopsis</title>
15
 
 
16
 
<synopsis>
17
 
#define             <link linkend="PANGO-RENDER-TYPE-WIN32--CAPS">PANGO_RENDER_TYPE_WIN32</link>
18
 
<link linkend="PangoContext">PangoContext</link> *      <link linkend="pango-win32-get-context">pango_win32_get_context</link>             (void);
19
 
<link linkend="void">void</link>                <link linkend="pango-win32-render">pango_win32_render</link>                  (<link linkend="HDC--CAPS">HDC</link> hdc,
20
 
                                                         <link linkend="PangoFont">PangoFont</link> *font,
21
 
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,
22
 
                                                         <link linkend="gint">gint</link> x,
23
 
                                                         <link linkend="gint">gint</link> y);
24
 
<link linkend="void">void</link>                <link linkend="pango-win32-render-transformed">pango_win32_render_transformed</link>      (<link linkend="HDC--CAPS">HDC</link> hdc,
25
 
                                                         const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,
26
 
                                                         <link linkend="PangoFont">PangoFont</link> *font,
27
 
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,
28
 
                                                         <link linkend="int">int</link> x,
29
 
                                                         <link linkend="int">int</link> y);
30
 
<link linkend="void">void</link>                <link linkend="pango-win32-render-layout-line">pango_win32_render_layout_line</link>      (<link linkend="HDC--CAPS">HDC</link> hdc,
31
 
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
32
 
                                                         <link linkend="int">int</link> x,
33
 
                                                         <link linkend="int">int</link> y);
34
 
<link linkend="void">void</link>                <link linkend="pango-win32-render-layout">pango_win32_render_layout</link>           (<link linkend="HDC--CAPS">HDC</link> hdc,
35
 
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout,
36
 
                                                         <link linkend="int">int</link> x,
37
 
                                                         <link linkend="int">int</link> y);
38
 
<link linkend="PangoGlyph">PangoGlyph</link>          <link linkend="pango-win32-get-unknown-glyph">pango_win32_get_unknown_glyph</link>       (<link linkend="PangoFont">PangoFont</link> *font,
39
 
                                                         <link linkend="gunichar">gunichar</link> wc);
40
 
<link linkend="gint">gint</link>                <link linkend="pango-win32-font-get-glyph-index">pango_win32_font_get_glyph_index</link>    (<link linkend="PangoFont">PangoFont</link> *font,
41
 
                                                         <link linkend="gunichar">gunichar</link> wc);
42
 
<link linkend="gboolean">gboolean</link>            <link linkend="pango-win32-font-select-font">pango_win32_font_select_font</link>        (<link linkend="PangoFont">PangoFont</link> *font,
43
 
                                                         <link linkend="HDC--CAPS">HDC</link> hdc);
44
 
<link linkend="void">void</link>                <link linkend="pango-win32-font-done-font">pango_win32_font_done_font</link>          (<link linkend="PangoFont">PangoFont</link> *font);
45
 
<link linkend="double">double</link>              <link linkend="pango-win32-font-get-metrics-factor">pango_win32_font_get_metrics_factor</link> (<link linkend="PangoFont">PangoFont</link> *font);
46
 
<link linkend="gboolean">gboolean</link>            <link linkend="pango-win32-get-debug-flag">pango_win32_get_debug_flag</link>          (void);
47
 
<link linkend="HDC--CAPS">HDC</link>                 <link linkend="pango-win32-get-dc">pango_win32_get_dc</link>                  (void);
48
 
                    <link linkend="PangoWin32FontCache">PangoWin32FontCache</link>;
49
 
<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> * <link linkend="pango-win32-font-cache-new">pango_win32_font_cache_new</link>        (void);
50
 
<link linkend="void">void</link>                <link linkend="pango-win32-font-cache-free">pango_win32_font_cache_free</link>         (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache);
51
 
<link linkend="HFONT--CAPS">HFONT</link>               <link linkend="pango-win32-font-cache-load">pango_win32_font_cache_load</link>         (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache,
52
 
                                                         const <link linkend="LOGFONTA--CAPS">LOGFONTA</link> *logfont);
53
 
<link linkend="HFONT--CAPS">HFONT</link>               <link linkend="pango-win32-font-cache-loadw">pango_win32_font_cache_loadw</link>        (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache,
54
 
                                                         const <link linkend="LOGFONTW--CAPS">LOGFONTW</link> *logfont);
55
 
<link linkend="void">void</link>                <link linkend="pango-win32-font-cache-unload">pango_win32_font_cache_unload</link>       (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache,
56
 
                                                         <link linkend="HFONT--CAPS">HFONT</link> hfont);
57
 
<link linkend="PangoFontMap">PangoFontMap</link> *      <link linkend="pango-win32-font-map-for-display">pango_win32_font_map_for_display</link>    (void);
58
 
<link linkend="void">void</link>                <link linkend="pango-win32-shutdown-display">pango_win32_shutdown_display</link>        (void);
59
 
<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> * <link linkend="pango-win32-font-map-get-font-cache">pango_win32_font_map_get_font_cache</link>
60
 
                                                        (<link linkend="PangoFontMap">PangoFontMap</link> *font_map);
61
 
<link linkend="LOGFONTA--CAPS">LOGFONTA</link> *          <link linkend="pango-win32-font-logfont">pango_win32_font_logfont</link>            (<link linkend="PangoFont">PangoFont</link> *font);
62
 
<link linkend="LOGFONTW--CAPS">LOGFONTW</link> *          <link linkend="pango-win32-font-logfontw">pango_win32_font_logfontw</link>           (<link linkend="PangoFont">PangoFont</link> *font);
63
 
<link linkend="PangoFontDescription">PangoFontDescription</link> * <link linkend="pango-win32-font-description-from-logfont">pango_win32_font_description_from_logfont</link>
64
 
                                                        (const <link linkend="LOGFONTA--CAPS">LOGFONTA</link> *lfp);
65
 
<link linkend="PangoFontDescription">PangoFontDescription</link> * <link linkend="pango-win32-font-description-from-logfontw">pango_win32_font_description_from_logfontw</link>
66
 
                                                        (const <link linkend="LOGFONTW--CAPS">LOGFONTW</link> *lfp);
67
 
</synopsis>
68
 
</refsynopsisdiv>
69
 
 
70
 
 
71
 
 
72
 
 
73
 
 
74
 
 
75
 
 
76
 
 
77
 
 
78
 
<refsect1 id="pango-Win32-Fonts-and-Rendering.description" role="desc">
79
 
<title role="desc.title">Description</title>
80
 
<para>
81
 
The macros and functions in this section are used to access fonts natively on
82
 
Win32 systems and to render text in conjunction with Win32 APIs.
83
 
</para>
84
 
</refsect1>
85
 
 
86
 
<refsect1 id="pango-Win32-Fonts-and-Rendering.details" role="details">
87
 
<title role="details.title">Details</title>
88
 
<refsect2 id="PANGO-RENDER-TYPE-WIN32--CAPS" role="macro">
89
 
<title>PANGO_RENDER_TYPE_WIN32</title>
90
 
<indexterm zone="PANGO-RENDER-TYPE-WIN32--CAPS"><primary sortas="PANGO_RENDER_TYPE_WIN32">PANGO_RENDER_TYPE_WIN32</primary></indexterm><programlisting>#define PANGO_RENDER_TYPE_WIN32 "PangoRenderWin32"
91
 
</programlisting>
92
 
<para>
93
 
A string constant identifying the Win32 renderer. The associated quark (see
94
 
<link linkend="g-quark-from-string"><function>g_quark_from_string()</function></link>) is used to identify the renderer in <link linkend="pango-find-map"><function>pango_find_map()</function></link>.
95
 
</para></refsect2>
96
 
<refsect2 id="pango-win32-get-context" role="function" condition="deprecated">
97
 
<title>pango_win32_get_context ()</title>
98
 
<indexterm zone="pango-win32-get-context" role="deprecated"><primary sortas="pango_win32_get_context">pango_win32_get_context</primary></indexterm><programlisting><link linkend="PangoContext">PangoContext</link> *      pango_win32_get_context             (void);</programlisting>
99
 
<warning><para><literal>pango_win32_get_context</literal> has been deprecated since version 1.22 and should not be used in newly-written code. Use <link linkend="pango-win32-font-map-for-display"><function>pango_win32_font_map_for_display()</function></link> followed by
100
 
<link linkend="pango-font-map-create-context"><function>pango_font_map_create_context()</function></link> instead.</para></warning>
101
 
<para>
102
 
Retrieves a <link linkend="PangoContext"><type>PangoContext</type></link> appropriate for rendering with Windows fonts.</para>
103
 
<para>
104
 
</para><variablelist role="params">
105
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new <link linkend="PangoContext"><type>PangoContext</type></link>
106
 
 
107
 
</simpara></listitem></varlistentry>
108
 
</variablelist></refsect2>
109
 
<refsect2 id="pango-win32-render" role="function">
110
 
<title>pango_win32_render ()</title>
111
 
<indexterm zone="pango-win32-render"><primary sortas="pango_win32_render">pango_win32_render</primary></indexterm><programlisting><link linkend="void">void</link>                pango_win32_render                  (<link linkend="HDC--CAPS">HDC</link> hdc,
112
 
                                                         <link linkend="PangoFont">PangoFont</link> *font,
113
 
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,
114
 
                                                         <link linkend="gint">gint</link> x,
115
 
                                                         <link linkend="gint">gint</link> y);</programlisting>
116
 
<para>
117
 
Render a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> onto a Windows DC</para>
118
 
<para>
119
 
</para><variablelist role="params">
120
 
<varlistentry><term><parameter>hdc</parameter>&#160;:</term>
121
 
<listitem><simpara>     the device context
122
 
</simpara></listitem></varlistentry>
123
 
<varlistentry><term><parameter>font</parameter>&#160;:</term>
124
 
<listitem><simpara>    the font in which to draw the string
125
 
</simpara></listitem></varlistentry>
126
 
<varlistentry><term><parameter>glyphs</parameter>&#160;:</term>
127
 
<listitem><simpara>  the glyph string to draw
128
 
</simpara></listitem></varlistentry>
129
 
<varlistentry><term><parameter>x</parameter>&#160;:</term>
130
 
<listitem><simpara>       the x position of start of string (in pixels)
131
 
</simpara></listitem></varlistentry>
132
 
<varlistentry><term><parameter>y</parameter>&#160;:</term>
133
 
<listitem><simpara>       the y position of baseline (in pixels)
134
 
</simpara></listitem></varlistentry>
135
 
</variablelist></refsect2>
136
 
<refsect2 id="pango-win32-render-transformed" role="function">
137
 
<title>pango_win32_render_transformed ()</title>
138
 
<indexterm zone="pango-win32-render-transformed"><primary sortas="pango_win32_render_transformed">pango_win32_render_transformed</primary></indexterm><programlisting><link linkend="void">void</link>                pango_win32_render_transformed      (<link linkend="HDC--CAPS">HDC</link> hdc,
139
 
                                                         const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,
140
 
                                                         <link linkend="PangoFont">PangoFont</link> *font,
141
 
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,
142
 
                                                         <link linkend="int">int</link> x,
143
 
                                                         <link linkend="int">int</link> y);</programlisting>
144
 
<para>
145
 
Renders a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> onto a windows DC, possibly
146
 
transforming the layed-out coordinates through a transformation
147
 
matrix. Note that the transformation matrix for <parameter>font</parameter> is not
148
 
changed, so to produce correct rendering results, the <parameter>font</parameter>
149
 
must have been loaded using a <link linkend="PangoContext"><type>PangoContext</type></link> with an identical
150
 
transformation matrix to that passed in to this function.</para>
151
 
<para>
152
 
</para><variablelist role="params">
153
 
<varlistentry><term><parameter>hdc</parameter>&#160;:</term>
154
 
<listitem><simpara>     a windows device context
155
 
</simpara></listitem></varlistentry>
156
 
<varlistentry><term><parameter>matrix</parameter>&#160;:</term>
157
 
<listitem><simpara>  a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to use an identity transformation
158
 
</simpara></listitem></varlistentry>
159
 
<varlistentry><term><parameter>font</parameter>&#160;:</term>
160
 
<listitem><simpara>    the font in which to draw the string
161
 
</simpara></listitem></varlistentry>
162
 
<varlistentry><term><parameter>glyphs</parameter>&#160;:</term>
163
 
<listitem><simpara>  the glyph string to draw
164
 
</simpara></listitem></varlistentry>
165
 
<varlistentry><term><parameter>x</parameter>&#160;:</term>
166
 
<listitem><simpara>       the x position of the start of the string (in Pango
167
 
          units in user space coordinates)
168
 
</simpara></listitem></varlistentry>
169
 
<varlistentry><term><parameter>y</parameter>&#160;:</term>
170
 
<listitem><simpara>       the y position of the baseline (in Pango units
171
 
          in user space coordinates)
172
 
</simpara></listitem></varlistentry>
173
 
</variablelist></refsect2>
174
 
<refsect2 id="pango-win32-render-layout-line" role="function">
175
 
<title>pango_win32_render_layout_line ()</title>
176
 
<indexterm zone="pango-win32-render-layout-line"><primary sortas="pango_win32_render_layout_line">pango_win32_render_layout_line</primary></indexterm><programlisting><link linkend="void">void</link>                pango_win32_render_layout_line      (<link linkend="HDC--CAPS">HDC</link> hdc,
177
 
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
178
 
                                                         <link linkend="int">int</link> x,
179
 
                                                         <link linkend="int">int</link> y);</programlisting>
180
 
<para>
181
 
Render a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link> onto a device context. For underlining to
182
 
work property the text alignment of the DC should have TA_BASELINE
183
 
and TA_LEFT.</para>
184
 
<para>
185
 
</para><variablelist role="params">
186
 
<varlistentry><term><parameter>hdc</parameter>&#160;:</term>
187
 
<listitem><simpara>       DC to use for uncolored drawing
188
 
</simpara></listitem></varlistentry>
189
 
<varlistentry><term><parameter>line</parameter>&#160;:</term>
190
 
<listitem><simpara>      a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link>
191
 
</simpara></listitem></varlistentry>
192
 
<varlistentry><term><parameter>x</parameter>&#160;:</term>
193
 
<listitem><simpara>         the x position of start of string (in pixels)
194
 
</simpara></listitem></varlistentry>
195
 
<varlistentry><term><parameter>y</parameter>&#160;:</term>
196
 
<listitem><simpara>         the y position of baseline (in pixels)
197
 
</simpara></listitem></varlistentry>
198
 
</variablelist></refsect2>
199
 
<refsect2 id="pango-win32-render-layout" role="function">
200
 
<title>pango_win32_render_layout ()</title>
201
 
<indexterm zone="pango-win32-render-layout"><primary sortas="pango_win32_render_layout">pango_win32_render_layout</primary></indexterm><programlisting><link linkend="void">void</link>                pango_win32_render_layout           (<link linkend="HDC--CAPS">HDC</link> hdc,
202
 
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout,
203
 
                                                         <link linkend="int">int</link> x,
204
 
                                                         <link linkend="int">int</link> y);</programlisting>
205
 
<para>
206
 
Render a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link> onto an X drawable</para>
207
 
<para>
208
 
</para><variablelist role="params">
209
 
<varlistentry><term><parameter>hdc</parameter>&#160;:</term>
210
 
<listitem><simpara>       HDC to use for uncolored drawing
211
 
</simpara></listitem></varlistentry>
212
 
<varlistentry><term><parameter>layout</parameter>&#160;:</term>
213
 
<listitem><simpara>    a <link linkend="PangoLayout"><type>PangoLayout</type></link>
214
 
</simpara></listitem></varlistentry>
215
 
<varlistentry><term><parameter>x</parameter>&#160;:</term>
216
 
<listitem><simpara>         the X position of the left of the layout (in pixels)
217
 
</simpara></listitem></varlistentry>
218
 
<varlistentry><term><parameter>y</parameter>&#160;:</term>
219
 
<listitem><simpara>         the Y position of the top of the layout (in pixels)
220
 
</simpara></listitem></varlistentry>
221
 
</variablelist></refsect2>
222
 
<refsect2 id="pango-win32-get-unknown-glyph" role="function" condition="deprecated:">
223
 
<title>pango_win32_get_unknown_glyph ()</title>
224
 
<indexterm zone="pango-win32-get-unknown-glyph" role="deprecated"><primary sortas="pango_win32_get_unknown_glyph">pango_win32_get_unknown_glyph</primary></indexterm><programlisting><link linkend="PangoGlyph">PangoGlyph</link>          pango_win32_get_unknown_glyph       (<link linkend="PangoFont">PangoFont</link> *font,
225
 
                                                         <link linkend="gunichar">gunichar</link> wc);</programlisting>
226
 
<warning><para><literal>pango_win32_get_unknown_glyph</literal> is deprecated and should not be used in newly-written code.</para></warning>
227
 
<para>
228
 
Returns the index of a glyph suitable for drawing <parameter>wc</parameter> as an
229
 
unknown character.
230
 
</para>
231
 
<para>
232
 
Use <link linkend="PANGO-GET-UNKNOWN-GLYPH--CAPS"><function>PANGO_GET_UNKNOWN_GLYPH()</function></link> instead.</para>
233
 
<para>
234
 
</para><variablelist role="params">
235
 
<varlistentry><term><parameter>font</parameter>&#160;:</term>
236
 
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link>
237
 
</simpara></listitem></varlistentry>
238
 
<varlistentry><term><parameter>wc</parameter>&#160;:</term>
239
 
<listitem><simpara> the Unicode character for which a glyph is needed.
240
 
</simpara></listitem></varlistentry>
241
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a glyph index into <parameter>font</parameter>
242
 
</simpara></listitem></varlistentry>
243
 
</variablelist></refsect2>
244
 
<refsect2 id="pango-win32-font-get-glyph-index" role="function">
245
 
<title>pango_win32_font_get_glyph_index ()</title>
246
 
<indexterm zone="pango-win32-font-get-glyph-index"><primary sortas="pango_win32_font_get_glyph_index">pango_win32_font_get_glyph_index</primary></indexterm><programlisting><link linkend="gint">gint</link>                pango_win32_font_get_glyph_index    (<link linkend="PangoFont">PangoFont</link> *font,
247
 
                                                         <link linkend="gunichar">gunichar</link> wc);</programlisting>
248
 
<para>
249
 
Obtains the index of the glyph for <parameter>wc</parameter> in <parameter>font</parameter>, or 0, if not
250
 
covered.</para>
251
 
<para>
252
 
</para><variablelist role="params">
253
 
<varlistentry><term><parameter>font</parameter>&#160;:</term>
254
 
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link>.
255
 
</simpara></listitem></varlistentry>
256
 
<varlistentry><term><parameter>wc</parameter>&#160;:</term>
257
 
<listitem><simpara> a Unicode character.
258
 
</simpara></listitem></varlistentry>
259
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the glyph index for <parameter>wc</parameter>.
260
 
</simpara></listitem></varlistentry>
261
 
</variablelist></refsect2>
262
 
<refsect2 id="pango-win32-font-select-font" role="function">
263
 
<title>pango_win32_font_select_font ()</title>
264
 
<indexterm zone="pango-win32-font-select-font"><primary sortas="pango_win32_font_select_font">pango_win32_font_select_font</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_win32_font_select_font        (<link linkend="PangoFont">PangoFont</link> *font,
265
 
                                                         <link linkend="HDC--CAPS">HDC</link> hdc);</programlisting>
266
 
<para>
267
 
Selects the font into the specified DC and changes the mapping mode
268
 
and world transformation of the DC appropriately for the font.
269
 
You may want to surround the use of this function with calls
270
 
to <link linkend="SaveDC"><function>SaveDC()</function></link> and <link linkend="RestoreDC"><function>RestoreDC()</function></link>. Call <link linkend="pango-win32-font-done-font"><function>pango_win32_font_done_font()</function></link> when
271
 
you are done using the DC to release allocated resources.
272
 
</para>
273
 
<para>
274
 
See <link linkend="pango-win32-font-get-metrics-factor"><function>pango_win32_font_get_metrics_factor()</function></link> for information about
275
 
converting from the coordinate space used by this function
276
 
into Pango units.</para>
277
 
<para>
278
 
</para><variablelist role="params">
279
 
<varlistentry><term><parameter>font</parameter>&#160;:</term>
280
 
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link> from the Win32 backend
281
 
</simpara></listitem></varlistentry>
282
 
<varlistentry><term><parameter>hdc</parameter>&#160;:</term>
283
 
<listitem><simpara> a windows device context
284
 
</simpara></listitem></varlistentry>
285
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the operation succeeded.
286
 
</simpara></listitem></varlistentry>
287
 
</variablelist></refsect2>
288
 
<refsect2 id="pango-win32-font-done-font" role="function">
289
 
<title>pango_win32_font_done_font ()</title>
290
 
<indexterm zone="pango-win32-font-done-font"><primary sortas="pango_win32_font_done_font">pango_win32_font_done_font</primary></indexterm><programlisting><link linkend="void">void</link>                pango_win32_font_done_font          (<link linkend="PangoFont">PangoFont</link> *font);</programlisting>
291
 
<para>
292
 
Releases any resources allocated by <link linkend="pango-win32-font-done-font"><function>pango_win32_font_done_font()</function></link></para>
293
 
<para>
294
 
</para><variablelist role="params">
295
 
<varlistentry><term><parameter>font</parameter>&#160;:</term>
296
 
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link> from the win32 backend
297
 
</simpara></listitem></varlistentry>
298
 
</variablelist></refsect2>
299
 
<refsect2 id="pango-win32-font-get-metrics-factor" role="function">
300
 
<title>pango_win32_font_get_metrics_factor ()</title>
301
 
<indexterm zone="pango-win32-font-get-metrics-factor"><primary sortas="pango_win32_font_get_metrics_factor">pango_win32_font_get_metrics_factor</primary></indexterm><programlisting><link linkend="double">double</link>              pango_win32_font_get_metrics_factor (<link linkend="PangoFont">PangoFont</link> *font);</programlisting>
302
 
<para>
303
 
Returns the scale factor from logical units in the coordinate
304
 
space used by <link linkend="pango-win32-font-select-font"><function>pango_win32_font_select_font()</function></link> to Pango units
305
 
in user space.</para>
306
 
<para>
307
 
</para><variablelist role="params">
308
 
<varlistentry><term><parameter>font</parameter>&#160;:</term>
309
 
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link> from the win32 backend
310
 
</simpara></listitem></varlistentry>
311
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> factor to multiply logical units by to get Pango
312
 
              units.
313
 
</simpara></listitem></varlistentry>
314
 
</variablelist></refsect2>
315
 
<refsect2 id="pango-win32-get-debug-flag" role="function" condition="since:1.2">
316
 
<title>pango_win32_get_debug_flag ()</title>
317
 
<indexterm zone="pango-win32-get-debug-flag" role="1.2"><primary sortas="pango_win32_get_debug_flag">pango_win32_get_debug_flag</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_win32_get_debug_flag          (void);</programlisting>
318
 
<para>
319
 
Returns whether debugging is turned on.</para>
320
 
<para>
321
 
</para><variablelist role="params">
322
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if debugging is turned on.
323
 
 
324
 
</simpara></listitem></varlistentry>
325
 
</variablelist><para role="since">Since 1.2</para></refsect2>
326
 
<refsect2 id="pango-win32-get-dc" role="function">
327
 
<title>pango_win32_get_dc ()</title>
328
 
<indexterm zone="pango-win32-get-dc"><primary sortas="pango_win32_get_dc">pango_win32_get_dc</primary></indexterm><programlisting><link linkend="HDC--CAPS">HDC</link>                 pango_win32_get_dc                  (void);</programlisting>
329
 
<para>
330
 
Obtains a handle to the Windows device context that is used by Pango.</para>
331
 
<para>
332
 
</para><variablelist role="params">
333
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A handle to the Windows device context that is used by Pango.
334
 
</simpara></listitem></varlistentry>
335
 
</variablelist></refsect2>
336
 
<refsect2 id="PangoWin32FontCache" role="struct">
337
 
<title>PangoWin32FontCache</title>
338
 
<indexterm zone="PangoWin32FontCache"><primary sortas="PangoWin32FontCache">PangoWin32FontCache</primary></indexterm><programlisting>typedef struct _PangoWin32FontCache PangoWin32FontCache;</programlisting>
339
 
<para>
340
 
A <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link> caches
341
 
HFONTs by their LOGFONT descriptions.
342
 
</para></refsect2>
343
 
<refsect2 id="pango-win32-font-cache-new" role="function">
344
 
<title>pango_win32_font_cache_new ()</title>
345
 
<indexterm zone="pango-win32-font-cache-new"><primary sortas="pango_win32_font_cache_new">pango_win32_font_cache_new</primary></indexterm><programlisting><link linkend="PangoWin32FontCache">PangoWin32FontCache</link> * pango_win32_font_cache_new        (void);</programlisting>
346
 
<para>
347
 
Creates a font cache.</para>
348
 
<para>
349
 
</para><variablelist role="params">
350
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The new font cache. This must be freed with
351
 
<link linkend="pango-win32-font-cache-free"><function>pango_win32_font_cache_free()</function></link>.
352
 
</simpara></listitem></varlistentry>
353
 
</variablelist></refsect2>
354
 
<refsect2 id="pango-win32-font-cache-free" role="function">
355
 
<title>pango_win32_font_cache_free ()</title>
356
 
<indexterm zone="pango-win32-font-cache-free"><primary sortas="pango_win32_font_cache_free">pango_win32_font_cache_free</primary></indexterm><programlisting><link linkend="void">void</link>                pango_win32_font_cache_free         (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache);</programlisting>
357
 
<para>
358
 
Frees a <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link> and all associated memory. All fonts loaded
359
 
through this font cache will be freed along with the cache.</para>
360
 
<para>
361
 
</para><variablelist role="params">
362
 
<varlistentry><term><parameter>cache</parameter>&#160;:</term>
363
 
<listitem><simpara> a <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link>
364
 
</simpara></listitem></varlistentry>
365
 
</variablelist></refsect2>
366
 
<refsect2 id="pango-win32-font-cache-load" role="function">
367
 
<title>pango_win32_font_cache_load ()</title>
368
 
<indexterm zone="pango-win32-font-cache-load"><primary sortas="pango_win32_font_cache_load">pango_win32_font_cache_load</primary></indexterm><programlisting><link linkend="HFONT--CAPS">HFONT</link>               pango_win32_font_cache_load         (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache,
369
 
                                                         const <link linkend="LOGFONTA--CAPS">LOGFONTA</link> *logfont);</programlisting>
370
 
<para>
371
 
Creates a HFONT from a LOGFONTA. The
372
 
result may be newly loaded, or it may have been previously
373
 
stored</para>
374
 
<para>
375
 
</para><variablelist role="params">
376
 
<varlistentry><term><parameter>cache</parameter>&#160;:</term>
377
 
<listitem><simpara> a <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link>
378
 
</simpara></listitem></varlistentry>
379
 
<varlistentry><term><parameter>logfont</parameter>&#160;:</term>
380
 
<listitem><simpara> a pointer to a LOGFONTA structure describing the font to load.
381
 
</simpara></listitem></varlistentry>
382
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The font structure, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the font could
383
 
not be loaded. In order to free this structure, you must call
384
 
<link linkend="pango-win32-font-cache-unload"><function>pango_win32_font_cache_unload()</function></link>.
385
 
</simpara></listitem></varlistentry>
386
 
</variablelist></refsect2>
387
 
<refsect2 id="pango-win32-font-cache-loadw" role="function" condition="since:1.16">
388
 
<title>pango_win32_font_cache_loadw ()</title>
389
 
<indexterm zone="pango-win32-font-cache-loadw" role="1.16"><primary sortas="pango_win32_font_cache_loadw">pango_win32_font_cache_loadw</primary></indexterm><programlisting><link linkend="HFONT--CAPS">HFONT</link>               pango_win32_font_cache_loadw        (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache,
390
 
                                                         const <link linkend="LOGFONTW--CAPS">LOGFONTW</link> *logfont);</programlisting>
391
 
<para>
392
 
Creates a HFONT from a LOGFONTW. The
393
 
result may be newly loaded, or it may have been previously
394
 
stored</para>
395
 
<para>
396
 
</para><variablelist role="params">
397
 
<varlistentry><term><parameter>cache</parameter>&#160;:</term>
398
 
<listitem><simpara> a <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link>
399
 
</simpara></listitem></varlistentry>
400
 
<varlistentry><term><parameter>logfont</parameter>&#160;:</term>
401
 
<listitem><simpara> a pointer to a LOGFONTW structure describing the font to load.
402
 
</simpara></listitem></varlistentry>
403
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The font structure, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the font could
404
 
not be loaded. In order to free this structure, you must call
405
 
<link linkend="pango-win32-font-cache-unload"><function>pango_win32_font_cache_unload()</function></link>.
406
 
 
407
 
</simpara></listitem></varlistentry>
408
 
</variablelist><para role="since">Since 1.16</para></refsect2>
409
 
<refsect2 id="pango-win32-font-cache-unload" role="function">
410
 
<title>pango_win32_font_cache_unload ()</title>
411
 
<indexterm zone="pango-win32-font-cache-unload"><primary sortas="pango_win32_font_cache_unload">pango_win32_font_cache_unload</primary></indexterm><programlisting><link linkend="void">void</link>                pango_win32_font_cache_unload       (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache,
412
 
                                                         <link linkend="HFONT--CAPS">HFONT</link> hfont);</programlisting>
413
 
<para>
414
 
Frees a font structure previously loaded with <link linkend="pango-win32-font-cache-load"><function>pango_win32_font_cache_load()</function></link>.</para>
415
 
<para>
416
 
</para><variablelist role="params">
417
 
<varlistentry><term><parameter>cache</parameter>&#160;:</term>
418
 
<listitem><simpara> a <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link>
419
 
</simpara></listitem></varlistentry>
420
 
<varlistentry><term><parameter>hfont</parameter>&#160;:</term>
421
 
<listitem><simpara> the HFONT to unload
422
 
</simpara></listitem></varlistentry>
423
 
</variablelist></refsect2>
424
 
<refsect2 id="pango-win32-font-map-for-display" role="function">
425
 
<title>pango_win32_font_map_for_display ()</title>
426
 
<indexterm zone="pango-win32-font-map-for-display"><primary sortas="pango_win32_font_map_for_display">pango_win32_font_map_for_display</primary></indexterm><programlisting><link linkend="PangoFontMap">PangoFontMap</link> *      pango_win32_font_map_for_display    (void);</programlisting>
427
 
<para>
428
 
Returns a <link linkend="PangoWin32FontMap"><type>PangoWin32FontMap</type></link>. Font maps are cached and should
429
 
not be freed. If the font map is no longer needed, it can
430
 
be released with <link linkend="pango-win32-shutdown-display"><function>pango_win32_shutdown_display()</function></link>.</para>
431
 
<para>
432
 
</para><variablelist role="params">
433
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="PangoFontMap"><type>PangoFontMap</type></link>.
434
 
</simpara></listitem></varlistentry>
435
 
</variablelist></refsect2>
436
 
<refsect2 id="pango-win32-shutdown-display" role="function">
437
 
<title>pango_win32_shutdown_display ()</title>
438
 
<indexterm zone="pango-win32-shutdown-display"><primary sortas="pango_win32_shutdown_display">pango_win32_shutdown_display</primary></indexterm><programlisting><link linkend="void">void</link>                pango_win32_shutdown_display        (void);</programlisting>
439
 
<para>
440
 
Free cached resources.</para>
441
 
<para>
442
 
</para></refsect2>
443
 
<refsect2 id="pango-win32-font-map-get-font-cache" role="function">
444
 
<title>pango_win32_font_map_get_font_cache ()</title>
445
 
<indexterm zone="pango-win32-font-map-get-font-cache"><primary sortas="pango_win32_font_map_get_font_cache">pango_win32_font_map_get_font_cache</primary></indexterm><programlisting><link linkend="PangoWin32FontCache">PangoWin32FontCache</link> * pango_win32_font_map_get_font_cache
446
 
                                                        (<link linkend="PangoFontMap">PangoFontMap</link> *font_map);</programlisting>
447
 
<para>
448
 
Obtains the font cache associated with the given font map.</para>
449
 
<para>
450
 
</para><variablelist role="params">
451
 
<varlistentry><term><parameter>font_map</parameter>&#160;:</term>
452
 
<listitem><simpara> a <link linkend="PangoWin32FontMap"><type>PangoWin32FontMap</type></link>.
453
 
</simpara></listitem></varlistentry>
454
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link> of <parameter>font_map</parameter>.
455
 
</simpara></listitem></varlistentry>
456
 
</variablelist></refsect2>
457
 
<refsect2 id="pango-win32-font-logfont" role="function">
458
 
<title>pango_win32_font_logfont ()</title>
459
 
<indexterm zone="pango-win32-font-logfont"><primary sortas="pango_win32_font_logfont">pango_win32_font_logfont</primary></indexterm><programlisting><link linkend="LOGFONTA--CAPS">LOGFONTA</link> *          pango_win32_font_logfont            (<link linkend="PangoFont">PangoFont</link> *font);</programlisting>
460
 
<para>
461
 
Determine the LOGFONTA struct for the specified font. Note that
462
 
Pango internally uses LOGFONTW structs, so if converting the UTF-16
463
 
face name in the LOGFONTW struct to system codepage fails, the
464
 
returned LOGFONTA will have an emppty face name. To get the
465
 
LOGFONTW of a PangoFont, use <link linkend="pango-win32-font-logfontw"><function>pango_win32_font_logfontw()</function></link>. It
466
 
is recommended to do that always even if you don't expect
467
 
to come across fonts with odd names.</para>
468
 
<para>
469
 
</para><variablelist role="params">
470
 
<varlistentry><term><parameter>font</parameter>&#160;:</term>
471
 
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link> which must be from the Win32 backend
472
 
</simpara></listitem></varlistentry>
473
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A newly allocated LOGFONTA struct. It must be
474
 
freed with <link linkend="g-free"><function>g_free()</function></link>.
475
 
</simpara></listitem></varlistentry>
476
 
</variablelist></refsect2>
477
 
<refsect2 id="pango-win32-font-logfontw" role="function" condition="since:1.16">
478
 
<title>pango_win32_font_logfontw ()</title>
479
 
<indexterm zone="pango-win32-font-logfontw" role="1.16"><primary sortas="pango_win32_font_logfontw">pango_win32_font_logfontw</primary></indexterm><programlisting><link linkend="LOGFONTW--CAPS">LOGFONTW</link> *          pango_win32_font_logfontw           (<link linkend="PangoFont">PangoFont</link> *font);</programlisting>
480
 
<para>
481
 
Determine the LOGFONTW struct for the specified font.</para>
482
 
<para>
483
 
</para><variablelist role="params">
484
 
<varlistentry><term><parameter>font</parameter>&#160;:</term>
485
 
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link> which must be from the Win32 backend
486
 
</simpara></listitem></varlistentry>
487
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A newly allocated LOGFONTW struct. It must be
488
 
freed with <link linkend="g-free"><function>g_free()</function></link>.
489
 
 
490
 
</simpara></listitem></varlistentry>
491
 
</variablelist><para role="since">Since 1.16</para></refsect2>
492
 
<refsect2 id="pango-win32-font-description-from-logfont" role="function" condition="since:1.12">
493
 
<title>pango_win32_font_description_from_logfont ()</title>
494
 
<indexterm zone="pango-win32-font-description-from-logfont" role="1.12"><primary sortas="pango_win32_font_description_from_logfont">pango_win32_font_description_from_logfont</primary></indexterm><programlisting><link linkend="PangoFontDescription">PangoFontDescription</link> * pango_win32_font_description_from_logfont
495
 
                                                        (const <link linkend="LOGFONTA--CAPS">LOGFONTA</link> *lfp);</programlisting>
496
 
<para>
497
 
Creates a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> that matches the specified LOGFONTA.
498
 
</para>
499
 
<para>
500
 
The face name, italicness and weight fields in the LOGFONTA are used
501
 
to set up the resulting <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>. If the face name in
502
 
the LOGFONTA contains non-ASCII characters the font is temporarily
503
 
loaded (using <link linkend="CreateFontIndirect"><function>CreateFontIndirect()</function></link>) and an ASCII (usually English)
504
 
name for it is looked up from the font name tables in the font
505
 
data. If that doesn't work, the face name is converted from the
506
 
system codepage to UTF-8 and that is used.</para>
507
 
<para>
508
 
</para><variablelist role="params">
509
 
<varlistentry><term><parameter>lfp</parameter>&#160;:</term>
510
 
<listitem><simpara> a LOGFONTA
511
 
</simpara></listitem></varlistentry>
512
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the newly allocated <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>, which
513
 
 should be freed using <link linkend="pango-font-description-free"><function>pango_font_description_free()</function></link>
514
 
 
515
 
</simpara></listitem></varlistentry>
516
 
</variablelist><para role="since">Since 1.12</para></refsect2>
517
 
<refsect2 id="pango-win32-font-description-from-logfontw" role="function" condition="since:1.16">
518
 
<title>pango_win32_font_description_from_logfontw ()</title>
519
 
<indexterm zone="pango-win32-font-description-from-logfontw" role="1.16"><primary sortas="pango_win32_font_description_from_logfontw">pango_win32_font_description_from_logfontw</primary></indexterm><programlisting><link linkend="PangoFontDescription">PangoFontDescription</link> * pango_win32_font_description_from_logfontw
520
 
                                                        (const <link linkend="LOGFONTW--CAPS">LOGFONTW</link> *lfp);</programlisting>
521
 
<para>
522
 
Creates a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> that matches the specified LOGFONTW.
523
 
</para>
524
 
<para>
525
 
The face name, italicness and weight fields in the LOGFONTW are used
526
 
to set up the resulting <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>. If the face name in
527
 
the LOGFONTW contains non-ASCII characters the font is temporarily
528
 
loaded (using <link linkend="CreateFontIndirect"><function>CreateFontIndirect()</function></link>) and an ASCII (usually English)
529
 
name for it is looked up from the font name tables in the font
530
 
data. If that doesn't work, the face name is converted from UTF-16
531
 
to UTF-8 and that is used.</para>
532
 
<para>
533
 
</para><variablelist role="params">
534
 
<varlistentry><term><parameter>lfp</parameter>&#160;:</term>
535
 
<listitem><simpara> a LOGFONTW
536
 
</simpara></listitem></varlistentry>
537
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the newly allocated <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>, which
538
 
 should be freed using <link linkend="pango-font-description-free"><function>pango_font_description_free()</function></link>
539
 
 
540
 
</simpara></listitem></varlistentry>
541
 
</variablelist><para role="since">Since 1.16</para></refsect2>
542
 
 
543
 
</refsect1>
544
 
 
545
 
 
546
 
 
547
 
 
548
 
</refentry>