cairo 1.7.0-x86-mswin32 → 1.8.0-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cairo might be problematic. Click here for more details.
- data/ChangeLog +32 -0
- data/NEWS +9 -1
- data/README +1 -0
- data/Rakefile +2 -2
- data/cairo/DLL_FAQ.txt +397 -0
- data/cairo/README.txt +53 -0
- data/cairo/USAGE.txt +94 -0
- data/cairo/bin/libcairo-2.dll +0 -0
- data/cairo/bin/libpng12-0.dll +0 -0
- data/cairo/bin/zlib1.dll +0 -0
- data/cairo/include/cairo/cairo-deprecated.h +0 -4
- data/cairo/include/cairo/cairo-features.h +7 -22
- data/cairo/include/cairo/cairo-pdf.h +1 -1
- data/cairo/include/cairo/cairo-ps.h +1 -1
- data/cairo/include/cairo/cairo-svg.h +1 -1
- data/cairo/include/cairo/cairo-version.h +8 -0
- data/cairo/include/cairo/cairo-win32.h +9 -1
- data/cairo/include/cairo/cairo.h +420 -32
- data/cairo/include/libpng12/png.h +3592 -0
- data/cairo/include/libpng12/pngconf.h +1481 -0
- data/cairo/include/png.h +36 -13
- data/cairo/include/pngconf.h +3 -3
- data/cairo/include/zconf.h +332 -0
- data/cairo/include/zlib.h +1357 -0
- data/cairo/lib/cairo.def +22 -0
- data/cairo/lib/cairo.lib +0 -0
- data/cairo/lib/libcairo.dll.a +0 -0
- data/cairo/lib/libpng.def +1 -0
- data/cairo/lib/libpng.lib +0 -0
- data/cairo/lib/libpng12.dll.a +0 -0
- data/cairo/lib/pkgconfig/cairo-pdf.pc +5 -5
- data/cairo/lib/pkgconfig/cairo-png.pc +5 -5
- data/cairo/lib/pkgconfig/cairo-ps.pc +5 -5
- data/cairo/lib/pkgconfig/cairo-svg.pc +4 -4
- data/cairo/lib/pkgconfig/cairo-win32-font.pc +4 -4
- data/cairo/lib/pkgconfig/cairo-win32.pc +4 -4
- data/cairo/lib/pkgconfig/cairo.pc +4 -4
- data/cairo/lib/pkgconfig/libpng.pc +3 -2
- data/cairo/lib/pkgconfig/libpng12.pc +3 -2
- data/cairo/lib/zdll.exp +0 -0
- data/cairo/lib/zdll.lib +0 -0
- data/cairo/lib/zlib.def +60 -0
- data/cairo/manifest/cairo-dev_1.8.0-1_win32.mft +76 -0
- data/cairo/manifest/cairo_1.8.0-1_win32.mft +5 -0
- data/cairo/manifest/{libpng-dev-1.2.29.mft → libpng-dev_1.2.32-1_win32.mft} +5 -2
- data/cairo/manifest/libpng_1.2.32-1_win32.mft +2 -0
- data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING +0 -0
- data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-LGPL-2.1 +0 -0
- data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-MPL-1.1 +0 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-errors.html +15 -11
- data/cairo/share/gtk-doc/html/cairo/bindings-fonts.html +15 -11
- data/cairo/share/gtk-doc/html/cairo/bindings-memory.html +20 -16
- data/cairo/share/gtk-doc/html/cairo/bindings-overloading.html +16 -12
- data/cairo/share/gtk-doc/html/cairo/bindings-path.html +17 -13
- data/cairo/share/gtk-doc/html/cairo/bindings-patterns.html +25 -21
- data/cairo/share/gtk-doc/html/cairo/bindings-return-values.html +17 -13
- data/cairo/share/gtk-doc/html/cairo/bindings-streams.html +14 -10
- data/cairo/share/gtk-doc/html/cairo/bindings-surfaces.html +19 -15
- data/cairo/share/gtk-doc/html/cairo/cairo-context.html +2721 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-drawing.html +57 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-error-status.html +361 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-font-face.html +418 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-font-options.html +695 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-fonts.html +63 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-ft-font.html +318 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-image-surface.html +486 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-cairo-matrix-t.html → cairo-matrix.html} +137 -156
- data/cairo/share/gtk-doc/html/cairo/{cairo-Paths.html → cairo-paths.html} +275 -306
- data/cairo/share/gtk-doc/html/cairo/cairo-pattern.html +1524 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-PDF-Surfaces.html → cairo-pdf-surface.html} +60 -70
- data/cairo/share/gtk-doc/html/cairo/cairo-png-functions.html +332 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-PostScript-Surfaces.html → cairo-ps-surface.html} +131 -150
- data/cairo/share/gtk-doc/html/cairo/cairo-quartz-font.html +153 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-Quartz-Surfaces.html → cairo-quartz-surface.html} +53 -62
- data/cairo/share/gtk-doc/html/cairo/cairo-scaled-font.html +1051 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-support.html +54 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-surface.html +1064 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-surfaces.html +69 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-svg-surface.html +324 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-text.html +1264 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-Transformations.html → cairo-transformations.html} +98 -115
- data/cairo/share/gtk-doc/html/cairo/cairo-types.html +134 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-user-font.html +769 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-version-info.html +355 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-win32-font.html +366 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-win32-surface.html +321 -0
- data/cairo/share/gtk-doc/html/cairo/{cairo-XLib-Surfaces.html → cairo-xlib-surface.html} +104 -121
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp +390 -405
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp2 +390 -405
- data/cairo/share/gtk-doc/html/cairo/index-1.2.html +63 -59
- data/cairo/share/gtk-doc/html/cairo/index-1.4.html +45 -41
- data/cairo/share/gtk-doc/html/cairo/index-1.6.html +29 -23
- data/cairo/share/gtk-doc/html/cairo/index-1.8.html +107 -0
- data/cairo/share/gtk-doc/html/cairo/index-all.html +759 -0
- data/cairo/share/gtk-doc/html/cairo/index.html +51 -41
- data/cairo/share/gtk-doc/html/cairo/index.sgml +478 -466
- data/cairo/share/gtk-doc/html/cairo/language-bindings.html +22 -18
- data/cairo/share/gtk-doc/html/cairo/style.css +14 -2
- data/cairo/share/man/man3/libpng.3 +443 -17
- data/cairo/share/man/man3/libpngpf.3 +618 -102
- data/cairo/share/man/man5/png.5 +1 -1
- data/cairo/src/tml/make/cairo_1.8.0-1_win32.log +1021 -0
- data/cairo/src/tml/make/cairo_1.8.0-1_win32.sh +68 -0
- data/cairo/src/tml/make/libpng_1.2.32-1_win32.log +269 -0
- data/cairo/src/tml/make/libpng_1.2.32-1_win32.sh +63 -0
- data/cairo/test/example_d.exe +0 -0
- data/cairo/test/minigzip_d.exe +0 -0
- data/cairo/test/testzlib_d.exe +0 -0
- data/cairo/test/untgz_d.exe +0 -0
- data/doc/en/cairo-context.html +81 -91
- data/doc/en/cairo-font-options.html +11 -26
- data/doc/en/cairo-text-cluster-flag.html +35 -0
- data/doc/en/cairo-user-font-face-text-to-glyphs-data.html +3 -3
- data/doc/en/cairo.html +38 -42
- data/doc/en/index.html +129 -142
- data/doc/ja/cairo-font-options.html +3 -25
- data/doc/ja/cairo-text-cluster-flag.html +46 -0
- data/doc/ja/cairo-user-font-face-text-to-glyphs-data.html +16 -15
- data/doc/ja/cairo.html +3 -7
- data/doc/ja/index.html +9 -17
- data/src/cairo.def +1 -1
- data/src/cairo.so +0 -0
- data/src/lib/cairo/constants.rb +3 -1
- data/src/libruby-cairo.a +0 -0
- data/src/rb_cairo.c +2 -2
- data/src/rb_cairo.h +5 -5
- data/src/rb_cairo_constants.c +12 -19
- data/src/rb_cairo_context.c +25 -21
- data/src/rb_cairo_font_face.c +44 -29
- data/src/rb_cairo_font_options.c +1 -23
- data/src/rb_cairo_scaled_font.c +5 -5
- data/test/test_constants.rb +6 -9
- data/test/test_context.rb +0 -12
- data/test/test_font_face.rb +7 -7
- data/test/test_font_options.rb +2 -21
- data/test/test_scaled_font.rb +3 -3
- data/test/test_text_to_glyphs_data.rb +19 -15
- metadata +68 -45
- data/cairo/make/cairo-1.6.4-2.sh +0 -55
- data/cairo/make/libpng-1.2.29.sh +0 -35
- data/cairo/manifest/cairo-1.6.4-2.mft +0 -6
- data/cairo/manifest/cairo-dev-1.6.4-2.mft +0 -72
- data/cairo/manifest/libpng-1.2.29.mft +0 -2
- data/cairo/share/gtk-doc/html/cairo/Drawing.html +0 -53
- data/cairo/share/gtk-doc/html/cairo/Fonts.html +0 -56
- data/cairo/share/gtk-doc/html/cairo/Support.html +0 -50
- data/cairo/share/gtk-doc/html/cairo/Surfaces.html +0 -65
- data/cairo/share/gtk-doc/html/cairo/cairo-Error-Handling.html +0 -328
- data/cairo/share/gtk-doc/html/cairo/cairo-Font-Options.html +0 -720
- data/cairo/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +0 -297
- data/cairo/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +0 -484
- data/cairo/share/gtk-doc/html/cairo/cairo-PNG-Support.html +0 -345
- data/cairo/share/gtk-doc/html/cairo/cairo-Patterns.html +0 -1560
- data/cairo/share/gtk-doc/html/cairo/cairo-Quartz-Fonts.html +0 -161
- data/cairo/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +0 -337
- data/cairo/share/gtk-doc/html/cairo/cairo-Scaled-Fonts.html +0 -823
- data/cairo/share/gtk-doc/html/cairo/cairo-Text.html +0 -836
- data/cairo/share/gtk-doc/html/cairo/cairo-Types.html +0 -143
- data/cairo/share/gtk-doc/html/cairo/cairo-Version-Information.html +0 -325
- data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +0 -381
- data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +0 -331
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +0 -427
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +0 -995
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-t.html +0 -2795
- data/cairo/share/gtk-doc/html/cairo/ix01.html +0 -693
- data/doc/en/cairo-lcd-filter.html +0 -39
- data/doc/ja/cairo-lcd-filter.html +0 -63
@@ -0,0 +1,134 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
+
<title>Types</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="cairo-support.html" title="Utilities">
|
9
|
+
<link rel="prev" href="cairo-version-info.html" title="Version Information">
|
10
|
+
<link rel="next" href="index-all.html" title="Index">
|
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="cairo-drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="cairo-fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="cairo-support.html" title="Utilities">
|
17
|
+
<link rel="index" href="index-all.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">
|
23
|
+
</head>
|
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">
|
26
|
+
<tr valign="middle">
|
27
|
+
<td><a accesskey="p" href="cairo-version-info.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
28
|
+
<td><a accesskey="u" href="cairo-support.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="index-all.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
32
|
+
</tr>
|
33
|
+
<tr><td colspan="5" class="shortcuts"><nobr><a href="#cairo-types.synopsis" class="shortcut">Top</a>
|
34
|
+
|
|
35
|
+
<a href="#cairo-types.description" class="shortcut">Description</a></nobr></td></tr>
|
36
|
+
</table>
|
37
|
+
<div class="refentry" lang="en">
|
38
|
+
<a name="cairo-types"></a><div class="titlepage"></div>
|
39
|
+
<div class="refnamediv"><table width="100%"><tr>
|
40
|
+
<td valign="top">
|
41
|
+
<h2><span class="refentrytitle"><a name="cairo-types.top_of_page"></a>Types</span></h2>
|
42
|
+
<p>Types — Generic data types</p>
|
43
|
+
</td>
|
44
|
+
<td valign="top" align="right"></td>
|
45
|
+
</tr></table></div>
|
46
|
+
<div class="refsynopsisdiv">
|
47
|
+
<a name="cairo-types.synopsis"></a><h2>Synopsis</h2>
|
48
|
+
<pre class="synopsis">
|
49
|
+
typedef <a class="link" href="cairo-types.html#cairo-bool-t" title="cairo_bool_t">cairo_bool_t</a>;
|
50
|
+
<a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t">cairo_user_data_key_t</a>;
|
51
|
+
void (<a class="link" href="cairo-types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()">*cairo_destroy_func_t</a>) (void *data);
|
52
|
+
</pre>
|
53
|
+
</div>
|
54
|
+
<div class="refsect1" lang="en">
|
55
|
+
<a name="cairo-types.description"></a><h2>Description</h2>
|
56
|
+
<p>
|
57
|
+
Generic data types used in the cairo API
|
58
|
+
</p>
|
59
|
+
</div>
|
60
|
+
<div class="refsect1" lang="en">
|
61
|
+
<a name="cairo-types.details"></a><h2>Details</h2>
|
62
|
+
<div class="refsect2" lang="en">
|
63
|
+
<a name="cairo-bool-t"></a><h3>cairo_bool_t</h3>
|
64
|
+
<pre class="programlisting">typedef int cairo_bool_t;
|
65
|
+
</pre>
|
66
|
+
<p>
|
67
|
+
<a class="link" href="cairo-types.html#cairo-bool-t" title="cairo_bool_t"><span class="type">cairo_bool_t</span></a> is used for boolean values. Returns of type
|
68
|
+
<a class="link" href="cairo-types.html#cairo-bool-t" title="cairo_bool_t"><span class="type">cairo_bool_t</span></a> will always be either 0 or 1, but testing against
|
69
|
+
these values explicitly is not encouraged; just use the
|
70
|
+
value as a boolean condition.
|
71
|
+
</p>
|
72
|
+
<p>
|
73
|
+
</p>
|
74
|
+
<div class="informalexample"><pre class="programlisting">
|
75
|
+
if (cairo_in_stroke (cr, x, y)) {
|
76
|
+
/* do something */
|
77
|
+
}
|
78
|
+
</pre></div>
|
79
|
+
<p>
|
80
|
+
|
81
|
+
</p>
|
82
|
+
</div>
|
83
|
+
<hr>
|
84
|
+
<div class="refsect2" lang="en">
|
85
|
+
<a name="cairo-user-data-key-t"></a><h3>cairo_user_data_key_t</h3>
|
86
|
+
<pre class="programlisting">typedef struct {
|
87
|
+
int unused;
|
88
|
+
} cairo_user_data_key_t;
|
89
|
+
</pre>
|
90
|
+
<p>
|
91
|
+
<a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> is used for attaching user data to cairo
|
92
|
+
data structures. The actual contents of the struct is never used,
|
93
|
+
and there is no need to initialize the object; only the unique
|
94
|
+
address of a <span class="type">cairo_data_key_t</span> object is used. Typically, you
|
95
|
+
would just use the address of a static <span class="type">cairo_data_key_t</span> object.</p>
|
96
|
+
<p>
|
97
|
+
|
98
|
+
</p>
|
99
|
+
<div class="variablelist"><table border="0">
|
100
|
+
<col align="left" valign="top">
|
101
|
+
<tbody><tr>
|
102
|
+
<td><p><span class="term">int <em class="structfield"><code>unused</code></em>;</span></p></td>
|
103
|
+
<td> not used; ignore.
|
104
|
+
</td>
|
105
|
+
</tr></tbody>
|
106
|
+
</table></div>
|
107
|
+
</div>
|
108
|
+
<hr>
|
109
|
+
<div class="refsect2" lang="en">
|
110
|
+
<a name="cairo-destroy-func-t"></a><h3>cairo_destroy_func_t ()</h3>
|
111
|
+
<pre class="programlisting">void (*cairo_destroy_func_t) (void *data);</pre>
|
112
|
+
<p>
|
113
|
+
<a class="link" href="cairo-types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> the type of function which is called when a
|
114
|
+
data element is destroyed. It is passed the pointer to the data
|
115
|
+
element and should free any memory and resources allocated for it.</p>
|
116
|
+
<p>
|
117
|
+
|
118
|
+
</p>
|
119
|
+
<div class="variablelist"><table border="0">
|
120
|
+
<col align="left" valign="top">
|
121
|
+
<tbody><tr>
|
122
|
+
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
123
|
+
<td> The data element being destroyed.
|
124
|
+
</td>
|
125
|
+
</tr></tbody>
|
126
|
+
</table></div>
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
<div class="footer">
|
131
|
+
<hr>
|
132
|
+
Generated by GTK-Doc V1.10</div>
|
133
|
+
</body>
|
134
|
+
</html>
|
@@ -0,0 +1,769 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
+
<title>User Fonts</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="cairo-fonts.html" title="Fonts">
|
9
|
+
<link rel="prev" href="cairo-quartz-font.html" title="Quartz (CGFont) Fonts">
|
10
|
+
<link rel="next" href="cairo-surfaces.html" title="Surfaces">
|
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="cairo-drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="cairo-fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="cairo-support.html" title="Utilities">
|
17
|
+
<link rel="index" href="index-all.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">
|
23
|
+
</head>
|
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">
|
26
|
+
<tr valign="middle">
|
27
|
+
<td><a accesskey="p" href="cairo-quartz-font.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
28
|
+
<td><a accesskey="u" href="cairo-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-surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
32
|
+
</tr>
|
33
|
+
<tr><td colspan="5" class="shortcuts"><nobr><a href="#cairo-user-font.synopsis" class="shortcut">Top</a>
|
34
|
+
|
|
35
|
+
<a href="#cairo-user-font.description" class="shortcut">Description</a></nobr></td></tr>
|
36
|
+
</table>
|
37
|
+
<div class="refentry" lang="en">
|
38
|
+
<a name="cairo-user-font"></a><div class="titlepage"></div>
|
39
|
+
<div class="refnamediv"><table width="100%"><tr>
|
40
|
+
<td valign="top">
|
41
|
+
<h2><span class="refentrytitle"><a name="cairo-user-font.top_of_page"></a>User Fonts</span></h2>
|
42
|
+
<p>User Fonts — Font support with font data provided by the user</p>
|
43
|
+
</td>
|
44
|
+
<td valign="top" align="right"></td>
|
45
|
+
</tr></table></div>
|
46
|
+
<div class="refsynopsisdiv">
|
47
|
+
<a name="cairo-user-font.synopsis"></a><h2>Synopsis</h2>
|
48
|
+
<pre class="synopsis">
|
49
|
+
#define <a class="link" href="cairo-user-font.html#CAIRO-HAS-USER-FONT:CAPS" title="CAIRO_HAS_USER_FONT">CAIRO_HAS_USER_FONT</a>
|
50
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-init-func-t" title="cairo_user_scaled_font_init_func_t ()">*cairo_user_scaled_font_init_func_t</a>)
|
51
|
+
(<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
|
52
|
+
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
53
|
+
<a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t">cairo_font_extents_t</a> *extents);
|
54
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-render-glyph-func-t" title="cairo_user_scaled_font_render_glyph_func_t ()">*cairo_user_scaled_font_render_glyph_func_t</a>)
|
55
|
+
(<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
|
56
|
+
unsigned long glyph,
|
57
|
+
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
58
|
+
<a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);
|
59
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-text-to-glyphs-func-t" title="cairo_user_scaled_font_text_to_glyphs_func_t ()">*cairo_user_scaled_font_text_to_glyphs_func_t</a>)
|
60
|
+
(<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
|
61
|
+
const char *utf8,
|
62
|
+
int utf8_len,
|
63
|
+
<a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> **glyphs,
|
64
|
+
int *num_glyphs,
|
65
|
+
<a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> **clusters,
|
66
|
+
int *num_clusters,
|
67
|
+
<a class="link" href="cairo-text.html#cairo-text-cluster-flags-t" title="enum cairo_text_cluster_flags_t">cairo_text_cluster_flags_t</a> *cluster_flags);
|
68
|
+
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-unicode-to-glyph-func-t" title="cairo_user_scaled_font_unicode_to_glyph_func_t ()">*cairo_user_scaled_font_unicode_to_glyph_func_t</a>)
|
69
|
+
(<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
|
70
|
+
unsigned long unicode,
|
71
|
+
unsigned long *glyph_index);
|
72
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a>* <a class="link" href="cairo-user-font.html#cairo-user-font-face-create" title="cairo_user_font_face_create ()">cairo_user_font_face_create</a> (void);
|
73
|
+
void <a class="link" href="cairo-user-font.html#cairo-user-font-face-set-init-func" title="cairo_user_font_face_set_init_func ()">cairo_user_font_face_set_init_func</a> (<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
|
74
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-init-func-t" title="cairo_user_scaled_font_init_func_t ()">cairo_user_scaled_font_init_func_t</a> init_func);
|
75
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-init-func-t" title="cairo_user_scaled_font_init_func_t ()">cairo_user_scaled_font_init_func_t</a> <a class="link" href="cairo-user-font.html#cairo-user-font-face-get-init-func" title="cairo_user_font_face_get_init_func ()">cairo_user_font_face_get_init_func</a>
|
76
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face);
|
77
|
+
void <a class="link" href="cairo-user-font.html#cairo-user-font-face-set-render-glyph-func" title="cairo_user_font_face_set_render_glyph_func ()">cairo_user_font_face_set_render_glyph_func</a>
|
78
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
|
79
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-render-glyph-func-t" title="cairo_user_scaled_font_render_glyph_func_t ()">cairo_user_scaled_font_render_glyph_func_t</a> render_glyph_func);
|
80
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-render-glyph-func-t" title="cairo_user_scaled_font_render_glyph_func_t ()">cairo_user_scaled_font_render_glyph_func_t</a> <a class="link" href="cairo-user-font.html#cairo-user-font-face-get-render-glyph-func" title="cairo_user_font_face_get_render_glyph_func ()">cairo_user_font_face_get_render_glyph_func</a>
|
81
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face);
|
82
|
+
void <a class="link" href="cairo-user-font.html#cairo-user-font-face-set-unicode-to-glyph-func" title="cairo_user_font_face_set_unicode_to_glyph_func ()">cairo_user_font_face_set_unicode_to_glyph_func</a>
|
83
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
|
84
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-unicode-to-glyph-func-t" title="cairo_user_scaled_font_unicode_to_glyph_func_t ()">cairo_user_scaled_font_unicode_to_glyph_func_t</a> unicode_to_glyph_func);
|
85
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-unicode-to-glyph-func-t" title="cairo_user_scaled_font_unicode_to_glyph_func_t ()">cairo_user_scaled_font_unicode_to_glyph_func_t</a> <a class="link" href="cairo-user-font.html#cairo-user-font-face-get-unicode-to-glyph-func" title="cairo_user_font_face_get_unicode_to_glyph_func ()">cairo_user_font_face_get_unicode_to_glyph_func</a>
|
86
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face);
|
87
|
+
void <a class="link" href="cairo-user-font.html#cairo-user-font-face-set-text-to-glyphs-func" title="cairo_user_font_face_set_text_to_glyphs_func ()">cairo_user_font_face_set_text_to_glyphs_func</a>
|
88
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
|
89
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-text-to-glyphs-func-t" title="cairo_user_scaled_font_text_to_glyphs_func_t ()">cairo_user_scaled_font_text_to_glyphs_func_t</a> text_to_glyphs_func);
|
90
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-text-to-glyphs-func-t" title="cairo_user_scaled_font_text_to_glyphs_func_t ()">cairo_user_scaled_font_text_to_glyphs_func_t</a> <a class="link" href="cairo-user-font.html#cairo-user-font-face-get-text-to-glyphs-func" title="cairo_user_font_face_get_text_to_glyphs_func ()">cairo_user_font_face_get_text_to_glyphs_func</a>
|
91
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face);
|
92
|
+
</pre>
|
93
|
+
</div>
|
94
|
+
<div class="refsect1" lang="en">
|
95
|
+
<a name="cairo-user-font.description"></a><h2>Description</h2>
|
96
|
+
<p>
|
97
|
+
The user-font feature allows the cairo user to provide drawings for glyphs
|
98
|
+
in a font. This is most useful in implementing fonts in non-standard
|
99
|
+
formats, like SVG fonts and Flash fonts, but can also be used by games and
|
100
|
+
other application to draw "funky" fonts.
|
101
|
+
|
102
|
+
|
103
|
+
</p>
|
104
|
+
</div>
|
105
|
+
<div class="refsect1" lang="en">
|
106
|
+
<a name="cairo-user-font.details"></a><h2>Details</h2>
|
107
|
+
<div class="refsect2" lang="en">
|
108
|
+
<a name="CAIRO-HAS-USER-FONT:CAPS"></a><h3>CAIRO_HAS_USER_FONT</h3>
|
109
|
+
<pre class="programlisting">#define CAIRO_HAS_USER_FONT 1
|
110
|
+
</pre>
|
111
|
+
<p>
|
112
|
+
Defined if the user font backend is available.
|
113
|
+
This macro can be used to conditionally compile backend-specific code.
|
114
|
+
The user font backend is always built in versions of cairo that support
|
115
|
+
this feature (1.8 and later).
|
116
|
+
</p>
|
117
|
+
<p class="since">Since 1.8
|
118
|
+
|
119
|
+
|
120
|
+
</p>
|
121
|
+
</div>
|
122
|
+
<hr>
|
123
|
+
<div class="refsect2" lang="en">
|
124
|
+
<a name="cairo-user-scaled-font-init-func-t"></a><h3>cairo_user_scaled_font_init_func_t ()</h3>
|
125
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (*cairo_user_scaled_font_init_func_t)
|
126
|
+
(<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
|
127
|
+
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
128
|
+
<a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t">cairo_font_extents_t</a> *extents);</pre>
|
129
|
+
<p>
|
130
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-init-func-t" title="cairo_user_scaled_font_init_func_t ()"><span class="type">cairo_user_scaled_font_init_func_t</span></a> is the type of function which is
|
131
|
+
called when a scaled-font needs to be created for a user font-face.
|
132
|
+
</p>
|
133
|
+
<p>
|
134
|
+
The cairo context <em class="parameter"><code>cr</code></em> is not used by the caller, but is prepared in font
|
135
|
+
space, similar to what the cairo contexts passed to the render_glyph
|
136
|
+
method will look like. The callback can use this context for extents
|
137
|
+
computation for example. After the callback is called, <em class="parameter"><code>cr</code></em> is checked
|
138
|
+
for any error status.
|
139
|
+
</p>
|
140
|
+
<p>
|
141
|
+
The <em class="parameter"><code>extents</code></em> argument is where the user font sets the font extents for
|
142
|
+
<em class="parameter"><code>scaled_font</code></em>. It is in font space, which means that for most cases its
|
143
|
+
ascent and descent members should add to 1.0. <em class="parameter"><code>extents</code></em> is preset to
|
144
|
+
hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for
|
145
|
+
descent and max_y_advance members.
|
146
|
+
</p>
|
147
|
+
<p>
|
148
|
+
The callback is optional. If not set, default font extents as described
|
149
|
+
in the previous paragraph will be used.
|
150
|
+
</p>
|
151
|
+
<p>
|
152
|
+
Note that <em class="parameter"><code>scaled_font</code></em> is not fully initialized at this
|
153
|
+
point and trying to use it for text operations in the callback will result
|
154
|
+
in deadlock.</p>
|
155
|
+
<p>
|
156
|
+
|
157
|
+
</p>
|
158
|
+
<div class="variablelist"><table border="0">
|
159
|
+
<col align="left" valign="top">
|
160
|
+
<tbody>
|
161
|
+
<tr>
|
162
|
+
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
|
163
|
+
<td> the scaled-font being created
|
164
|
+
</td>
|
165
|
+
</tr>
|
166
|
+
<tr>
|
167
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
168
|
+
<td> a cairo context, in font space
|
169
|
+
</td>
|
170
|
+
</tr>
|
171
|
+
<tr>
|
172
|
+
<td><p><span class="term"><em class="parameter"><code>extents</code></em> :</span></p></td>
|
173
|
+
<td> font extents to fill in, in font space
|
174
|
+
</td>
|
175
|
+
</tr>
|
176
|
+
<tr>
|
177
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
178
|
+
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> upon success, or
|
179
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-USER-FONT-ERROR:CAPS"><code class="literal">CAIRO_STATUS_USER_FONT_ERROR</code></a> or any other error status on error.
|
180
|
+
|
181
|
+
</td>
|
182
|
+
</tr>
|
183
|
+
</tbody>
|
184
|
+
</table></div>
|
185
|
+
<p class="since">Since 1.8
|
186
|
+
</p>
|
187
|
+
</div>
|
188
|
+
<hr>
|
189
|
+
<div class="refsect2" lang="en">
|
190
|
+
<a name="cairo-user-scaled-font-render-glyph-func-t"></a><h3>cairo_user_scaled_font_render_glyph_func_t ()</h3>
|
191
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (*cairo_user_scaled_font_render_glyph_func_t)
|
192
|
+
(<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
|
193
|
+
unsigned long glyph,
|
194
|
+
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
195
|
+
<a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);</pre>
|
196
|
+
<p>
|
197
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-render-glyph-func-t" title="cairo_user_scaled_font_render_glyph_func_t ()"><span class="type">cairo_user_scaled_font_render_glyph_func_t</span></a> is the type of function which
|
198
|
+
is called when a user scaled-font needs to render a glyph.
|
199
|
+
</p>
|
200
|
+
<p>
|
201
|
+
The callback is mandatory, and expected to draw the glyph with code <em class="parameter"><code>glyph</code></em> to
|
202
|
+
the cairo context <em class="parameter"><code>cr</code></em>. <em class="parameter"><code>cr</code></em> is prepared such that the glyph drawing is done in
|
203
|
+
font space. That is, the matrix set on <em class="parameter"><code>cr</code></em> is the scale matrix of <em class="parameter"><code>scaled_font</code></em>,
|
204
|
+
The <em class="parameter"><code>extents</code></em> argument is where the user font sets the font extents for
|
205
|
+
<em class="parameter"><code>scaled_font</code></em>. However, if user prefers to draw in user space, they can
|
206
|
+
achieve that by changing the matrix on <em class="parameter"><code>cr</code></em>. All cairo rendering operations
|
207
|
+
to <em class="parameter"><code>cr</code></em> are permitted, however, the result is undefined if any source other
|
208
|
+
than the default source on <em class="parameter"><code>cr</code></em> is used. That means, glyph bitmaps should
|
209
|
+
be rendered using <a class="link" href="cairo-context.html#cairo-mask" title="cairo_mask ()"><code class="function">cairo_mask()</code></a> instead of <a class="link" href="cairo-context.html#cairo-paint" title="cairo_paint ()"><code class="function">cairo_paint()</code></a>.
|
210
|
+
</p>
|
211
|
+
<p>
|
212
|
+
Other non-default settings on <em class="parameter"><code>cr</code></em> include a font size of 1.0 (given that
|
213
|
+
it is set up to be in font space), and font options corresponding to
|
214
|
+
<em class="parameter"><code>scaled_font</code></em>.
|
215
|
+
</p>
|
216
|
+
<p>
|
217
|
+
The <em class="parameter"><code>extents</code></em> argument is preset to have <code class="literal">x_bearing</code>,
|
218
|
+
<code class="literal">width</code>, and <code class="literal">y_advance</code> of zero,
|
219
|
+
<code class="literal">y_bearing</code> set to <code class="literal">-font_extents.ascent</code>,
|
220
|
+
<code class="literal">height</code> to <code class="literal">font_extents.ascent+font_extents.descent</code>,
|
221
|
+
and <code class="literal">x_advance</code> to <code class="literal">font_extents.max_x_advance</code>.
|
222
|
+
The only field user needs to set in majority of cases is
|
223
|
+
<code class="literal">x_advance</code>.
|
224
|
+
If the <code class="literal">width</code> field is zero upon the callback returning
|
225
|
+
(which is its preset value), the glyph extents are automatically computed
|
226
|
+
based on the drawings done to <em class="parameter"><code>cr</code></em>. This is in most cases exactly what the
|
227
|
+
desired behavior is. However, if for any reason the callback sets the
|
228
|
+
extents, it must be ink extents, and include the extents of all drawing
|
229
|
+
done to <em class="parameter"><code>cr</code></em> in the callback.</p>
|
230
|
+
<p>
|
231
|
+
|
232
|
+
</p>
|
233
|
+
<div class="variablelist"><table border="0">
|
234
|
+
<col align="left" valign="top">
|
235
|
+
<tbody>
|
236
|
+
<tr>
|
237
|
+
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
|
238
|
+
<td> user scaled-font
|
239
|
+
</td>
|
240
|
+
</tr>
|
241
|
+
<tr>
|
242
|
+
<td><p><span class="term"><em class="parameter"><code>glyph</code></em> :</span></p></td>
|
243
|
+
<td> glyph code to render
|
244
|
+
</td>
|
245
|
+
</tr>
|
246
|
+
<tr>
|
247
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
248
|
+
<td> cairo context to draw to, in font space
|
249
|
+
</td>
|
250
|
+
</tr>
|
251
|
+
<tr>
|
252
|
+
<td><p><span class="term"><em class="parameter"><code>extents</code></em> :</span></p></td>
|
253
|
+
<td> glyph extents to fill in, in font space
|
254
|
+
</td>
|
255
|
+
</tr>
|
256
|
+
<tr>
|
257
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
258
|
+
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> upon success, or
|
259
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-USER-FONT-ERROR:CAPS"><code class="literal">CAIRO_STATUS_USER_FONT_ERROR</code></a> or any other error status on error.
|
260
|
+
|
261
|
+
</td>
|
262
|
+
</tr>
|
263
|
+
</tbody>
|
264
|
+
</table></div>
|
265
|
+
<p class="since">Since 1.8
|
266
|
+
</p>
|
267
|
+
</div>
|
268
|
+
<hr>
|
269
|
+
<div class="refsect2" lang="en">
|
270
|
+
<a name="cairo-user-scaled-font-text-to-glyphs-func-t"></a><h3>cairo_user_scaled_font_text_to_glyphs_func_t ()</h3>
|
271
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (*cairo_user_scaled_font_text_to_glyphs_func_t)
|
272
|
+
(<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
|
273
|
+
const char *utf8,
|
274
|
+
int utf8_len,
|
275
|
+
<a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> **glyphs,
|
276
|
+
int *num_glyphs,
|
277
|
+
<a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> **clusters,
|
278
|
+
int *num_clusters,
|
279
|
+
<a class="link" href="cairo-text.html#cairo-text-cluster-flags-t" title="enum cairo_text_cluster_flags_t">cairo_text_cluster_flags_t</a> *cluster_flags);</pre>
|
280
|
+
<p>
|
281
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-text-to-glyphs-func-t" title="cairo_user_scaled_font_text_to_glyphs_func_t ()"><span class="type">cairo_user_scaled_font_text_to_glyphs_func_t</span></a> is the type of function which
|
282
|
+
is called to convert input text to an array of glyphs. This is used by the
|
283
|
+
<a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a> operation.
|
284
|
+
</p>
|
285
|
+
<p>
|
286
|
+
Using this callback the user-font has full control on glyphs and their
|
287
|
+
positions. That means, it allows for features like ligatures and kerning,
|
288
|
+
as well as complex <em class="firstterm">shaping</em> required for scripts like
|
289
|
+
Arabic and Indic.
|
290
|
+
</p>
|
291
|
+
<p>
|
292
|
+
The <em class="parameter"><code>num_glyphs</code></em> argument is preset to -1. The callback should allocate an
|
293
|
+
array for the resulting glyphs (using <code class="function">malloc()</code>), and populate the glyph indices and
|
294
|
+
positions (in font space) assuming that the text is to be shown at the
|
295
|
+
origin. Cairo will free the glyph array when done with it, no matter what
|
296
|
+
the return value of the callback is.
|
297
|
+
</p>
|
298
|
+
<p>
|
299
|
+
If <em class="parameter"><code>glyphs</code></em> initially points to a non-<code class="literal">NULL</code> value, that array can be used
|
300
|
+
as a glyph buffer, and <em class="parameter"><code>num_glyphs</code></em> points to the number of glyph
|
301
|
+
entries available there. If the provided glyph array is too short for
|
302
|
+
the conversion (or for convenience), a new glyph array may be allocated
|
303
|
+
using <a class="link" href="cairo-text.html#cairo-glyph-allocate" title="cairo_glyph_allocate ()"><code class="function">cairo_glyph_allocate()</code></a> and placed in <em class="parameter"><code>glyphs</code></em>. Upon return,
|
304
|
+
<em class="parameter"><code>num_glyphs</code></em> should contain the number of generated glyphs.
|
305
|
+
If the value <em class="parameter"><code>glyphs</code></em> points at has changed after the call, cairo will
|
306
|
+
free the allocated glyph array using <a class="link" href="cairo-text.html#cairo-glyph-free" title="cairo_glyph_free ()"><code class="function">cairo_glyph_free()</code></a>.
|
307
|
+
</p>
|
308
|
+
<p>
|
309
|
+
If <em class="parameter"><code>clusters</code></em> is not <code class="literal">NULL</code>, <em class="parameter"><code>num_clusters</code></em> and <em class="parameter"><code>cluster_flags</code></em> are also non-<code class="literal">NULL</code>,
|
310
|
+
and cluster mapping should be computed.
|
311
|
+
The semantics of how cluster array allocation works is similar to the glyph
|
312
|
+
array. That is,
|
313
|
+
if <em class="parameter"><code>clusters</code></em> initially points to a non-<code class="literal">NULL</code> value, that array may be used
|
314
|
+
as a cluster buffer, and <em class="parameter"><code>num_clusters</code></em> points to the number of cluster
|
315
|
+
entries available there. If the provided cluster array is too short for
|
316
|
+
the conversion (or for convenience), a new cluster array may be allocated
|
317
|
+
using <a class="link" href="cairo-text.html#cairo-text-cluster-allocate" title="cairo_text_cluster_allocate ()"><code class="function">cairo_text_cluster_allocate()</code></a> and placed in <em class="parameter"><code>clusters</code></em>. Upon return,
|
318
|
+
<em class="parameter"><code>num_clusters</code></em> should contain the number of generated clusters.
|
319
|
+
If the value <em class="parameter"><code>clusters</code></em> points at has changed after the call, cairo will
|
320
|
+
free the allocated cluster array using <a class="link" href="cairo-text.html#cairo-text-cluster-free" title="cairo_text_cluster_free ()"><code class="function">cairo_text_cluster_free()</code></a>.
|
321
|
+
</p>
|
322
|
+
<p>
|
323
|
+
The callback is optional. If not set, or if <em class="parameter"><code>num_glyphs</code></em> is negative upon
|
324
|
+
the callback returning, the unicode_to_glyph callback
|
325
|
+
is tried. See <a class="link" href="cairo-user-font.html#cairo-user-scaled-font-unicode-to-glyph-func-t" title="cairo_user_scaled_font_unicode_to_glyph_func_t ()"><span class="type">cairo_user_scaled_font_unicode_to_glyph_func_t</span></a>.
|
326
|
+
</p>
|
327
|
+
<p>
|
328
|
+
Note: While cairo does not impose any limitation on glyph indices,
|
329
|
+
some applications may assume that a glyph index fits in a 16-bit
|
330
|
+
unsigned integer. As such, it is advised that user-fonts keep their
|
331
|
+
glyphs in the 0 to 65535 range. Furthermore, some applications may
|
332
|
+
assume that glyph 0 is a special glyph-not-found glyph. User-fonts
|
333
|
+
are advised to use glyph 0 for such purposes and do not use that
|
334
|
+
glyph value for other purposes.</p>
|
335
|
+
<p>
|
336
|
+
|
337
|
+
</p>
|
338
|
+
<div class="variablelist"><table border="0">
|
339
|
+
<col align="left" valign="top">
|
340
|
+
<tbody>
|
341
|
+
<tr>
|
342
|
+
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
|
343
|
+
<td> the scaled-font being created
|
344
|
+
</td>
|
345
|
+
</tr>
|
346
|
+
<tr>
|
347
|
+
<td><p><span class="term"><em class="parameter"><code>utf8</code></em> :</span></p></td>
|
348
|
+
<td> a string of text encoded in UTF-8
|
349
|
+
</td>
|
350
|
+
</tr>
|
351
|
+
<tr>
|
352
|
+
<td><p><span class="term"><em class="parameter"><code>utf8_len</code></em> :</span></p></td>
|
353
|
+
<td> length of <em class="parameter"><code>utf8</code></em> in bytes
|
354
|
+
</td>
|
355
|
+
</tr>
|
356
|
+
<tr>
|
357
|
+
<td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
|
358
|
+
<td> pointer to array of glyphs to fill, in font space
|
359
|
+
</td>
|
360
|
+
</tr>
|
361
|
+
<tr>
|
362
|
+
<td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em> :</span></p></td>
|
363
|
+
<td> pointer to number of glyphs
|
364
|
+
</td>
|
365
|
+
</tr>
|
366
|
+
<tr>
|
367
|
+
<td><p><span class="term"><em class="parameter"><code>clusters</code></em> :</span></p></td>
|
368
|
+
<td> pointer to array of cluster mapping information to fill, or <code class="literal">NULL</code>
|
369
|
+
</td>
|
370
|
+
</tr>
|
371
|
+
<tr>
|
372
|
+
<td><p><span class="term"><em class="parameter"><code>num_clusters</code></em> :</span></p></td>
|
373
|
+
<td> pointer to number of clusters
|
374
|
+
</td>
|
375
|
+
</tr>
|
376
|
+
<tr>
|
377
|
+
<td><p><span class="term"><em class="parameter"><code>cluster_flags</code></em> :</span></p></td>
|
378
|
+
<td> pointer to location to store cluster flags corresponding to the
|
379
|
+
output <em class="parameter"><code>clusters</code></em>
|
380
|
+
</td>
|
381
|
+
</tr>
|
382
|
+
<tr>
|
383
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
384
|
+
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> upon success, or
|
385
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-USER-FONT-ERROR:CAPS"><code class="literal">CAIRO_STATUS_USER_FONT_ERROR</code></a> or any other error status on error.
|
386
|
+
|
387
|
+
</td>
|
388
|
+
</tr>
|
389
|
+
</tbody>
|
390
|
+
</table></div>
|
391
|
+
<p class="since">Since 1.8
|
392
|
+
</p>
|
393
|
+
</div>
|
394
|
+
<hr>
|
395
|
+
<div class="refsect2" lang="en">
|
396
|
+
<a name="cairo-user-scaled-font-unicode-to-glyph-func-t"></a><h3>cairo_user_scaled_font_unicode_to_glyph_func_t ()</h3>
|
397
|
+
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a> (*cairo_user_scaled_font_unicode_to_glyph_func_t)
|
398
|
+
(<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
|
399
|
+
unsigned long unicode,
|
400
|
+
unsigned long *glyph_index);</pre>
|
401
|
+
<p>
|
402
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-unicode-to-glyph-func-t" title="cairo_user_scaled_font_unicode_to_glyph_func_t ()"><span class="type">cairo_user_scaled_font_unicode_to_glyph_func_t</span></a> is the type of function which
|
403
|
+
is called to convert an input Unicode character to a single glyph.
|
404
|
+
This is used by the <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a> operation.
|
405
|
+
</p>
|
406
|
+
<p>
|
407
|
+
This callback is used to provide the same functionality as the
|
408
|
+
text_to_glyphs callback does (see <a class="link" href="cairo-user-font.html#cairo-user-scaled-font-text-to-glyphs-func-t" title="cairo_user_scaled_font_text_to_glyphs_func_t ()"><span class="type">cairo_user_scaled_font_text_to_glyphs_func_t</span></a>)
|
409
|
+
but has much less control on the output,
|
410
|
+
in exchange for increased ease of use. The inherent assumption to using
|
411
|
+
this callback is that each character maps to one glyph, and that the
|
412
|
+
mapping is context independent. It also assumes that glyphs are positioned
|
413
|
+
according to their advance width. These mean no ligatures, kerning, or
|
414
|
+
complex scripts can be implemented using this callback.
|
415
|
+
</p>
|
416
|
+
<p>
|
417
|
+
The callback is optional, and only used if text_to_glyphs callback is not
|
418
|
+
set or fails to return glyphs. If this callback is not set, an identity
|
419
|
+
mapping from Unicode code-points to glyph indices is assumed.
|
420
|
+
</p>
|
421
|
+
<p>
|
422
|
+
Note: While cairo does not impose any limitation on glyph indices,
|
423
|
+
some applications may assume that a glyph index fits in a 16-bit
|
424
|
+
unsigned integer. As such, it is advised that user-fonts keep their
|
425
|
+
glyphs in the 0 to 65535 range. Furthermore, some applications may
|
426
|
+
assume that glyph 0 is a special glyph-not-found glyph. User-fonts
|
427
|
+
are advised to use glyph 0 for such purposes and do not use that
|
428
|
+
glyph value for other purposes.</p>
|
429
|
+
<p>
|
430
|
+
|
431
|
+
</p>
|
432
|
+
<div class="variablelist"><table border="0">
|
433
|
+
<col align="left" valign="top">
|
434
|
+
<tbody>
|
435
|
+
<tr>
|
436
|
+
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
|
437
|
+
<td> the scaled-font being created
|
438
|
+
</td>
|
439
|
+
</tr>
|
440
|
+
<tr>
|
441
|
+
<td><p><span class="term"><em class="parameter"><code>unicode</code></em> :</span></p></td>
|
442
|
+
<td> input unicode character code-point
|
443
|
+
</td>
|
444
|
+
</tr>
|
445
|
+
<tr>
|
446
|
+
<td><p><span class="term"><em class="parameter"><code>glyph_index</code></em> :</span></p></td>
|
447
|
+
<td> output glyph index
|
448
|
+
</td>
|
449
|
+
</tr>
|
450
|
+
<tr>
|
451
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
452
|
+
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> upon success, or
|
453
|
+
<a class="link" href="cairo-error-status.html#CAIRO-STATUS-USER-FONT-ERROR:CAPS"><code class="literal">CAIRO_STATUS_USER_FONT_ERROR</code></a> or any other error status on error.
|
454
|
+
|
455
|
+
</td>
|
456
|
+
</tr>
|
457
|
+
</tbody>
|
458
|
+
</table></div>
|
459
|
+
<p class="since">Since 1.8
|
460
|
+
</p>
|
461
|
+
</div>
|
462
|
+
<hr>
|
463
|
+
<div class="refsect2" lang="en">
|
464
|
+
<a name="cairo-user-font-face-create"></a><h3>cairo_user_font_face_create ()</h3>
|
465
|
+
<pre class="programlisting"><a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a>* cairo_user_font_face_create (void);</pre>
|
466
|
+
<p>
|
467
|
+
Creates a new user font-face.
|
468
|
+
</p>
|
469
|
+
<p>
|
470
|
+
Use the setter functions to associate callbacks with the returned
|
471
|
+
user font. The only mandatory callback is render_glyph.
|
472
|
+
</p>
|
473
|
+
<p>
|
474
|
+
After the font-face is created, the user can attach arbitrary data
|
475
|
+
(the actual font data) to it using <a class="link" href="cairo-font-face.html#cairo-font-face-set-user-data" title="cairo_font_face_set_user_data ()"><code class="function">cairo_font_face_set_user_data()</code></a>
|
476
|
+
and access it from the user-font callbacks by using
|
477
|
+
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-font-face" title="cairo_scaled_font_get_font_face ()"><code class="function">cairo_scaled_font_get_font_face()</code></a> followed by
|
478
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-get-user-data" title="cairo_font_face_get_user_data ()"><code class="function">cairo_font_face_get_user_data()</code></a>.</p>
|
479
|
+
<p>
|
480
|
+
|
481
|
+
</p>
|
482
|
+
<div class="variablelist"><table border="0">
|
483
|
+
<col align="left" valign="top">
|
484
|
+
<tbody><tr>
|
485
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
486
|
+
<td> a newly created <a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a>. Free with
|
487
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-destroy" title="cairo_font_face_destroy ()"><code class="function">cairo_font_face_destroy()</code></a> when you are done using it.
|
488
|
+
|
489
|
+
</td>
|
490
|
+
</tr></tbody>
|
491
|
+
</table></div>
|
492
|
+
<p class="since">Since 1.8
|
493
|
+
</p>
|
494
|
+
</div>
|
495
|
+
<hr>
|
496
|
+
<div class="refsect2" lang="en">
|
497
|
+
<a name="cairo-user-font-face-set-init-func"></a><h3>cairo_user_font_face_set_init_func ()</h3>
|
498
|
+
<pre class="programlisting">void cairo_user_font_face_set_init_func (<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
|
499
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-init-func-t" title="cairo_user_scaled_font_init_func_t ()">cairo_user_scaled_font_init_func_t</a> init_func);</pre>
|
500
|
+
<p>
|
501
|
+
Sets the scaled-font initialization function of a user-font.
|
502
|
+
See <a class="link" href="cairo-user-font.html#cairo-user-scaled-font-init-func-t" title="cairo_user_scaled_font_init_func_t ()"><span class="type">cairo_user_scaled_font_init_func_t</span></a> for details of how the callback
|
503
|
+
works.
|
504
|
+
</p>
|
505
|
+
<p>
|
506
|
+
The font-face should not be immutable or a <a class="link" href="cairo-error-status.html#CAIRO-STATUS-USER-FONT-IMMUTABLE:CAPS"><code class="literal">CAIRO_STATUS_USER_FONT_IMMUTABLE</code></a>
|
507
|
+
error will occur. A user font-face is immutable as soon as a scaled-font
|
508
|
+
is created from it.</p>
|
509
|
+
<p>
|
510
|
+
|
511
|
+
</p>
|
512
|
+
<div class="variablelist"><table border="0">
|
513
|
+
<col align="left" valign="top">
|
514
|
+
<tbody>
|
515
|
+
<tr>
|
516
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
517
|
+
<td> A user font face
|
518
|
+
</td>
|
519
|
+
</tr>
|
520
|
+
<tr>
|
521
|
+
<td><p><span class="term"><em class="parameter"><code>init_func</code></em> :</span></p></td>
|
522
|
+
<td> The init callback, or <code class="literal">NULL</code>
|
523
|
+
</td>
|
524
|
+
</tr>
|
525
|
+
</tbody>
|
526
|
+
</table></div>
|
527
|
+
<p class="since">Since 1.8
|
528
|
+
</p>
|
529
|
+
</div>
|
530
|
+
<hr>
|
531
|
+
<div class="refsect2" lang="en">
|
532
|
+
<a name="cairo-user-font-face-get-init-func"></a><h3>cairo_user_font_face_get_init_func ()</h3>
|
533
|
+
<pre class="programlisting"><a class="link" href="cairo-user-font.html#cairo-user-scaled-font-init-func-t" title="cairo_user_scaled_font_init_func_t ()">cairo_user_scaled_font_init_func_t</a> cairo_user_font_face_get_init_func
|
534
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face);</pre>
|
535
|
+
<p>
|
536
|
+
Gets the scaled-font initialization function of a user-font.</p>
|
537
|
+
<p>
|
538
|
+
|
539
|
+
</p>
|
540
|
+
<div class="variablelist"><table border="0">
|
541
|
+
<col align="left" valign="top">
|
542
|
+
<tbody>
|
543
|
+
<tr>
|
544
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
545
|
+
<td> A user font face
|
546
|
+
</td>
|
547
|
+
</tr>
|
548
|
+
<tr>
|
549
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
550
|
+
<td> The init callback of <em class="parameter"><code>font_face</code></em>
|
551
|
+
or <code class="literal">NULL</code> if none set.
|
552
|
+
|
553
|
+
</td>
|
554
|
+
</tr>
|
555
|
+
</tbody>
|
556
|
+
</table></div>
|
557
|
+
<p class="since">Since 1.8
|
558
|
+
</p>
|
559
|
+
</div>
|
560
|
+
<hr>
|
561
|
+
<div class="refsect2" lang="en">
|
562
|
+
<a name="cairo-user-font-face-set-render-glyph-func"></a><h3>cairo_user_font_face_set_render_glyph_func ()</h3>
|
563
|
+
<pre class="programlisting">void cairo_user_font_face_set_render_glyph_func
|
564
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
|
565
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-render-glyph-func-t" title="cairo_user_scaled_font_render_glyph_func_t ()">cairo_user_scaled_font_render_glyph_func_t</a> render_glyph_func);</pre>
|
566
|
+
<p>
|
567
|
+
Sets the glyph rendering function of a user-font.
|
568
|
+
See <a class="link" href="cairo-user-font.html#cairo-user-scaled-font-render-glyph-func-t" title="cairo_user_scaled_font_render_glyph_func_t ()"><span class="type">cairo_user_scaled_font_render_glyph_func_t</span></a> for details of how the callback
|
569
|
+
works.
|
570
|
+
</p>
|
571
|
+
<p>
|
572
|
+
The font-face should not be immutable or a <a class="link" href="cairo-error-status.html#CAIRO-STATUS-USER-FONT-IMMUTABLE:CAPS"><code class="literal">CAIRO_STATUS_USER_FONT_IMMUTABLE</code></a>
|
573
|
+
error will occur. A user font-face is immutable as soon as a scaled-font
|
574
|
+
is created from it.
|
575
|
+
</p>
|
576
|
+
<p>
|
577
|
+
The render_glyph callback is the only mandatory callback of a user-font.
|
578
|
+
If the callback is <code class="literal">NULL</code> and a glyph is tried to be rendered using
|
579
|
+
<em class="parameter"><code>font_face</code></em>, a <a class="link" href="cairo-error-status.html#CAIRO-STATUS-USER-FONT-ERROR:CAPS"><code class="literal">CAIRO_STATUS_USER_FONT_ERROR</code></a> will occur.</p>
|
580
|
+
<p>
|
581
|
+
|
582
|
+
</p>
|
583
|
+
<div class="variablelist"><table border="0">
|
584
|
+
<col align="left" valign="top">
|
585
|
+
<tbody>
|
586
|
+
<tr>
|
587
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
588
|
+
<td> A user font face
|
589
|
+
</td>
|
590
|
+
</tr>
|
591
|
+
<tr>
|
592
|
+
<td><p><span class="term"><em class="parameter"><code>render_glyph_func</code></em> :</span></p></td>
|
593
|
+
<td> The render_glyph callback, or <code class="literal">NULL</code>
|
594
|
+
</td>
|
595
|
+
</tr>
|
596
|
+
</tbody>
|
597
|
+
</table></div>
|
598
|
+
<p class="since">Since 1.8
|
599
|
+
</p>
|
600
|
+
</div>
|
601
|
+
<hr>
|
602
|
+
<div class="refsect2" lang="en">
|
603
|
+
<a name="cairo-user-font-face-get-render-glyph-func"></a><h3>cairo_user_font_face_get_render_glyph_func ()</h3>
|
604
|
+
<pre class="programlisting"><a class="link" href="cairo-user-font.html#cairo-user-scaled-font-render-glyph-func-t" title="cairo_user_scaled_font_render_glyph_func_t ()">cairo_user_scaled_font_render_glyph_func_t</a> cairo_user_font_face_get_render_glyph_func
|
605
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face);</pre>
|
606
|
+
<p>
|
607
|
+
Gets the glyph rendering function of a user-font.</p>
|
608
|
+
<p>
|
609
|
+
|
610
|
+
</p>
|
611
|
+
<div class="variablelist"><table border="0">
|
612
|
+
<col align="left" valign="top">
|
613
|
+
<tbody>
|
614
|
+
<tr>
|
615
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
616
|
+
<td> A user font face
|
617
|
+
</td>
|
618
|
+
</tr>
|
619
|
+
<tr>
|
620
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
621
|
+
<td> The render_glyph callback of <em class="parameter"><code>font_face</code></em>
|
622
|
+
or <code class="literal">NULL</code> if none set.
|
623
|
+
|
624
|
+
</td>
|
625
|
+
</tr>
|
626
|
+
</tbody>
|
627
|
+
</table></div>
|
628
|
+
<p class="since">Since 1.8
|
629
|
+
</p>
|
630
|
+
</div>
|
631
|
+
<hr>
|
632
|
+
<div class="refsect2" lang="en">
|
633
|
+
<a name="cairo-user-font-face-set-unicode-to-glyph-func"></a><h3>cairo_user_font_face_set_unicode_to_glyph_func ()</h3>
|
634
|
+
<pre class="programlisting">void cairo_user_font_face_set_unicode_to_glyph_func
|
635
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
|
636
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-unicode-to-glyph-func-t" title="cairo_user_scaled_font_unicode_to_glyph_func_t ()">cairo_user_scaled_font_unicode_to_glyph_func_t</a> unicode_to_glyph_func);</pre>
|
637
|
+
<p>
|
638
|
+
Sets the unicode-to-glyph conversion function of a user-font.
|
639
|
+
See <a class="link" href="cairo-user-font.html#cairo-user-scaled-font-unicode-to-glyph-func-t" title="cairo_user_scaled_font_unicode_to_glyph_func_t ()"><span class="type">cairo_user_scaled_font_unicode_to_glyph_func_t</span></a> for details of how the callback
|
640
|
+
works.
|
641
|
+
</p>
|
642
|
+
<p>
|
643
|
+
The font-face should not be immutable or a <a class="link" href="cairo-error-status.html#CAIRO-STATUS-USER-FONT-IMMUTABLE:CAPS"><code class="literal">CAIRO_STATUS_USER_FONT_IMMUTABLE</code></a>
|
644
|
+
error will occur. A user font-face is immutable as soon as a scaled-font
|
645
|
+
is created from it.</p>
|
646
|
+
<p>
|
647
|
+
|
648
|
+
</p>
|
649
|
+
<div class="variablelist"><table border="0">
|
650
|
+
<col align="left" valign="top">
|
651
|
+
<tbody>
|
652
|
+
<tr>
|
653
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
654
|
+
<td> A user font face
|
655
|
+
</td>
|
656
|
+
</tr>
|
657
|
+
<tr>
|
658
|
+
<td><p><span class="term"><em class="parameter"><code>unicode_to_glyph_func</code></em> :</span></p></td>
|
659
|
+
<td> The unicode_to_glyph callback, or <code class="literal">NULL</code>
|
660
|
+
</td>
|
661
|
+
</tr>
|
662
|
+
</tbody>
|
663
|
+
</table></div>
|
664
|
+
<p class="since">Since 1.8
|
665
|
+
</p>
|
666
|
+
</div>
|
667
|
+
<hr>
|
668
|
+
<div class="refsect2" lang="en">
|
669
|
+
<a name="cairo-user-font-face-get-unicode-to-glyph-func"></a><h3>cairo_user_font_face_get_unicode_to_glyph_func ()</h3>
|
670
|
+
<pre class="programlisting"><a class="link" href="cairo-user-font.html#cairo-user-scaled-font-unicode-to-glyph-func-t" title="cairo_user_scaled_font_unicode_to_glyph_func_t ()">cairo_user_scaled_font_unicode_to_glyph_func_t</a> cairo_user_font_face_get_unicode_to_glyph_func
|
671
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face);</pre>
|
672
|
+
<p>
|
673
|
+
Gets the unicode-to-glyph conversion function of a user-font.</p>
|
674
|
+
<p>
|
675
|
+
|
676
|
+
</p>
|
677
|
+
<div class="variablelist"><table border="0">
|
678
|
+
<col align="left" valign="top">
|
679
|
+
<tbody>
|
680
|
+
<tr>
|
681
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
682
|
+
<td> A user font face
|
683
|
+
</td>
|
684
|
+
</tr>
|
685
|
+
<tr>
|
686
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
687
|
+
<td> The unicode_to_glyph callback of <em class="parameter"><code>font_face</code></em>
|
688
|
+
or <code class="literal">NULL</code> if none set.
|
689
|
+
|
690
|
+
</td>
|
691
|
+
</tr>
|
692
|
+
</tbody>
|
693
|
+
</table></div>
|
694
|
+
<p class="since">Since 1.8
|
695
|
+
</p>
|
696
|
+
</div>
|
697
|
+
<hr>
|
698
|
+
<div class="refsect2" lang="en">
|
699
|
+
<a name="cairo-user-font-face-set-text-to-glyphs-func"></a><h3>cairo_user_font_face_set_text_to_glyphs_func ()</h3>
|
700
|
+
<pre class="programlisting">void cairo_user_font_face_set_text_to_glyphs_func
|
701
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
|
702
|
+
<a class="link" href="cairo-user-font.html#cairo-user-scaled-font-text-to-glyphs-func-t" title="cairo_user_scaled_font_text_to_glyphs_func_t ()">cairo_user_scaled_font_text_to_glyphs_func_t</a> text_to_glyphs_func);</pre>
|
703
|
+
<p>
|
704
|
+
Sets th text-to-glyphs conversion function of a user-font.
|
705
|
+
See <a class="link" href="cairo-user-font.html#cairo-user-scaled-font-text-to-glyphs-func-t" title="cairo_user_scaled_font_text_to_glyphs_func_t ()"><span class="type">cairo_user_scaled_font_text_to_glyphs_func_t</span></a> for details of how the callback
|
706
|
+
works.
|
707
|
+
</p>
|
708
|
+
<p>
|
709
|
+
The font-face should not be immutable or a <a class="link" href="cairo-error-status.html#CAIRO-STATUS-USER-FONT-IMMUTABLE:CAPS"><code class="literal">CAIRO_STATUS_USER_FONT_IMMUTABLE</code></a>
|
710
|
+
error will occur. A user font-face is immutable as soon as a scaled-font
|
711
|
+
is created from it.</p>
|
712
|
+
<p>
|
713
|
+
|
714
|
+
</p>
|
715
|
+
<div class="variablelist"><table border="0">
|
716
|
+
<col align="left" valign="top">
|
717
|
+
<tbody>
|
718
|
+
<tr>
|
719
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
720
|
+
<td> A user font face
|
721
|
+
</td>
|
722
|
+
</tr>
|
723
|
+
<tr>
|
724
|
+
<td><p><span class="term"><em class="parameter"><code>text_to_glyphs_func</code></em> :</span></p></td>
|
725
|
+
<td> The text_to_glyphs callback, or <code class="literal">NULL</code>
|
726
|
+
</td>
|
727
|
+
</tr>
|
728
|
+
</tbody>
|
729
|
+
</table></div>
|
730
|
+
<p class="since">Since 1.8
|
731
|
+
</p>
|
732
|
+
</div>
|
733
|
+
<hr>
|
734
|
+
<div class="refsect2" lang="en">
|
735
|
+
<a name="cairo-user-font-face-get-text-to-glyphs-func"></a><h3>cairo_user_font_face_get_text_to_glyphs_func ()</h3>
|
736
|
+
<pre class="programlisting"><a class="link" href="cairo-user-font.html#cairo-user-scaled-font-text-to-glyphs-func-t" title="cairo_user_scaled_font_text_to_glyphs_func_t ()">cairo_user_scaled_font_text_to_glyphs_func_t</a> cairo_user_font_face_get_text_to_glyphs_func
|
737
|
+
(<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face);</pre>
|
738
|
+
<p>
|
739
|
+
Gets the text-to-glyphs conversion function of a user-font.</p>
|
740
|
+
<p>
|
741
|
+
|
742
|
+
</p>
|
743
|
+
<div class="variablelist"><table border="0">
|
744
|
+
<col align="left" valign="top">
|
745
|
+
<tbody>
|
746
|
+
<tr>
|
747
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
748
|
+
<td> A user font face
|
749
|
+
</td>
|
750
|
+
</tr>
|
751
|
+
<tr>
|
752
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
753
|
+
<td> The text_to_glyphs callback of <em class="parameter"><code>font_face</code></em>
|
754
|
+
or <code class="literal">NULL</code> if none set.
|
755
|
+
|
756
|
+
</td>
|
757
|
+
</tr>
|
758
|
+
</tbody>
|
759
|
+
</table></div>
|
760
|
+
<p class="since">Since 1.8
|
761
|
+
</p>
|
762
|
+
</div>
|
763
|
+
</div>
|
764
|
+
</div>
|
765
|
+
<div class="footer">
|
766
|
+
<hr>
|
767
|
+
Generated by GTK-Doc V1.10</div>
|
768
|
+
</body>
|
769
|
+
</html>
|