1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>FreeType Fonts and Rendering</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7 <link rel="home" href="index.html" title="Pango Reference Manual">
8 <link rel="up" href="rendering.html" title="Rendering with Pango">
9 <link rel="prev" href="pango-Win32-Fonts-and-Rendering.html" title="Win32 Fonts and Rendering">
10 <link rel="next" href="pango-Xft-Fonts-and-Rendering.html" title="Xft Fonts and Rendering">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
14 <link rel="chapter" href="rendering.html" title="Rendering with Pango">
15 <link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
16 <link rel="chapter" href="tools.html" title="Pango Tools">
17 <link rel="chapter" href="pango-hierarchy.html" title="Object Hierarchy">
18 <link rel="index" href="index-all.html" title="Index">
19 <link rel="index" href="index-deprecated.html" title="Index of deprecated symbols">
20 <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
21 <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
22 <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
23 <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
24 <link rel="index" href="index-1.10.html" title="Index of new symbols in 1.10">
25 <link rel="index" href="index-1.12.html" title="Index of new symbols in 1.12">
26 <link rel="index" href="index-1.14.html" title="Index of new symbols in 1.14">
27 <link rel="index" href="index-1.16.html" title="Index of new symbols in 1.16">
28 <link rel="index" href="index-1.18.html" title="Index of new symbols in 1.18">
29 <link rel="index" href="index-1.20.html" title="Index of new symbols in 1.20">
30 <link rel="index" href="index-1.22.html" title="Index of new symbols in 1.22">
31 <link rel="index" href="index-1.24.html" title="Index of new symbols in 1.24">
32 <link rel="index" href="index-1.26.html" title="Index of new symbols in 1.26">
34 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
35 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
37 <td><a accesskey="p" href="pango-Win32-Fonts-and-Rendering.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
38 <td><a accesskey="u" href="rendering.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
39 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
40 <th width="100%" align="center">Pango Reference Manual</th>
41 <td><a accesskey="n" href="pango-Xft-Fonts-and-Rendering.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#pango-FreeType-Fonts-and-Rendering.synopsis" class="shortcut">Top</a>
46 <a href="#pango-FreeType-Fonts-and-Rendering.description" class="shortcut">Description</a>
48 <a href="#pango-FreeType-Fonts-and-Rendering.object-hierarchy" class="shortcut">Object Hierarchy</a>
51 <div class="refentry" lang="en">
52 <a name="pango-FreeType-Fonts-and-Rendering"></a><div class="titlepage"></div>
53 <div class="refnamediv"><table width="100%"><tr>
55 <h2><span class="refentrytitle"><a name="pango-FreeType-Fonts-and-Rendering.top_of_page"></a>FreeType Fonts and Rendering</span></h2>
56 <p>FreeType Fonts and Rendering — Functions for shape engines to manipulate FreeType fonts</p>
58 <td valign="top" align="right"></td>
60 <div class="refsynopsisdiv">
61 <a name="pango-FreeType-Fonts-and-Rendering.synopsis"></a><h2>Synopsis</h2>
62 <a name="PangoFT2FontMap"></a><pre class="synopsis">
63 <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap-struct" title="PangoFT2FontMap">PangoFT2FontMap</a>;
64 #define <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PANGO-RENDER-TYPE-FT2--CAPS" title="PANGO_RENDER_TYPE_FT2">PANGO_RENDER_TYPE_FT2</a>
65 <a class="link" href="pango-Fonts.html#PangoFontMap">PangoFontMap</a> * <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-new" title="pango_ft2_font_map_new ()">pango_ft2_font_map_new</a> (void);
66 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-set-resolution" title="pango_ft2_font_map_set_resolution ()">pango_ft2_font_map_set_resolution</a> (<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a> *fontmap,
69 <a class="link" href="pango-Text-Processing.html#PangoContext">PangoContext</a> * <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-create-context" title="pango_ft2_font_map_create_context ()">pango_ft2_font_map_create_context</a> (<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a> *fontmap);
70 void (<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2SubstituteFunc" title="PangoFT2SubstituteFunc ()">*PangoFT2SubstituteFunc</a>) (FcPattern *pattern,
72 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
74 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-set-default-substitute" title="pango_ft2_font_map_set_default_substitute ()">pango_ft2_font_map_set_default_substitute</a>
75 (<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a> *fontmap,
76 <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2SubstituteFunc" title="PangoFT2SubstituteFunc ()">PangoFT2SubstituteFunc</a> func,
78 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
81 href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
82 >GDestroyNotify</a> notify);
83 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-substitute-changed" title="pango_ft2_font_map_substitute_changed ()">pango_ft2_font_map_substitute_changed</a>
84 (<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a> *fontmap);
85 <a class="link" href="pango-Text-Processing.html#PangoContext">PangoContext</a> * <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-get-context" title="pango_ft2_get_context ()">pango_ft2_get_context</a> (double dpi_x,
87 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-render" title="pango_ft2_render ()">pango_ft2_render</a> (FT_Bitmap *bitmap,
88 <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
89 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
91 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
94 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
96 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-render-transformed" title="pango_ft2_render_transformed ()">pango_ft2_render_transformed</a> (FT_Bitmap *bitmap,
97 const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
98 <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
99 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
102 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-render-layout-line" title="pango_ft2_render_layout_line ()">pango_ft2_render_layout_line</a> (FT_Bitmap *bitmap,
103 <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine">PangoLayoutLine</a> *line,
106 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-render-layout-line-subpixel" title="pango_ft2_render_layout_line_subpixel ()">pango_ft2_render_layout_line_subpixel</a>
108 <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine">PangoLayoutLine</a> *line,
111 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-render-layout" title="pango_ft2_render_layout ()">pango_ft2_render_layout</a> (FT_Bitmap *bitmap,
112 <a class="link" href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> *layout,
115 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-render-layout-subpixel" title="pango_ft2_render_layout_subpixel ()">pango_ft2_render_layout_subpixel</a> (FT_Bitmap *bitmap,
116 <a class="link" href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> *layout,
119 <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a> <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-get-unknown-glyph" title="pango_ft2_get_unknown_glyph ()">pango_ft2_get_unknown_glyph</a> (<a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font);
120 int <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-get-kerning" title="pango_ft2_font_get_kerning ()">pango_ft2_font_get_kerning</a> (<a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
121 <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a> left,
122 <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a> right);
123 FT_Face <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-get-face" title="pango_ft2_font_get_face ()">pango_ft2_font_get_face</a> (<a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font);
124 <a class="link" href="pango-Coverage-Maps.html#PangoCoverage" title="PangoCoverage">PangoCoverage</a> * <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-get-coverage" title="pango_ft2_font_get_coverage ()">pango_ft2_font_get_coverage</a> (<a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
125 <a class="link" href="pango-Scripts-and-Languages.html#PangoLanguage" title="PangoLanguage">PangoLanguage</a> *language);
126 <a class="link" href="pango-Fonts.html#PangoFontMap">PangoFontMap</a> * <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-for-display" title="pango_ft2_font_map_for_display ()">pango_ft2_font_map_for_display</a> (void);
127 void <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-shutdown-display" title="pango_ft2_shutdown_display ()">pango_ft2_shutdown_display</a> (void);
130 <div class="refsect1" lang="en">
131 <a name="pango-FreeType-Fonts-and-Rendering.object-hierarchy"></a><h2>Object Hierarchy</h2>
132 <pre class="synopsis">
134 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
136 +----<a class="link" href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>
137 +----<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a>
141 <div class="refsect1" lang="en">
142 <a name="pango-FreeType-Fonts-and-Rendering.description"></a><h2>Description</h2>
144 The macros and functions in this section are used to access fonts and render
145 text to bitmaps using the FreeType 2 library.
148 <div class="refsect1" lang="en">
149 <a name="pango-FreeType-Fonts-and-Rendering.details"></a><h2>Details</h2>
150 <div class="refsect2" lang="en">
151 <a name="PangoFT2FontMap-struct"></a><h3>PangoFT2FontMap</h3>
152 <pre class="programlisting">typedef struct _PangoFT2FontMap PangoFT2FontMap;</pre>
154 The <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap"><span class="type">PangoFT2FontMap</span></a> is the <a class="link" href="pango-Fonts.html#PangoFontMap"><span class="type">PangoFontMap</span></a> implementation for FreeType fonts.
158 <div class="refsect2" lang="en">
159 <a name="PANGO-RENDER-TYPE-FT2--CAPS"></a><h3>PANGO_RENDER_TYPE_FT2</h3>
160 <pre class="programlisting">#define PANGO_RENDER_TYPE_FT2 "PangoRenderFT2"
162 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
163 <h3 class="title">Warning</h3>
164 <p><code class="literal">PANGO_RENDER_TYPE_FT2</code> is deprecated and should not be used in newly-written code.</p>
167 A string constant that was used to identify shape engines that work
168 with the FreeType backend. See <a class="link" href="PangoFcFont.html#PANGO-RENDER-TYPE-FC--CAPS" title="PANGO_RENDER_TYPE_FC"><code class="literal">PANGO_RENDER_TYPE_FC</code></a> for the replacement.
172 <div class="refsect2" lang="en">
173 <a name="pango-ft2-font-map-new"></a><h3>pango_ft2_font_map_new ()</h3>
174 <pre class="programlisting"><a class="link" href="pango-Fonts.html#PangoFontMap">PangoFontMap</a> * pango_ft2_font_map_new (void);</pre>
176 Create a new <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap"><span class="type">PangoFT2FontMap</span></a> object; a fontmap is used
177 to cache information about available fonts, and holds
178 certain global parameters such as the resolution and
179 the default substitute function (see
180 <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-set-default-substitute" title="pango_ft2_font_map_set_default_substitute ()"><code class="function">pango_ft2_font_map_set_default_substitute()</code></a>).</p>
183 <div class="variablelist"><table border="0">
184 <col align="left" valign="top">
186 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
187 <td> the newly created fontmap object. Unref
189 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"
190 ><code class="function">g_object_unref()</code></a> when you are finished with it.
195 <p class="since">Since 1.2</p>
198 <div class="refsect2" lang="en">
199 <a name="pango-ft2-font-map-set-resolution"></a><h3>pango_ft2_font_map_set_resolution ()</h3>
200 <pre class="programlisting">void pango_ft2_font_map_set_resolution (<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a> *fontmap,
204 Sets the horizontal and vertical resolutions for the fontmap.</p>
207 <div class="variablelist"><table border="0">
208 <col align="left" valign="top">
211 <td><p><span class="term"><em class="parameter"><code>fontmap</code></em> :</span></p></td>
212 <td> a <span class="type">PangoFT2Fontmap</span>
216 <td><p><span class="term"><em class="parameter"><code>dpi_x</code></em> :</span></p></td>
217 <td> dots per inch in the X direction
221 <td><p><span class="term"><em class="parameter"><code>dpi_y</code></em> :</span></p></td>
222 <td> dots per inch in the Y direction
227 <p class="since">Since 1.2</p>
230 <div class="refsect2" lang="en">
231 <a name="pango-ft2-font-map-create-context"></a><h3>pango_ft2_font_map_create_context ()</h3>
232 <pre class="programlisting"><a class="link" href="pango-Text-Processing.html#PangoContext">PangoContext</a> * pango_ft2_font_map_create_context (<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a> *fontmap);</pre>
233 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
234 <h3 class="title">Warning</h3>
235 <p><code class="literal">pango_ft2_font_map_create_context</code> has been deprecated since version 1.22 and should not be used in newly-written code. Use <a class="link" href="pango-Fonts.html#pango-font-map-create-context" title="pango_font_map_create_context ()"><code class="function">pango_font_map_create_context()</code></a> instead.</p>
238 Create a <a class="link" href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> for the given fontmap.</p>
241 <div class="variablelist"><table border="0">
242 <col align="left" valign="top">
245 <td><p><span class="term"><em class="parameter"><code>fontmap</code></em> :</span></p></td>
246 <td> a <span class="type">PangoFT2Fontmap</span>
250 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
251 <td> the newly created context; free with <a
252 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"
253 ><code class="function">g_object_unref()</code></a>.
259 <p class="since">Since 1.2</p>
262 <div class="refsect2" lang="en">
263 <a name="PangoFT2SubstituteFunc"></a><h3>PangoFT2SubstituteFunc ()</h3>
264 <pre class="programlisting">void (*PangoFT2SubstituteFunc) (FcPattern *pattern,
266 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
267 >gpointer</a> data);</pre>
269 Function type for doing final config tweaking on prepared FcPatterns.
271 <div class="variablelist"><table border="0">
272 <col align="left" valign="top">
275 <td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
276 <td>the <span class="type">FcPattern</span> to tweak.
280 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
288 <div class="refsect2" lang="en">
289 <a name="pango-ft2-font-map-set-default-substitute"></a><h3>pango_ft2_font_map_set_default_substitute ()</h3>
290 <pre class="programlisting">void pango_ft2_font_map_set_default_substitute
291 (<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a> *fontmap,
292 <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2SubstituteFunc" title="PangoFT2SubstituteFunc ()">PangoFT2SubstituteFunc</a> func,
294 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
297 href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
298 >GDestroyNotify</a> notify);</pre>
300 Sets a function that will be called to do final configuration
301 substitution on a <span class="type">FcPattern</span> before it is used to load
302 the font. This function can be used to do things like set
303 hinting and antialiasing options.</p>
306 <div class="variablelist"><table border="0">
307 <col align="left" valign="top">
310 <td><p><span class="term"><em class="parameter"><code>fontmap</code></em> :</span></p></td>
311 <td> a <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap"><span class="type">PangoFT2FontMap</span></a>
315 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
316 <td> function to call to to do final config tweaking
317 on <span class="type">FcPattern</span> objects.
321 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
322 <td> data to pass to <em class="parameter"><code>func</code></em>
326 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
327 <td> function to call when <em class="parameter"><code>data</code></em> is no longer used.
332 <p class="since">Since 1.2</p>
335 <div class="refsect2" lang="en">
336 <a name="pango-ft2-font-map-substitute-changed"></a><h3>pango_ft2_font_map_substitute_changed ()</h3>
337 <pre class="programlisting">void pango_ft2_font_map_substitute_changed
338 (<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a> *fontmap);</pre>
340 Call this function any time the results of the
341 default substitution function set with
342 <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-set-default-substitute" title="pango_ft2_font_map_set_default_substitute ()"><code class="function">pango_ft2_font_map_set_default_substitute()</code></a> change.
343 That is, if your substitution function will return different
344 results for the same input pattern, you must call this function.</p>
347 <div class="variablelist"><table border="0">
348 <col align="left" valign="top">
350 <td><p><span class="term"><em class="parameter"><code>fontmap</code></em> :</span></p></td>
351 <td> a <span class="type">PangoFT2Fontmap</span>
355 <p class="since">Since 1.2</p>
358 <div class="refsect2" lang="en">
359 <a name="pango-ft2-get-context"></a><h3>pango_ft2_get_context ()</h3>
360 <pre class="programlisting"><a class="link" href="pango-Text-Processing.html#PangoContext">PangoContext</a> * pango_ft2_get_context (double dpi_x,
362 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
363 <h3 class="title">Warning</h3>
364 <p><code class="literal">pango_ft2_get_context</code> has been deprecated since version 1.22 and should not be used in newly-written code. Use <a class="link" href="pango-Fonts.html#pango-font-map-create-context" title="pango_font_map_create_context ()"><code class="function">pango_font_map_create_context()</code></a> instead.</p>
367 Retrieves a <a class="link" href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> for the default PangoFT2 fontmap
368 (see <code class="function">pango_ft2_fontmap_get_for_display()</code>) and sets the resolution
369 for the default fontmap to <em class="parameter"><code>dpi_x</code></em> by <em class="parameter"><code>dpi_y</code></em>.</p>
372 <div class="variablelist"><table border="0">
373 <col align="left" valign="top">
376 <td><p><span class="term"><em class="parameter"><code>dpi_x</code></em> :</span></p></td>
377 <td> the horizontal DPI of the target device
381 <td><p><span class="term"><em class="parameter"><code>dpi_y</code></em> :</span></p></td>
382 <td> the vertical DPI of the target device
386 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
387 <td> the new <a class="link" href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
395 <div class="refsect2" lang="en">
396 <a name="pango-ft2-render"></a><h3>pango_ft2_render ()</h3>
397 <pre class="programlisting">void pango_ft2_render (FT_Bitmap *bitmap,
398 <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
399 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
401 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
404 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
407 Renders a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a> onto a FreeType2 bitmap.</p>
410 <div class="variablelist"><table border="0">
411 <col align="left" valign="top">
414 <td><p><span class="term"><em class="parameter"><code>bitmap</code></em> :</span></p></td>
415 <td> the FreeType2 bitmap onto which to draw the string
419 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
420 <td> the font in which to draw the string
424 <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
425 <td> the glyph string to draw
429 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
430 <td> the x position of the start of the string (in pixels)
434 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
435 <td> the y position of the baseline (in pixels)
442 <div class="refsect2" lang="en">
443 <a name="pango-ft2-render-transformed"></a><h3>pango_ft2_render_transformed ()</h3>
444 <pre class="programlisting">void pango_ft2_render_transformed (FT_Bitmap *bitmap,
445 const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
446 <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
447 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
451 Renders a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a> onto a FreeType2 bitmap, possibly
452 transforming the layed-out coordinates through a transformation
453 matrix. Note that the transformation matrix for <em class="parameter"><code>font</code></em> is not
454 changed, so to produce correct rendering results, the <em class="parameter"><code>font</code></em>
455 must have been loaded using a <a class="link" href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> with an identical
456 transformation matrix to that passed in to this function.</p>
459 <div class="variablelist"><table border="0">
460 <col align="left" valign="top">
463 <td><p><span class="term"><em class="parameter"><code>bitmap</code></em> :</span></p></td>
464 <td> the FreeType2 bitmap onto which to draw the string
468 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
469 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, or <a
470 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
471 ><code class="literal">NULL</code></a> to use an identity transformation
475 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
476 <td> the font in which to draw the string
480 <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
481 <td> the glyph string to draw
485 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
486 <td> the x position of the start of the string (in Pango
487 units in user space coordinates)
491 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
492 <td> the y position of the baseline (in Pango units
493 in user space coordinates)
498 <p class="since">Since 1.6</p>
501 <div class="refsect2" lang="en">
502 <a name="pango-ft2-render-layout-line"></a><h3>pango_ft2_render_layout_line ()</h3>
503 <pre class="programlisting">void pango_ft2_render_layout_line (FT_Bitmap *bitmap,
504 <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine">PangoLayoutLine</a> *line,
508 Render a <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine"><span class="type">PangoLayoutLine</span></a> onto a FreeType2 bitmap</p>
511 <div class="variablelist"><table border="0">
512 <col align="left" valign="top">
515 <td><p><span class="term"><em class="parameter"><code>bitmap</code></em> :</span></p></td>
516 <td> a <span class="type">FT_Bitmap</span> to render the line onto
520 <td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
521 <td> a <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine"><span class="type">PangoLayoutLine</span></a>
525 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
526 <td> the x position of start of string (in pixels)
530 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
531 <td> the y position of baseline (in pixels)
538 <div class="refsect2" lang="en">
539 <a name="pango-ft2-render-layout-line-subpixel"></a><h3>pango_ft2_render_layout_line_subpixel ()</h3>
540 <pre class="programlisting">void pango_ft2_render_layout_line_subpixel
542 <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine">PangoLayoutLine</a> *line,
546 Render a <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine"><span class="type">PangoLayoutLine</span></a> onto a FreeType2 bitmap, with he
547 location specified in fixed-point Pango units rather than
548 pixels. (Using this will avoid extra inaccuracies from
549 rounding to integer pixels multiple times, even if the
550 final glyph positions are integers.)</p>
553 <div class="variablelist"><table border="0">
554 <col align="left" valign="top">
557 <td><p><span class="term"><em class="parameter"><code>bitmap</code></em> :</span></p></td>
558 <td> a <span class="type">FT_Bitmap</span> to render the line onto
562 <td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
563 <td> a <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine"><span class="type">PangoLayoutLine</span></a>
567 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
568 <td> the x position of start of string (in Pango units)
572 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
573 <td> the y position of baseline (in Pango units)
578 <p class="since">Since 1.6</p>
581 <div class="refsect2" lang="en">
582 <a name="pango-ft2-render-layout"></a><h3>pango_ft2_render_layout ()</h3>
583 <pre class="programlisting">void pango_ft2_render_layout (FT_Bitmap *bitmap,
584 <a class="link" href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> *layout,
588 Render a <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> onto a FreeType2 bitmap</p>
591 <div class="variablelist"><table border="0">
592 <col align="left" valign="top">
595 <td><p><span class="term"><em class="parameter"><code>bitmap</code></em> :</span></p></td>
596 <td> a <span class="type">FT_Bitmap</span> to render the layout onto
600 <td><p><span class="term"><em class="parameter"><code>layout</code></em> :</span></p></td>
601 <td> a <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a>
605 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
606 <td> the X position of the left of the layout (in pixels)
610 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
611 <td> the Y position of the top of the layout (in pixels)
618 <div class="refsect2" lang="en">
619 <a name="pango-ft2-render-layout-subpixel"></a><h3>pango_ft2_render_layout_subpixel ()</h3>
620 <pre class="programlisting">void pango_ft2_render_layout_subpixel (FT_Bitmap *bitmap,
621 <a class="link" href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> *layout,
625 Render a <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> onto a FreeType2 bitmap, with he
626 location specified in fixed-point Pango units rather than
627 pixels. (Using this will avoid extra inaccuracies from
628 rounding to integer pixels multiple times, even if the
629 final glyph positions are integers.)</p>
632 <div class="variablelist"><table border="0">
633 <col align="left" valign="top">
636 <td><p><span class="term"><em class="parameter"><code>bitmap</code></em> :</span></p></td>
637 <td> a <span class="type">FT_Bitmap</span> to render the layout onto
641 <td><p><span class="term"><em class="parameter"><code>layout</code></em> :</span></p></td>
642 <td> a <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a>
646 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
647 <td> the X position of the left of the layout (in Pango units)
651 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
652 <td> the Y position of the top of the layout (in Pango units)
657 <p class="since">Since 1.6</p>
660 <div class="refsect2" lang="en">
661 <a name="pango-ft2-get-unknown-glyph"></a><h3>pango_ft2_get_unknown_glyph ()</h3>
662 <pre class="programlisting"><a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a> pango_ft2_get_unknown_glyph (<a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font);</pre>
663 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
664 <h3 class="title">Warning</h3>
665 <p><code class="literal">pango_ft2_get_unknown_glyph</code> is deprecated and should not be used in newly-written code.</p>
668 Return the index of a glyph suitable for drawing unknown characters with
669 <em class="parameter"><code>font</code></em>, or <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-EMPTY--CAPS" title="PANGO_GLYPH_EMPTY"><code class="literal">PANGO_GLYPH_EMPTY</code></a> if no suitable glyph found.
672 If you want to draw an unknown-box for a character that is not covered
674 use <a class="link" href="pango-Glyph-Storage.html#PANGO-GET-UNKNOWN-GLYPH--CAPS" title="PANGO_GET_UNKNOWN_GLYPH()"><code class="function">PANGO_GET_UNKNOWN_GLYPH()</code></a> instead.</p>
677 <div class="variablelist"><table border="0">
678 <col align="left" valign="top">
681 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
682 <td> a <a class="link" href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>
686 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
687 <td> a glyph index into <em class="parameter"><code>font</code></em>, or <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-EMPTY--CAPS" title="PANGO_GLYPH_EMPTY"><code class="literal">PANGO_GLYPH_EMPTY</code></a>
694 <div class="refsect2" lang="en">
695 <a name="pango-ft2-font-get-kerning"></a><h3>pango_ft2_font_get_kerning ()</h3>
696 <pre class="programlisting">int pango_ft2_font_get_kerning (<a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
697 <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a> left,
698 <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a> right);</pre>
699 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
700 <h3 class="title">Warning</h3>
701 <p><code class="literal">pango_ft2_font_get_kerning</code> is deprecated and should not be used in newly-written code.</p>
704 Retrieves kerning information for a combination of two glyphs.
707 Use <a class="link" href="PangoFcFont.html#pango-fc-font-kern-glyphs" title="pango_fc_font_kern_glyphs ()"><code class="function">pango_fc_font_kern_glyphs()</code></a> instead.</p>
710 <div class="variablelist"><table border="0">
711 <col align="left" valign="top">
714 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
715 <td> a <a class="link" href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>
719 <td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
720 <td> the left <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph"><span class="type">PangoGlyph</span></a>
724 <td><p><span class="term"><em class="parameter"><code>right</code></em> :</span></p></td>
725 <td> the right <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph"><span class="type">PangoGlyph</span></a>
729 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
730 <td> The amount of kerning (in Pango units) to apply for
731 the given combination of glyphs.
738 <div class="refsect2" lang="en">
739 <a name="pango-ft2-font-get-face"></a><h3>pango_ft2_font_get_face ()</h3>
740 <pre class="programlisting">FT_Face pango_ft2_font_get_face (<a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font);</pre>
741 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
742 <h3 class="title">Warning</h3>
743 <p><code class="literal">pango_ft2_font_get_face</code> is deprecated and should not be used in newly-written code.</p>
746 Returns the native FreeType2 <span class="type">FT_Face</span> structure used for this <a class="link" href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>.
747 This may be useful if you want to use FreeType2 functions directly.
750 Use <a class="link" href="PangoFcFont.html#pango-fc-font-lock-face" title="pango_fc_font_lock_face ()"><code class="function">pango_fc_font_lock_face()</code></a> instead; when you are done with a
751 face from <a class="link" href="PangoFcFont.html#pango-fc-font-lock-face" title="pango_fc_font_lock_face ()"><code class="function">pango_fc_font_lock_face()</code></a> you must call
752 <a class="link" href="PangoFcFont.html#pango-fc-font-unlock-face" title="pango_fc_font_unlock_face ()"><code class="function">pango_fc_font_unlock_face()</code></a>.</p>
755 <div class="variablelist"><table border="0">
756 <col align="left" valign="top">
759 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
760 <td> a <a class="link" href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>
764 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
765 <td> a pointer to a <span class="type">FT_Face</span> structure, with the size set correctly,
767 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
768 ><code class="literal">NULL</code></a> if <em class="parameter"><code>font</code></em> is <a
769 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
770 ><code class="literal">NULL</code></a>.
777 <div class="refsect2" lang="en">
778 <a name="pango-ft2-font-get-coverage"></a><h3>pango_ft2_font_get_coverage ()</h3>
779 <pre class="programlisting"><a class="link" href="pango-Coverage-Maps.html#PangoCoverage" title="PangoCoverage">PangoCoverage</a> * pango_ft2_font_get_coverage (<a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
780 <a class="link" href="pango-Scripts-and-Languages.html#PangoLanguage" title="PangoLanguage">PangoLanguage</a> *language);</pre>
781 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
782 <h3 class="title">Warning</h3>
783 <p><code class="literal">pango_ft2_font_get_coverage</code> is deprecated and should not be used in newly-written code.</p>
786 Gets the <a class="link" href="pango-Coverage-Maps.html#PangoCoverage" title="PangoCoverage"><span class="type">PangoCoverage</span></a> for a <span class="type">PangoFT2Font</span>. Use
787 <a class="link" href="pango-Fonts.html#pango-font-get-coverage" title="pango_font_get_coverage ()"><code class="function">pango_font_get_coverage()</code></a> instead.</p>
790 <div class="variablelist"><table border="0">
791 <col align="left" valign="top">
794 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
795 <td> a <span class="type">PangoFT2Font</span>.
799 <td><p><span class="term"><em class="parameter"><code>language</code></em> :</span></p></td>
804 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
805 <td> a <a class="link" href="pango-Coverage-Maps.html#PangoCoverage" title="PangoCoverage"><span class="type">PangoCoverage</span></a>.
812 <div class="refsect2" lang="en">
813 <a name="pango-ft2-font-map-for-display"></a><h3>pango_ft2_font_map_for_display ()</h3>
814 <pre class="programlisting"><a class="link" href="pango-Fonts.html#PangoFontMap">PangoFontMap</a> * pango_ft2_font_map_for_display (void);</pre>
815 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
816 <h3 class="title">Warning</h3>
817 <p><code class="literal">pango_ft2_font_map_for_display</code> is deprecated and should not be used in newly-written code.</p>
820 Returns a <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap"><span class="type">PangoFT2FontMap</span></a>. This font map is cached and should
821 not be freed. If the font map is no longer needed, it can
822 be released with <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-shutdown-display" title="pango_ft2_shutdown_display ()"><code class="function">pango_ft2_shutdown_display()</code></a>. Use of the
823 global PangoFT2 fontmap is deprecated; use <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-new" title="pango_ft2_font_map_new ()"><code class="function">pango_ft2_font_map_new()</code></a>
827 <div class="variablelist"><table border="0">
828 <col align="left" valign="top">
830 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
831 <td> a <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap"><span class="type">PangoFT2FontMap</span></a>.
837 <div class="refsect2" lang="en">
838 <a name="pango-ft2-shutdown-display"></a><h3>pango_ft2_shutdown_display ()</h3>
839 <pre class="programlisting">void pango_ft2_shutdown_display (void);</pre>
840 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
841 <h3 class="title">Warning</h3>
842 <p><code class="literal">pango_ft2_shutdown_display</code> is deprecated and should not be used in newly-written code.</p>
845 Free the global fontmap. (See <a class="link" href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-for-display" title="pango_ft2_font_map_for_display ()"><code class="function">pango_ft2_font_map_for_display()</code></a>)
846 Use of the global PangoFT2 fontmap is deprecated.</p>
854 Generated by GTK-Doc V1.11</div>