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>cairo_font_options_t</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
7
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
<link rel="up" href="Fonts.html" title="Fonts">
9
<link rel="prev" href="cairo-Scaled-Fonts.html" title="cairo_scaled_font_t">
10
<link rel="next" href="cairo-FreeType-Fonts.html" title="FreeType Fonts">
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="Drawing.html" title="Drawing">
14
<link rel="chapter" href="Fonts.html" title="Fonts">
15
<link rel="chapter" href="Surfaces.html" title="Surfaces">
16
<link rel="chapter" href="Support.html" title="Utilities">
17
<link rel="index" href="ix01.html" title="Index">
18
<link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
<link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
<link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
<link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
22
<link rel="appendix" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
24
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
27
<td><a accesskey="p" href="cairo-Scaled-Fonts.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
28
<td><a accesskey="u" href="Fonts.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
29
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
30
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
31
<td><a accesskey="n" href="cairo-FreeType-Fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
33
<tr><td colspan="5" class="shortcuts"><nobr><a href="#cairo-Font-Options.synopsis" class="shortcut">Top</a>
35
<a href="#cairo-Font-Options.description" class="shortcut">Description</a></nobr></td></tr>
37
<div class="refentry" lang="en">
38
<a name="cairo-Font-Options"></a><div class="titlepage"></div>
39
<div class="refnamediv"><table width="100%"><tr>
41
<h2><span class="refentrytitle"><a name="cairo-Font-Options.top_of_page"></a>cairo_font_options_t</span></h2>
42
<p>cairo_font_options_t — How a font should be rendered</p>
44
<td valign="top" align="right"></td>
46
<div class="refsynopsisdiv">
47
<a name="cairo-Font-Options.synopsis"></a><h2>Synopsis</h2>
48
<pre class="synopsis">
49
typedef <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a>;
50
<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a>* <a class="link" href="cairo-Font-Options.html#cairo-font-options-create" title="cairo_font_options_create ()">cairo_font_options_create</a> (void);
51
<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a>* <a class="link" href="cairo-Font-Options.html#cairo-font-options-copy" title="cairo_font_options_copy ()">cairo_font_options_copy</a> (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *original);
52
void <a class="link" href="cairo-Font-Options.html#cairo-font-options-destroy" title="cairo_font_options_destroy ()">cairo_font_options_destroy</a> (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
53
<a class="link" href="cairo-Error-Handling.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> <a class="link" href="cairo-Font-Options.html#cairo-font-options-status" title="cairo_font_options_status ()">cairo_font_options_status</a> (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
54
void <a class="link" href="cairo-Font-Options.html#cairo-font-options-merge" title="cairo_font_options_merge ()">cairo_font_options_merge</a> (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
55
const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *other);
56
unsigned long <a class="link" href="cairo-Font-Options.html#cairo-font-options-hash" title="cairo_font_options_hash ()">cairo_font_options_hash</a> (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
57
<a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t">cairo_bool_t</a> <a class="link" href="cairo-Font-Options.html#cairo-font-options-equal" title="cairo_font_options_equal ()">cairo_font_options_equal</a> (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
58
const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *other);
59
void <a class="link" href="cairo-Font-Options.html#cairo-font-options-set-antialias" title="cairo_font_options_set_antialias ()">cairo_font_options_set_antialias</a> (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
60
<a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a> antialias);
61
<a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a> <a class="link" href="cairo-Font-Options.html#cairo-font-options-get-antialias" title="cairo_font_options_get_antialias ()">cairo_font_options_get_antialias</a> (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
62
enum <a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t" title="enum cairo_subpixel_order_t">cairo_subpixel_order_t</a>;
63
void <a class="link" href="cairo-Font-Options.html#cairo-font-options-set-subpixel-order" title="cairo_font_options_set_subpixel_order ()">cairo_font_options_set_subpixel_order</a>
64
(<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
65
<a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t" title="enum cairo_subpixel_order_t">cairo_subpixel_order_t</a> subpixel_order);
66
<a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t" title="enum cairo_subpixel_order_t">cairo_subpixel_order_t</a> <a class="link" href="cairo-Font-Options.html#cairo-font-options-get-subpixel-order" title="cairo_font_options_get_subpixel_order ()">cairo_font_options_get_subpixel_order</a>
67
(const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
68
enum <a class="link" href="cairo-Font-Options.html#cairo-lcd-filter-t" title="enum cairo_lcd_filter_t">cairo_lcd_filter_t</a>;
69
void <a class="link" href="cairo-Font-Options.html#cairo-font-options-set-lcd-filter" title="cairo_font_options_set_lcd_filter ()">cairo_font_options_set_lcd_filter</a> (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
70
<a class="link" href="cairo-Font-Options.html#cairo-lcd-filter-t" title="enum cairo_lcd_filter_t">cairo_lcd_filter_t</a> lcd_filter);
71
<a class="link" href="cairo-Font-Options.html#cairo-lcd-filter-t" title="enum cairo_lcd_filter_t">cairo_lcd_filter_t</a> <a class="link" href="cairo-Font-Options.html#cairo-font-options-get-lcd-filter" title="cairo_font_options_get_lcd_filter ()">cairo_font_options_get_lcd_filter</a> (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
72
enum <a class="link" href="cairo-Font-Options.html#cairo-hint-style-t" title="enum cairo_hint_style_t">cairo_hint_style_t</a>;
73
void <a class="link" href="cairo-Font-Options.html#cairo-font-options-set-hint-style" title="cairo_font_options_set_hint_style ()">cairo_font_options_set_hint_style</a> (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
74
<a class="link" href="cairo-Font-Options.html#cairo-hint-style-t" title="enum cairo_hint_style_t">cairo_hint_style_t</a> hint_style);
75
<a class="link" href="cairo-Font-Options.html#cairo-hint-style-t" title="enum cairo_hint_style_t">cairo_hint_style_t</a> <a class="link" href="cairo-Font-Options.html#cairo-font-options-get-hint-style" title="cairo_font_options_get_hint_style ()">cairo_font_options_get_hint_style</a> (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
76
enum <a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t" title="enum cairo_hint_metrics_t">cairo_hint_metrics_t</a>;
77
void <a class="link" href="cairo-Font-Options.html#cairo-font-options-set-hint-metrics" title="cairo_font_options_set_hint_metrics ()">cairo_font_options_set_hint_metrics</a> (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
78
<a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t" title="enum cairo_hint_metrics_t">cairo_hint_metrics_t</a> hint_metrics);
79
<a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t" title="enum cairo_hint_metrics_t">cairo_hint_metrics_t</a> <a class="link" href="cairo-Font-Options.html#cairo-font-options-get-hint-metrics" title="cairo_font_options_get_hint_metrics ()">cairo_font_options_get_hint_metrics</a>
80
(const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
83
<div class="refsect1" lang="en">
84
<a name="cairo-Font-Options.description"></a><h2>Description</h2>
86
The font options specify how fonts should be rendered. Most of the time the
87
font options implied by a surface are just right and do not need any changes,
88
but for pixel-based targets tweaking font options may result in superior
89
output on a particular display.
92
<div class="refsect1" lang="en">
93
<a name="cairo-Font-Options.details"></a><h2>Details</h2>
94
<div class="refsect2" lang="en">
95
<a name="cairo-font-options-t"></a><h3>cairo_font_options_t</h3>
96
<pre class="programlisting">typedef struct _cairo_font_options cairo_font_options_t;
99
An opaque structure holding all options that are used when
103
Individual features of a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> can be set or
104
accessed using functions named
105
cairo_font_options_set_<span class="emphasis"><em>feature_name</em></span> and
106
cairo_font_options_get_<span class="emphasis"><em>feature_name</em></span>, like
107
<a class="link" href="cairo-Font-Options.html#cairo-font-options-set-antialias" title="cairo_font_options_set_antialias ()"><code class="function">cairo_font_options_set_antialias()</code></a> and
108
<a class="link" href="cairo-Font-Options.html#cairo-font-options-get-antialias" title="cairo_font_options_get_antialias ()"><code class="function">cairo_font_options_get_antialias()</code></a>.
111
New features may be added to a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> in the
112
future. For this reason, <a class="link" href="cairo-Font-Options.html#cairo-font-options-copy" title="cairo_font_options_copy ()"><code class="function">cairo_font_options_copy()</code></a>,
113
<a class="link" href="cairo-Font-Options.html#cairo-font-options-equal" title="cairo_font_options_equal ()"><code class="function">cairo_font_options_equal()</code></a>, <a class="link" href="cairo-Font-Options.html#cairo-font-options-merge" title="cairo_font_options_merge ()"><code class="function">cairo_font_options_merge()</code></a>, and
114
<a class="link" href="cairo-Font-Options.html#cairo-font-options-hash" title="cairo_font_options_hash ()"><code class="function">cairo_font_options_hash()</code></a> should be used to copy, check
115
for equality, merge, or compute a hash value of
116
<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> objects.</p>
122
<div class="refsect2" lang="en">
123
<a name="cairo-font-options-create"></a><h3>cairo_font_options_create ()</h3>
124
<pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a>* cairo_font_options_create (void);</pre>
126
Allocates a new font options object with all options initialized
127
to default values.</p>
131
<div class="variablelist"><table border="0">
132
<col align="left" valign="top">
134
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
135
<td> a newly allocated <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>. Free with
136
<a class="link" href="cairo-Font-Options.html#cairo-font-options-destroy" title="cairo_font_options_destroy ()"><code class="function">cairo_font_options_destroy()</code></a>. This function always returns a
137
valid pointer; if memory cannot be allocated, then a special
138
error object is returned where all operations on the object do nothing.
139
You can check for this with <a class="link" href="cairo-Font-Options.html#cairo-font-options-status" title="cairo_font_options_status ()"><code class="function">cairo_font_options_status()</code></a>.
145
<div class="refsect2" lang="en">
146
<a name="cairo-font-options-copy"></a><h3>cairo_font_options_copy ()</h3>
147
<pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a>* cairo_font_options_copy (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *original);</pre>
149
Allocates a new font options object copying the option values from
150
<em class="parameter"><code>original</code></em>.</p>
154
<div class="variablelist"><table border="0">
155
<col align="left" valign="top">
158
<td><p><span class="term"><em class="parameter"><code>original</code></em> :</span></p></td>
159
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
163
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
164
<td> a newly allocated <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>. Free with
165
<a class="link" href="cairo-Font-Options.html#cairo-font-options-destroy" title="cairo_font_options_destroy ()"><code class="function">cairo_font_options_destroy()</code></a>. This function always returns a
166
valid pointer; if memory cannot be allocated, then a special
167
error object is returned where all operations on the object do nothing.
168
You can check for this with <a class="link" href="cairo-Font-Options.html#cairo-font-options-status" title="cairo_font_options_status ()"><code class="function">cairo_font_options_status()</code></a>.
175
<div class="refsect2" lang="en">
176
<a name="cairo-font-options-destroy"></a><h3>cairo_font_options_destroy ()</h3>
177
<pre class="programlisting">void cairo_font_options_destroy (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
179
Destroys a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> object created with with
180
<a class="link" href="cairo-Font-Options.html#cairo-font-options-create" title="cairo_font_options_create ()"><code class="function">cairo_font_options_create()</code></a> or <a class="link" href="cairo-Font-Options.html#cairo-font-options-copy" title="cairo_font_options_copy ()"><code class="function">cairo_font_options_copy()</code></a>.</p>
184
<div class="variablelist"><table border="0">
185
<col align="left" valign="top">
187
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
188
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
194
<div class="refsect2" lang="en">
195
<a name="cairo-font-options-status"></a><h3>cairo_font_options_status ()</h3>
196
<pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> cairo_font_options_status (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
198
Checks whether an error has previously occurred for this
199
font options object</p>
203
<div class="variablelist"><table border="0">
204
<col align="left" valign="top">
207
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
208
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
212
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
213
<td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>
220
<div class="refsect2" lang="en">
221
<a name="cairo-font-options-merge"></a><h3>cairo_font_options_merge ()</h3>
222
<pre class="programlisting">void cairo_font_options_merge (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
223
const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *other);</pre>
225
Merges non-default options from <em class="parameter"><code>other</code></em> into <em class="parameter"><code>options</code></em>, replacing
226
existing values. This operation can be thought of as somewhat
227
similar to compositing <em class="parameter"><code>other</code></em> onto <em class="parameter"><code>options</code></em> with the operation
228
of <code class="literal">CAIRO_OPERATION_OVER</code>.</p>
232
<div class="variablelist"><table border="0">
233
<col align="left" valign="top">
236
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
237
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
241
<td><p><span class="term"><em class="parameter"><code>other</code></em> :</span></p></td>
242
<td> another <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
249
<div class="refsect2" lang="en">
250
<a name="cairo-font-options-hash"></a><h3>cairo_font_options_hash ()</h3>
251
<pre class="programlisting">unsigned long cairo_font_options_hash (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
253
Compute a hash for the font options object; this value will
254
be useful when storing an object containing a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
259
<div class="variablelist"><table border="0">
260
<col align="left" valign="top">
263
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
264
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
268
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
269
<td> the hash value for the font options object.
270
The return value can be cast to a 32-bit type if a
271
32-bit hash value is needed.
278
<div class="refsect2" lang="en">
279
<a name="cairo-font-options-equal"></a><h3>cairo_font_options_equal ()</h3>
280
<pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t">cairo_bool_t</a> cairo_font_options_equal (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
281
const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *other);</pre>
283
Compares two font options objects for equality.</p>
287
<div class="variablelist"><table border="0">
288
<col align="left" valign="top">
291
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
292
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
296
<td><p><span class="term"><em class="parameter"><code>other</code></em> :</span></p></td>
297
<td> another <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
301
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
303
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
304
><code class="literal">TRUE</code></a> if all fields of the two font options objects match.
305
Note that this function will return <a
306
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
307
><code class="literal">FALSE</code></a> if either object is in
315
<div class="refsect2" lang="en">
316
<a name="cairo-font-options-set-antialias"></a><h3>cairo_font_options_set_antialias ()</h3>
317
<pre class="programlisting">void cairo_font_options_set_antialias (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
318
<a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a> antialias);</pre>
320
Sets the antialiasing mode for the font options object. This
321
specifies the type of antialiasing to do when rendering text.</p>
325
<div class="variablelist"><table border="0">
326
<col align="left" valign="top">
329
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
330
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
334
<td><p><span class="term"><em class="parameter"><code>antialias</code></em> :</span></p></td>
335
<td> the new antialiasing mode
342
<div class="refsect2" lang="en">
343
<a name="cairo-font-options-get-antialias"></a><h3>cairo_font_options_get_antialias ()</h3>
344
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a> cairo_font_options_get_antialias (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
346
Gets the antialiasing mode for the font options object.</p>
350
<div class="variablelist"><table border="0">
351
<col align="left" valign="top">
354
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
355
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
359
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
360
<td> the antialiasing mode
367
<div class="refsect2" lang="en">
368
<a name="cairo-subpixel-order-t"></a><h3>enum cairo_subpixel_order_t</h3>
369
<pre class="programlisting">typedef enum _cairo_subpixel_order {
370
CAIRO_SUBPIXEL_ORDER_DEFAULT,
371
CAIRO_SUBPIXEL_ORDER_RGB,
372
CAIRO_SUBPIXEL_ORDER_BGR,
373
CAIRO_SUBPIXEL_ORDER_VRGB,
374
CAIRO_SUBPIXEL_ORDER_VBGR
375
} cairo_subpixel_order_t;
378
The subpixel order specifies the order of color elements within
379
each pixel on the display device when rendering with an
380
antialiasing mode of <a class="link" href="cairo-cairo-t.html#CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></a>.</p>
384
<div class="variablelist"><table border="0">
385
<col align="left" valign="top">
388
<td><p><a name="CAIRO-SUBPIXEL-ORDER-DEFAULT:CAPS"></a><span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_DEFAULT</code></span></p></td>
389
<td> Use the default subpixel order for
390
for the target device
394
<td><p><a name="CAIRO-SUBPIXEL-ORDER-RGB:CAPS"></a><span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_RGB</code></span></p></td>
395
<td> Subpixel elements are arranged horizontally
400
<td><p><a name="CAIRO-SUBPIXEL-ORDER-BGR:CAPS"></a><span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_BGR</code></span></p></td>
401
<td> Subpixel elements are arranged horizontally
402
with blue at the left
406
<td><p><a name="CAIRO-SUBPIXEL-ORDER-VRGB:CAPS"></a><span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_VRGB</code></span></p></td>
407
<td> Subpixel elements are arranged vertically
412
<td><p><a name="CAIRO-SUBPIXEL-ORDER-VBGR:CAPS"></a><span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_VBGR</code></span></p></td>
413
<td> Subpixel elements are arranged vertically
421
<div class="refsect2" lang="en">
422
<a name="cairo-font-options-set-subpixel-order"></a><h3>cairo_font_options_set_subpixel_order ()</h3>
423
<pre class="programlisting">void cairo_font_options_set_subpixel_order
424
(<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
425
<a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t" title="enum cairo_subpixel_order_t">cairo_subpixel_order_t</a> subpixel_order);</pre>
427
Sets the subpixel order for the font options object. The subpixel
428
order specifies the order of color elements within each pixel on
429
the display device when rendering with an antialiasing mode of
430
<a class="link" href="cairo-cairo-t.html#CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></a>. See the documentation for
431
<a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t" title="enum cairo_subpixel_order_t"><span class="type">cairo_subpixel_order_t</span></a> for full details.</p>
435
<div class="variablelist"><table border="0">
436
<col align="left" valign="top">
439
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
440
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
444
<td><p><span class="term"><em class="parameter"><code>subpixel_order</code></em> :</span></p></td>
445
<td> the new subpixel order
452
<div class="refsect2" lang="en">
453
<a name="cairo-font-options-get-subpixel-order"></a><h3>cairo_font_options_get_subpixel_order ()</h3>
454
<pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t" title="enum cairo_subpixel_order_t">cairo_subpixel_order_t</a> cairo_font_options_get_subpixel_order
455
(const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
457
Gets the subpixel order for the font options object.
458
See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t" title="enum cairo_subpixel_order_t"><span class="type">cairo_subpixel_order_t</span></a> for full details.</p>
462
<div class="variablelist"><table border="0">
463
<col align="left" valign="top">
466
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
467
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
471
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
472
<td> the subpixel order for the font options object
479
<div class="refsect2" lang="en">
480
<a name="cairo-lcd-filter-t"></a><h3>enum cairo_lcd_filter_t</h3>
481
<pre class="programlisting">typedef enum _cairo_lcd_filter {
482
CAIRO_LCD_FILTER_DEFAULT,
483
CAIRO_LCD_FILTER_NONE,
484
CAIRO_LCD_FILTER_INTRA_PIXEL,
485
CAIRO_LCD_FILTER_FIR3,
486
CAIRO_LCD_FILTER_FIR5
487
} cairo_lcd_filter_t;
490
The LCD filter specifies the low-pass filter applied to LCD-optimized
491
bitmaps generated with an antialiasing mode of <a class="link" href="cairo-cairo-t.html#CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></a>.</p>
495
<div class="variablelist"><table border="0">
496
<col align="left" valign="top">
499
<td><p><a name="CAIRO-LCD-FILTER-DEFAULT:CAPS"></a><span class="term"><code class="literal">CAIRO_LCD_FILTER_DEFAULT</code></span></p></td>
500
<td> Use the default LCD filter for
501
font backend and target device
505
<td><p><a name="CAIRO-LCD-FILTER-NONE:CAPS"></a><span class="term"><code class="literal">CAIRO_LCD_FILTER_NONE</code></span></p></td>
506
<td> Do not perform LCD filtering
510
<td><p><a name="CAIRO-LCD-FILTER-INTRA-PIXEL:CAPS"></a><span class="term"><code class="literal">CAIRO_LCD_FILTER_INTRA_PIXEL</code></span></p></td>
511
<td> Intra-pixel filter
515
<td><p><a name="CAIRO-LCD-FILTER-FIR3:CAPS"></a><span class="term"><code class="literal">CAIRO_LCD_FILTER_FIR3</code></span></p></td>
516
<td> FIR filter with a 3x3 kernel
520
<td><p><a name="CAIRO-LCD-FILTER-FIR5:CAPS"></a><span class="term"><code class="literal">CAIRO_LCD_FILTER_FIR5</code></span></p></td>
521
<td> FIR filter with a 5x5 kernel
526
<p class="since">Since 1.8
530
<div class="refsect2" lang="en">
531
<a name="cairo-font-options-set-lcd-filter"></a><h3>cairo_font_options_set_lcd_filter ()</h3>
532
<pre class="programlisting">void cairo_font_options_set_lcd_filter (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
533
<a class="link" href="cairo-Font-Options.html#cairo-lcd-filter-t" title="enum cairo_lcd_filter_t">cairo_lcd_filter_t</a> lcd_filter);</pre>
535
Sets the LCD filter for the font options object. The LCD filter
536
specifies how pixels are filtered when rendered with an antialiasing
537
mode of <a class="link" href="cairo-cairo-t.html#CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></a>. See the documentation for
538
<a class="link" href="cairo-Font-Options.html#cairo-lcd-filter-t" title="enum cairo_lcd_filter_t"><span class="type">cairo_lcd_filter_t</span></a> for full details.</p>
542
<div class="variablelist"><table border="0">
543
<col align="left" valign="top">
546
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
547
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
551
<td><p><span class="term"><em class="parameter"><code>lcd_filter</code></em> :</span></p></td>
552
<td> the new LCD filter
557
<p class="since">Since 1.8
561
<div class="refsect2" lang="en">
562
<a name="cairo-font-options-get-lcd-filter"></a><h3>cairo_font_options_get_lcd_filter ()</h3>
563
<pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-lcd-filter-t" title="enum cairo_lcd_filter_t">cairo_lcd_filter_t</a> cairo_font_options_get_lcd_filter (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
565
Gets the LCD filter for the font options object.
566
See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-lcd-filter-t" title="enum cairo_lcd_filter_t"><span class="type">cairo_lcd_filter_t</span></a> for full details.</p>
570
<div class="variablelist"><table border="0">
571
<col align="left" valign="top">
574
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
575
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
579
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
580
<td> the LCD filter for the font options object
586
<p class="since">Since 1.8
590
<div class="refsect2" lang="en">
591
<a name="cairo-hint-style-t"></a><h3>enum cairo_hint_style_t</h3>
592
<pre class="programlisting">typedef enum _cairo_hint_style {
593
CAIRO_HINT_STYLE_DEFAULT,
594
CAIRO_HINT_STYLE_NONE,
595
CAIRO_HINT_STYLE_SLIGHT,
596
CAIRO_HINT_STYLE_MEDIUM,
597
CAIRO_HINT_STYLE_FULL
598
} cairo_hint_style_t;
601
Specifies the type of hinting to do on font outlines. Hinting
602
is the process of fitting outlines to the pixel grid in order
603
to improve the appearance of the result. Since hinting outlines
604
involves distorting them, it also reduces the faithfulness
605
to the original outline shapes. Not all of the outline hinting
606
styles are supported by all font backends.
609
New entries may be added in future versions.</p>
613
<div class="variablelist"><table border="0">
614
<col align="left" valign="top">
617
<td><p><a name="CAIRO-HINT-STYLE-DEFAULT:CAPS"></a><span class="term"><code class="literal">CAIRO_HINT_STYLE_DEFAULT</code></span></p></td>
618
<td> Use the default hint style for
619
font backend and target device
623
<td><p><a name="CAIRO-HINT-STYLE-NONE:CAPS"></a><span class="term"><code class="literal">CAIRO_HINT_STYLE_NONE</code></span></p></td>
624
<td> Do not hint outlines
628
<td><p><a name="CAIRO-HINT-STYLE-SLIGHT:CAPS"></a><span class="term"><code class="literal">CAIRO_HINT_STYLE_SLIGHT</code></span></p></td>
629
<td> Hint outlines slightly to improve
630
contrast while retaining good fidelity to the original
635
<td><p><a name="CAIRO-HINT-STYLE-MEDIUM:CAPS"></a><span class="term"><code class="literal">CAIRO_HINT_STYLE_MEDIUM</code></span></p></td>
636
<td> Hint outlines with medium strength
637
giving a compromise between fidelity to the original shapes
642
<td><p><a name="CAIRO-HINT-STYLE-FULL:CAPS"></a><span class="term"><code class="literal">CAIRO_HINT_STYLE_FULL</code></span></p></td>
643
<td> Hint outlines to maximize contrast
650
<div class="refsect2" lang="en">
651
<a name="cairo-font-options-set-hint-style"></a><h3>cairo_font_options_set_hint_style ()</h3>
652
<pre class="programlisting">void cairo_font_options_set_hint_style (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
653
<a class="link" href="cairo-Font-Options.html#cairo-hint-style-t" title="enum cairo_hint_style_t">cairo_hint_style_t</a> hint_style);</pre>
655
Sets the hint style for font outlines for the font options object.
656
This controls whether to fit font outlines to the pixel grid,
657
and if so, whether to optimize for fidelity or contrast.
658
See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-hint-style-t" title="enum cairo_hint_style_t"><span class="type">cairo_hint_style_t</span></a> for full details.</p>
662
<div class="variablelist"><table border="0">
663
<col align="left" valign="top">
666
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
667
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
671
<td><p><span class="term"><em class="parameter"><code>hint_style</code></em> :</span></p></td>
672
<td> the new hint style
679
<div class="refsect2" lang="en">
680
<a name="cairo-font-options-get-hint-style"></a><h3>cairo_font_options_get_hint_style ()</h3>
681
<pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-hint-style-t" title="enum cairo_hint_style_t">cairo_hint_style_t</a> cairo_font_options_get_hint_style (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
683
Gets the hint style for font outlines for the font options object.
684
See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-hint-style-t" title="enum cairo_hint_style_t"><span class="type">cairo_hint_style_t</span></a> for full details.</p>
688
<div class="variablelist"><table border="0">
689
<col align="left" valign="top">
692
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
693
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
697
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
698
<td> the hint style for the font options object
705
<div class="refsect2" lang="en">
706
<a name="cairo-hint-metrics-t"></a><h3>enum cairo_hint_metrics_t</h3>
707
<pre class="programlisting">typedef enum _cairo_hint_metrics {
708
CAIRO_HINT_METRICS_DEFAULT,
709
CAIRO_HINT_METRICS_OFF,
710
CAIRO_HINT_METRICS_ON
711
} cairo_hint_metrics_t;
714
Specifies whether to hint font metrics; hinting font metrics
715
means quantizing them so that they are integer values in
716
device space. Doing this improves the consistency of
717
letter and line spacing, however it also means that text
718
will be laid out differently at different zoom factors.</p>
722
<div class="variablelist"><table border="0">
723
<col align="left" valign="top">
726
<td><p><a name="CAIRO-HINT-METRICS-DEFAULT:CAPS"></a><span class="term"><code class="literal">CAIRO_HINT_METRICS_DEFAULT</code></span></p></td>
727
<td> Hint metrics in the default
728
manner for the font backend and target device
732
<td><p><a name="CAIRO-HINT-METRICS-OFF:CAPS"></a><span class="term"><code class="literal">CAIRO_HINT_METRICS_OFF</code></span></p></td>
733
<td> Do not hint font metrics
737
<td><p><a name="CAIRO-HINT-METRICS-ON:CAPS"></a><span class="term"><code class="literal">CAIRO_HINT_METRICS_ON</code></span></p></td>
738
<td> Hint font metrics
745
<div class="refsect2" lang="en">
746
<a name="cairo-font-options-set-hint-metrics"></a><h3>cairo_font_options_set_hint_metrics ()</h3>
747
<pre class="programlisting">void cairo_font_options_set_hint_metrics (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options,
748
<a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t" title="enum cairo_hint_metrics_t">cairo_hint_metrics_t</a> hint_metrics);</pre>
750
Sets the metrics hinting mode for the font options object. This
751
controls whether metrics are quantized to integer values in
753
See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t" title="enum cairo_hint_metrics_t"><span class="type">cairo_hint_metrics_t</span></a> for full details.</p>
757
<div class="variablelist"><table border="0">
758
<col align="left" valign="top">
761
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
762
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
766
<td><p><span class="term"><em class="parameter"><code>hint_metrics</code></em> :</span></p></td>
767
<td> the new metrics hinting mode
774
<div class="refsect2" lang="en">
775
<a name="cairo-font-options-get-hint-metrics"></a><h3>cairo_font_options_get_hint_metrics ()</h3>
776
<pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t" title="enum cairo_hint_metrics_t">cairo_hint_metrics_t</a> cairo_font_options_get_hint_metrics
777
(const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
779
Gets the metrics hinting mode for the font options object.
780
See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t" title="enum cairo_hint_metrics_t"><span class="type">cairo_hint_metrics_t</span></a> for full details.</p>
784
<div class="variablelist"><table border="0">
785
<col align="left" valign="top">
788
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
789
<td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a>
793
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
794
<td> the metrics hinting mode for the font options object
801
<div class="refsect1" lang="en">
802
<a name="cairo-Font-Options.see-also"></a><h2>See Also</h2>
805
<div class="itemizedlist"><ul type="disc"><li><a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a></li></ul></div>
812
Generated by GTK-Doc V1.10</div>