cairo 1.8.3-x86-mingw32 → 1.8.4-x86-mingw32
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/NEWS +14 -0
- data/Rakefile +2 -2
- data/ext/cairo/rb_cairo.c +1 -1
- data/extconf.rb +11 -11
- data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/freetype6.dll +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/libcairo-2.dll +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/libfontconfig-1.dll +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/libpng14-14.dll +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/zlib1.dll +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/etc/fonts/fonts.conf +151 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-deprecated.h +138 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-features.h +20 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-ft.h +75 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-pdf.h +68 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-ps.h +114 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-svg.h +82 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-version.h +8 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-win32.h +112 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo.h +2328 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/libpng14/png.h +2701 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/libpng14/pngconf.h +1525 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/png.h +2701 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/pngconf.h +1525 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/zconf.h +461 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/include/zlib.h +1589 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/cairo.def +278 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/cairo.lib +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libcairo.dll.a +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libpng.def +192 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libpng.lib +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libpng14.dll.a +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libz.dll.a +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-ft.pc +12 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-pdf.pc +12 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-png.pc +12 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-ps.pc +12 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-svg.pc +12 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-win32-font.pc +12 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-win32.pc +12 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo.pc +13 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/libpng.pc +11 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/libpng14.pc +11 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/zdll.lib +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/zlib.def +67 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/cairo-dev_1.8.10-4_win32.mft +76 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/cairo_1.8.10-4_win32.mft +5 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/fontconfig_2.8.0-2_win32.mft +3 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/freetype_2.4.2-1_win32.mft +2 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/libpng-dev_1.4.3-1_win32.mft +15 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/libpng_1.4.3-1_win32.mft +2 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/zlib-dev_1.2.5-2_win32.mft +8 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/zlib_1.2.5-2_win32.mft +2 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/doc/cairo_1.8.10-4_win32/COPYING +32 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/doc/cairo_1.8.10-4_win32/COPYING-LGPL-2.1 +510 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/doc/cairo_1.8.10-4_win32/COPYING-MPL-1.1 +470 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-errors.html +132 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-fonts.html +63 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-memory.html +133 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-overloading.html +131 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-path.html +127 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-patterns.html +67 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-return-values.html +130 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-streams.html +102 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-surfaces.html +103 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-context.html +2643 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-drawing.html +57 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-error-status.html +360 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-font-face.html +408 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-font-options.html +678 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-fonts.html +63 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-ft-font.html +319 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-image-surface.html +473 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-matrix.html +596 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-paths.html +1274 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-pattern.html +1485 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-pdf-surface.html +238 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-png-functions.html +341 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-ps-surface.html +622 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-quartz-font.html +151 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-quartz-surface.html +219 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-scaled-font.html +1023 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-support.html +54 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-surface.html +1026 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-surfaces.html +69 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-svg-surface.html +321 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +1222 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-transformations.html +436 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-types.html +133 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-user-font.html +735 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-version-info.html +345 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-win32-font.html +358 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-win32-surface.html +312 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-xlib-surface.html +492 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp +417 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +542 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/home.png +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-1.2.html +141 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-1.4.html +109 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-1.6.html +71 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-1.8.html +107 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-all.html +759 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index.html +144 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index.sgml +478 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/language-bindings.html +83 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/left.png +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/right.png +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/style.css +167 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/up.png +0 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/man/man3/libpng.3 +4455 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/man/man3/libpngpf.3 +808 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/share/man/man5/png.5 +74 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/cairo_1.8.10-4_win32.log +920 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/cairo_1.8.10-4_win32.sh +76 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.log +272 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.sh +71 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.log +42 -0
- data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.sh +189 -0
- data/lib/1.8/cairo.so +0 -0
- data/lib/1.9/cairo.so +0 -0
- data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.8.7/fake.rb +0 -0
- data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.8.7/mkmf.rb +0 -0
- data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.8.7/rbconfig.rb +0 -0
- data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.9.2/fake.rb +0 -0
- data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.9.2/mkmf.rb +0 -0
- data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.9.2/rbconfig.rb +1 -1
- metadata +126 -40
data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-surfaces.html
ADDED
@@ -0,0 +1,69 @@
|
|
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>Surfaces</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
7
|
+
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="index.html" title="Cairo: A Vector Graphics Library">
|
9
|
+
<link rel="prev" href="cairo-user-font.html" title="User Fonts">
|
10
|
+
<link rel="next" href="cairo-surface.html" title="cairo_surface_t">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="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"><tr valign="middle">
|
26
|
+
<td><a accesskey="p" href="cairo-user-font.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
27
|
+
<td> </td>
|
28
|
+
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
29
|
+
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
|
30
|
+
<td><a accesskey="n" href="cairo-surface.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
31
|
+
</tr></table>
|
32
|
+
<div class="chapter" title="Surfaces">
|
33
|
+
<div class="titlepage"><div><div><h2 class="title">
|
34
|
+
<a name="cairo-surfaces"></a>Surfaces</h2></div></div></div>
|
35
|
+
<div class="toc"><dl>
|
36
|
+
<dt>
|
37
|
+
<span class="refentrytitle"><a href="cairo-surface.html">cairo_surface_t</a></span><span class="refpurpose"> — Base class for surfaces</span>
|
38
|
+
</dt>
|
39
|
+
<dt>
|
40
|
+
<span class="refentrytitle"><a href="cairo-image-surface.html">Image Surfaces</a></span><span class="refpurpose"> — Rendering to memory buffers</span>
|
41
|
+
</dt>
|
42
|
+
<dt>
|
43
|
+
<span class="refentrytitle"><a href="cairo-pdf-surface.html">PDF Surfaces</a></span><span class="refpurpose"> — Rendering PDF documents</span>
|
44
|
+
</dt>
|
45
|
+
<dt>
|
46
|
+
<span class="refentrytitle"><a href="cairo-png-functions.html">PNG Support</a></span><span class="refpurpose"> — Reading and writing PNG images</span>
|
47
|
+
</dt>
|
48
|
+
<dt>
|
49
|
+
<span class="refentrytitle"><a href="cairo-ps-surface.html">PostScript Surfaces</a></span><span class="refpurpose"> — Rendering PostScript documents</span>
|
50
|
+
</dt>
|
51
|
+
<dt>
|
52
|
+
<span class="refentrytitle"><a href="cairo-win32-surface.html">Win32 Surfaces</a></span><span class="refpurpose"> — Microsoft Windows surface support</span>
|
53
|
+
</dt>
|
54
|
+
<dt>
|
55
|
+
<span class="refentrytitle"><a href="cairo-svg-surface.html">SVG Surfaces</a></span><span class="refpurpose"> — Rendering SVG documents</span>
|
56
|
+
</dt>
|
57
|
+
<dt>
|
58
|
+
<span class="refentrytitle"><a href="cairo-quartz-surface.html">Quartz Surfaces</a></span><span class="refpurpose"> — Rendering to Quartz surfaces</span>
|
59
|
+
</dt>
|
60
|
+
<dt>
|
61
|
+
<span class="refentrytitle"><a href="cairo-xlib-surface.html">XLib Surfaces</a></span><span class="refpurpose"> — X Window System rendering using XLib</span>
|
62
|
+
</dt>
|
63
|
+
</dl></div>
|
64
|
+
</div>
|
65
|
+
<div class="footer">
|
66
|
+
<hr>
|
67
|
+
Generated by GTK-Doc V1.11</div>
|
68
|
+
</body>
|
69
|
+
</html>
|
data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-svg-surface.html
ADDED
@@ -0,0 +1,321 @@
|
|
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>SVG Surfaces</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
7
|
+
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="cairo-surfaces.html" title="Surfaces">
|
9
|
+
<link rel="prev" href="cairo-win32-surface.html" title="Win32 Surfaces">
|
10
|
+
<link rel="next" href="cairo-quartz-surface.html" title="Quartz Surfaces">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="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-win32-surface.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
28
|
+
<td><a accesskey="u" href="cairo-surfaces.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-quartz-surface.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
32
|
+
</tr>
|
33
|
+
<tr><td colspan="5" class="shortcuts">
|
34
|
+
<a href="#cairo-svg-surface.synopsis" class="shortcut">Top</a>
|
35
|
+
|
|
36
|
+
<a href="#cairo-svg-surface.description" class="shortcut">Description</a>
|
37
|
+
</td></tr>
|
38
|
+
</table>
|
39
|
+
<div class="refentry" title="SVG Surfaces">
|
40
|
+
<a name="cairo-svg-surface"></a><div class="titlepage"></div>
|
41
|
+
<div class="refnamediv"><table width="100%"><tr>
|
42
|
+
<td valign="top">
|
43
|
+
<h2><span class="refentrytitle"><a name="cairo-svg-surface.top_of_page"></a>SVG Surfaces</span></h2>
|
44
|
+
<p>SVG Surfaces — Rendering SVG documents</p>
|
45
|
+
</td>
|
46
|
+
<td valign="top" align="right"></td>
|
47
|
+
</tr></table></div>
|
48
|
+
<div class="refsynopsisdiv" title="Synopsis">
|
49
|
+
<a name="cairo-svg-surface.synopsis"></a><h2>Synopsis</h2>
|
50
|
+
<pre class="synopsis">
|
51
|
+
#define <a class="link" href="cairo-svg-surface.html#CAIRO-HAS-SVG-SURFACE--CAPS" title="CAIRO_HAS_SVG_SURFACE">CAIRO_HAS_SVG_SURFACE</a>
|
52
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> * <a class="link" href="cairo-svg-surface.html#cairo-svg-surface-create" title="cairo_svg_surface_create ()">cairo_svg_surface_create</a> (const char *filename,
|
53
|
+
double width_in_points,
|
54
|
+
double height_in_points);
|
55
|
+
<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> * <a class="link" href="cairo-svg-surface.html#cairo-svg-surface-create-for-stream" title="cairo_svg_surface_create_for_stream ()">cairo_svg_surface_create_for_stream</a> (<a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()">cairo_write_func_t</a> write_func,
|
56
|
+
void *closure,
|
57
|
+
double width_in_points,
|
58
|
+
double height_in_points);
|
59
|
+
void <a class="link" href="cairo-svg-surface.html#cairo-svg-surface-restrict-to-version" title="cairo_svg_surface_restrict_to_version ()">cairo_svg_surface_restrict_to_version</a>
|
60
|
+
(<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
61
|
+
<a class="link" href="cairo-svg-surface.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> version);
|
62
|
+
enum <a class="link" href="cairo-svg-surface.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a>;
|
63
|
+
void <a class="link" href="cairo-svg-surface.html#cairo-svg-get-versions" title="cairo_svg_get_versions ()">cairo_svg_get_versions</a> (<a class="link" href="cairo-svg-surface.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> const **versions,
|
64
|
+
int *num_versions);
|
65
|
+
const char * <a class="link" href="cairo-svg-surface.html#cairo-svg-version-to-string" title="cairo_svg_version_to_string ()">cairo_svg_version_to_string</a> (<a class="link" href="cairo-svg-surface.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> version);
|
66
|
+
</pre>
|
67
|
+
</div>
|
68
|
+
<div class="refsect1" title="Description">
|
69
|
+
<a name="cairo-svg-surface.description"></a><h2>Description</h2>
|
70
|
+
<p>
|
71
|
+
The SVG surface is used to render cairo graphics to
|
72
|
+
SVG files and is a multi-page vector surface backend.
|
73
|
+
</p>
|
74
|
+
</div>
|
75
|
+
<div class="refsect1" title="Details">
|
76
|
+
<a name="cairo-svg-surface.details"></a><h2>Details</h2>
|
77
|
+
<div class="refsect2" title="CAIRO_HAS_SVG_SURFACE">
|
78
|
+
<a name="CAIRO-HAS-SVG-SURFACE--CAPS"></a><h3>CAIRO_HAS_SVG_SURFACE</h3>
|
79
|
+
<pre class="programlisting">#define CAIRO_HAS_SVG_SURFACE 1
|
80
|
+
</pre>
|
81
|
+
<p>
|
82
|
+
Defined if the SVG surface backend is available.
|
83
|
+
This macro can be used to conditionally compile backend-specific code.
|
84
|
+
</p>
|
85
|
+
</div>
|
86
|
+
<hr>
|
87
|
+
<div class="refsect2" title="cairo_svg_surface_create ()">
|
88
|
+
<a name="cairo-svg-surface-create"></a><h3>cairo_svg_surface_create ()</h3>
|
89
|
+
<pre class="programlisting"><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> * cairo_svg_surface_create (const char *filename,
|
90
|
+
double width_in_points,
|
91
|
+
double height_in_points);</pre>
|
92
|
+
<p>
|
93
|
+
Creates a SVG surface of the specified size in points to be written
|
94
|
+
to <em class="parameter"><code>filename</code></em>.</p>
|
95
|
+
<p>
|
96
|
+
</p>
|
97
|
+
<div class="variablelist"><table border="0">
|
98
|
+
<col align="left" valign="top">
|
99
|
+
<tbody>
|
100
|
+
<tr>
|
101
|
+
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
102
|
+
<td> a filename for the SVG output (must be writable), <code class="literal">NULL</code> may be
|
103
|
+
used to specify no output. This will generate a SVG surface that
|
104
|
+
may be queried and used as a source, without generating a
|
105
|
+
temporary file.
|
106
|
+
</td>
|
107
|
+
</tr>
|
108
|
+
<tr>
|
109
|
+
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em> :</span></p></td>
|
110
|
+
<td> width of the surface, in points (1 point == 1/72.0 inch)
|
111
|
+
</td>
|
112
|
+
</tr>
|
113
|
+
<tr>
|
114
|
+
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em> :</span></p></td>
|
115
|
+
<td> height of the surface, in points (1 point == 1/72.0 inch)
|
116
|
+
</td>
|
117
|
+
</tr>
|
118
|
+
<tr>
|
119
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
120
|
+
<td> a pointer to the newly created surface. The caller
|
121
|
+
owns the surface and should call <a class="link" href="cairo-surface.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
|
122
|
+
with it.
|
123
|
+
|
124
|
+
This function always returns a valid pointer, but it will return a
|
125
|
+
pointer to a "nil" surface if an error such as out of memory
|
126
|
+
occurs. You can use <a class="link" href="cairo-surface.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.
|
127
|
+
|
128
|
+
</td>
|
129
|
+
</tr>
|
130
|
+
</tbody>
|
131
|
+
</table></div>
|
132
|
+
<p class="since">Since 1.2</p>
|
133
|
+
</div>
|
134
|
+
<hr>
|
135
|
+
<div class="refsect2" title="cairo_svg_surface_create_for_stream ()">
|
136
|
+
<a name="cairo-svg-surface-create-for-stream"></a><h3>cairo_svg_surface_create_for_stream ()</h3>
|
137
|
+
<pre class="programlisting"><a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> * cairo_svg_surface_create_for_stream (<a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()">cairo_write_func_t</a> write_func,
|
138
|
+
void *closure,
|
139
|
+
double width_in_points,
|
140
|
+
double height_in_points);</pre>
|
141
|
+
<p>
|
142
|
+
Creates a SVG surface of the specified size in points to be written
|
143
|
+
incrementally to the stream represented by <em class="parameter"><code>write_func</code></em> and <em class="parameter"><code>closure</code></em>.</p>
|
144
|
+
<p>
|
145
|
+
</p>
|
146
|
+
<div class="variablelist"><table border="0">
|
147
|
+
<col align="left" valign="top">
|
148
|
+
<tbody>
|
149
|
+
<tr>
|
150
|
+
<td><p><span class="term"><em class="parameter"><code>write_func</code></em> :</span></p></td>
|
151
|
+
<td> a <a class="link" href="cairo-png-functions.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> to accept the output data, may be <code class="literal">NULL</code>
|
152
|
+
to indicate a no-op <em class="parameter"><code>write_func</code></em>. With a no-op <em class="parameter"><code>write_func</code></em>,
|
153
|
+
the surface may be queried or used as a source without
|
154
|
+
generating any temporary files.
|
155
|
+
</td>
|
156
|
+
</tr>
|
157
|
+
<tr>
|
158
|
+
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
|
159
|
+
<td> the closure argument for <em class="parameter"><code>write_func</code></em>
|
160
|
+
</td>
|
161
|
+
</tr>
|
162
|
+
<tr>
|
163
|
+
<td><p><span class="term"><em class="parameter"><code>width_in_points</code></em> :</span></p></td>
|
164
|
+
<td> width of the surface, in points (1 point == 1/72.0 inch)
|
165
|
+
</td>
|
166
|
+
</tr>
|
167
|
+
<tr>
|
168
|
+
<td><p><span class="term"><em class="parameter"><code>height_in_points</code></em> :</span></p></td>
|
169
|
+
<td> height of the surface, in points (1 point == 1/72.0 inch)
|
170
|
+
</td>
|
171
|
+
</tr>
|
172
|
+
<tr>
|
173
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
174
|
+
<td> a pointer to the newly created surface. The caller
|
175
|
+
owns the surface and should call <a class="link" href="cairo-surface.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
|
176
|
+
with it.
|
177
|
+
|
178
|
+
This function always returns a valid pointer, but it will return a
|
179
|
+
pointer to a "nil" surface if an error such as out of memory
|
180
|
+
occurs. You can use <a class="link" href="cairo-surface.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.
|
181
|
+
|
182
|
+
</td>
|
183
|
+
</tr>
|
184
|
+
</tbody>
|
185
|
+
</table></div>
|
186
|
+
<p class="since">Since 1.2</p>
|
187
|
+
</div>
|
188
|
+
<hr>
|
189
|
+
<div class="refsect2" title="cairo_svg_surface_restrict_to_version ()">
|
190
|
+
<a name="cairo-svg-surface-restrict-to-version"></a><h3>cairo_svg_surface_restrict_to_version ()</h3>
|
191
|
+
<pre class="programlisting">void cairo_svg_surface_restrict_to_version
|
192
|
+
(<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface,
|
193
|
+
<a class="link" href="cairo-svg-surface.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> version);</pre>
|
194
|
+
<p>
|
195
|
+
Restricts the generated SVG file to <em class="parameter"><code>version</code></em>. See <a class="link" href="cairo-svg-surface.html#cairo-svg-get-versions" title="cairo_svg_get_versions ()"><code class="function">cairo_svg_get_versions()</code></a>
|
196
|
+
for a list of available version values that can be used here.
|
197
|
+
</p>
|
198
|
+
<p>
|
199
|
+
This function should only be called before any drawing operations
|
200
|
+
have been performed on the given surface. The simplest way to do
|
201
|
+
this is to call this function immediately after creating the
|
202
|
+
surface.</p>
|
203
|
+
<p>
|
204
|
+
</p>
|
205
|
+
<div class="variablelist"><table border="0">
|
206
|
+
<col align="left" valign="top">
|
207
|
+
<tbody>
|
208
|
+
<tr>
|
209
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
210
|
+
<td> a SVG <a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
211
|
+
</td>
|
212
|
+
</tr>
|
213
|
+
<tr>
|
214
|
+
<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
|
215
|
+
<td> SVG version
|
216
|
+
</td>
|
217
|
+
</tr>
|
218
|
+
</tbody>
|
219
|
+
</table></div>
|
220
|
+
<p class="since">Since 1.2</p>
|
221
|
+
</div>
|
222
|
+
<hr>
|
223
|
+
<div class="refsect2" title="enum cairo_svg_version_t">
|
224
|
+
<a name="cairo-svg-version-t"></a><h3>enum cairo_svg_version_t</h3>
|
225
|
+
<pre class="programlisting">typedef enum _cairo_svg_version {
|
226
|
+
CAIRO_SVG_VERSION_1_1,
|
227
|
+
CAIRO_SVG_VERSION_1_2
|
228
|
+
} cairo_svg_version_t;
|
229
|
+
</pre>
|
230
|
+
<p>
|
231
|
+
<a class="link" href="cairo-svg-surface.html#cairo-svg-version-t" title="enum cairo_svg_version_t"><span class="type">cairo_svg_version_t</span></a> is used to describe the version number of the SVG
|
232
|
+
specification that a generated SVG file will conform to.</p>
|
233
|
+
<p>
|
234
|
+
</p>
|
235
|
+
<div class="variablelist"><table border="0">
|
236
|
+
<col align="left" valign="top">
|
237
|
+
<tbody>
|
238
|
+
<tr>
|
239
|
+
<td><p><a name="CAIRO-SVG-VERSION-1-1--CAPS"></a><span class="term"><code class="literal">CAIRO_SVG_VERSION_1_1</code></span></p></td>
|
240
|
+
<td> The version 1.1 of the SVG specification.
|
241
|
+
</td>
|
242
|
+
</tr>
|
243
|
+
<tr>
|
244
|
+
<td><p><a name="CAIRO-SVG-VERSION-1-2--CAPS"></a><span class="term"><code class="literal">CAIRO_SVG_VERSION_1_2</code></span></p></td>
|
245
|
+
<td> The version 1.2 of the SVG specification.
|
246
|
+
</td>
|
247
|
+
</tr>
|
248
|
+
</tbody>
|
249
|
+
</table></div>
|
250
|
+
</div>
|
251
|
+
<hr>
|
252
|
+
<div class="refsect2" title="cairo_svg_get_versions ()">
|
253
|
+
<a name="cairo-svg-get-versions"></a><h3>cairo_svg_get_versions ()</h3>
|
254
|
+
<pre class="programlisting">void cairo_svg_get_versions (<a class="link" href="cairo-svg-surface.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> const **versions,
|
255
|
+
int *num_versions);</pre>
|
256
|
+
<p>
|
257
|
+
Used to retrieve the list of supported versions. See
|
258
|
+
<a class="link" href="cairo-svg-surface.html#cairo-svg-surface-restrict-to-version" title="cairo_svg_surface_restrict_to_version ()"><code class="function">cairo_svg_surface_restrict_to_version()</code></a>.</p>
|
259
|
+
<p>
|
260
|
+
</p>
|
261
|
+
<div class="variablelist"><table border="0">
|
262
|
+
<col align="left" valign="top">
|
263
|
+
<tbody>
|
264
|
+
<tr>
|
265
|
+
<td><p><span class="term"><em class="parameter"><code>versions</code></em> :</span></p></td>
|
266
|
+
<td> supported version list
|
267
|
+
</td>
|
268
|
+
</tr>
|
269
|
+
<tr>
|
270
|
+
<td><p><span class="term"><em class="parameter"><code>num_versions</code></em> :</span></p></td>
|
271
|
+
<td> list length
|
272
|
+
</td>
|
273
|
+
</tr>
|
274
|
+
</tbody>
|
275
|
+
</table></div>
|
276
|
+
<p class="since">Since 1.2</p>
|
277
|
+
</div>
|
278
|
+
<hr>
|
279
|
+
<div class="refsect2" title="cairo_svg_version_to_string ()">
|
280
|
+
<a name="cairo-svg-version-to-string"></a><h3>cairo_svg_version_to_string ()</h3>
|
281
|
+
<pre class="programlisting">const char * cairo_svg_version_to_string (<a class="link" href="cairo-svg-surface.html#cairo-svg-version-t" title="enum cairo_svg_version_t">cairo_svg_version_t</a> version);</pre>
|
282
|
+
<p>
|
283
|
+
Get the string representation of the given <em class="parameter"><code>version</code></em> id. This function
|
284
|
+
will return <code class="literal">NULL</code> if <em class="parameter"><code>version</code></em> isn't valid. See <a class="link" href="cairo-svg-surface.html#cairo-svg-get-versions" title="cairo_svg_get_versions ()"><code class="function">cairo_svg_get_versions()</code></a>
|
285
|
+
for a way to get the list of valid version ids.</p>
|
286
|
+
<p>
|
287
|
+
</p>
|
288
|
+
<div class="variablelist"><table border="0">
|
289
|
+
<col align="left" valign="top">
|
290
|
+
<tbody>
|
291
|
+
<tr>
|
292
|
+
<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
|
293
|
+
<td> a version id
|
294
|
+
</td>
|
295
|
+
</tr>
|
296
|
+
<tr>
|
297
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
298
|
+
<td> the string associated to given version.
|
299
|
+
|
300
|
+
</td>
|
301
|
+
</tr>
|
302
|
+
</tbody>
|
303
|
+
</table></div>
|
304
|
+
<p class="since">Since 1.2</p>
|
305
|
+
</div>
|
306
|
+
</div>
|
307
|
+
<div class="refsect1" title="See Also">
|
308
|
+
<a name="cairo-svg-surface.see-also"></a><h2>See Also</h2>
|
309
|
+
<p>
|
310
|
+
</p>
|
311
|
+
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">#<a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><code class="function">cairo_surface_t()</code></a>
|
312
|
+
</li></ul></div>
|
313
|
+
<p>
|
314
|
+
</p>
|
315
|
+
</div>
|
316
|
+
</div>
|
317
|
+
<div class="footer">
|
318
|
+
<hr>
|
319
|
+
Generated by GTK-Doc V1.11</div>
|
320
|
+
</body>
|
321
|
+
</html>
|
@@ -0,0 +1,1222 @@
|
|
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>Text</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
7
|
+
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="cairo-drawing.html" title="Drawing">
|
9
|
+
<link rel="prev" href="cairo-transformations.html" title="Transformations">
|
10
|
+
<link rel="next" href="cairo-fonts.html" title="Fonts">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="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-transformations.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
28
|
+
<td><a accesskey="u" href="cairo-drawing.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-fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
32
|
+
</tr>
|
33
|
+
<tr><td colspan="5" class="shortcuts">
|
34
|
+
<a href="#cairo-text.synopsis" class="shortcut">Top</a>
|
35
|
+
|
|
36
|
+
<a href="#cairo-text.description" class="shortcut">Description</a>
|
37
|
+
</td></tr>
|
38
|
+
</table>
|
39
|
+
<div class="refentry" title="Text">
|
40
|
+
<a name="cairo-text"></a><div class="titlepage"></div>
|
41
|
+
<div class="refnamediv"><table width="100%"><tr>
|
42
|
+
<td valign="top">
|
43
|
+
<h2><span class="refentrytitle"><a name="cairo-text.top_of_page"></a>Text</span></h2>
|
44
|
+
<p>Text — Rendering text and glyphs</p>
|
45
|
+
</td>
|
46
|
+
<td valign="top" align="right"></td>
|
47
|
+
</tr></table></div>
|
48
|
+
<div class="refsynopsisdiv" title="Synopsis">
|
49
|
+
<a name="cairo-text.synopsis"></a><h2>Synopsis</h2>
|
50
|
+
<pre class="synopsis">
|
51
|
+
<a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a>;
|
52
|
+
enum <a class="link" href="cairo-text.html#cairo-font-slant-t" title="enum cairo_font_slant_t">cairo_font_slant_t</a>;
|
53
|
+
enum <a class="link" href="cairo-text.html#cairo-font-weight-t" title="enum cairo_font_weight_t">cairo_font_weight_t</a>;
|
54
|
+
<a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a>;
|
55
|
+
enum <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>;
|
56
|
+
void <a class="link" href="cairo-text.html#cairo-select-font-face" title="cairo_select_font_face ()">cairo_select_font_face</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
57
|
+
const char *family,
|
58
|
+
<a class="link" href="cairo-text.html#cairo-font-slant-t" title="enum cairo_font_slant_t">cairo_font_slant_t</a> slant,
|
59
|
+
<a class="link" href="cairo-text.html#cairo-font-weight-t" title="enum cairo_font_weight_t">cairo_font_weight_t</a> weight);
|
60
|
+
void <a class="link" href="cairo-text.html#cairo-set-font-size" title="cairo_set_font_size ()">cairo_set_font_size</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
61
|
+
double size);
|
62
|
+
void <a class="link" href="cairo-text.html#cairo-set-font-matrix" title="cairo_set_font_matrix ()">cairo_set_font_matrix</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
63
|
+
const <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *matrix);
|
64
|
+
void <a class="link" href="cairo-text.html#cairo-get-font-matrix" title="cairo_get_font_matrix ()">cairo_get_font_matrix</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
65
|
+
<a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *matrix);
|
66
|
+
void <a class="link" href="cairo-text.html#cairo-set-font-options" title="cairo_set_font_options ()">cairo_set_font_options</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
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
|
+
void <a class="link" href="cairo-text.html#cairo-get-font-options" title="cairo_get_font_options ()">cairo_get_font_options</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
69
|
+
<a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
|
70
|
+
void <a class="link" href="cairo-text.html#cairo-set-font-face" title="cairo_set_font_face ()">cairo_set_font_face</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
71
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face);
|
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-text.html#cairo-get-font-face" title="cairo_get_font_face ()">cairo_get_font_face</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
73
|
+
void <a class="link" href="cairo-text.html#cairo-set-scaled-font" title="cairo_set_scaled_font ()">cairo_set_scaled_font</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
74
|
+
const <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);
|
75
|
+
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> * <a class="link" href="cairo-text.html#cairo-get-scaled-font" title="cairo_get_scaled_font ()">cairo_get_scaled_font</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);
|
76
|
+
void <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()">cairo_show_text</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
77
|
+
const char *utf8);
|
78
|
+
void <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()">cairo_show_glyphs</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
79
|
+
const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
|
80
|
+
int num_glyphs);
|
81
|
+
void <a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()">cairo_show_text_glyphs</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
82
|
+
const char *utf8,
|
83
|
+
int utf8_len,
|
84
|
+
const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
|
85
|
+
int num_glyphs,
|
86
|
+
const <a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> *clusters,
|
87
|
+
int num_clusters,
|
88
|
+
<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);
|
89
|
+
void <a class="link" href="cairo-text.html#cairo-font-extents" title="cairo_font_extents ()">cairo_font_extents</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
90
|
+
<a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t">cairo_font_extents_t</a> *extents);
|
91
|
+
void <a class="link" href="cairo-text.html#cairo-text-extents" title="cairo_text_extents ()">cairo_text_extents</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
92
|
+
const char *utf8,
|
93
|
+
<a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);
|
94
|
+
void <a class="link" href="cairo-text.html#cairo-glyph-extents" title="cairo_glyph_extents ()">cairo_glyph_extents</a> (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
95
|
+
const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
|
96
|
+
int num_glyphs,
|
97
|
+
<a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);
|
98
|
+
<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-text.html#cairo-toy-font-face-create" title="cairo_toy_font_face_create ()">cairo_toy_font_face_create</a> (const char *family,
|
99
|
+
<a class="link" href="cairo-text.html#cairo-font-slant-t" title="enum cairo_font_slant_t">cairo_font_slant_t</a> slant,
|
100
|
+
<a class="link" href="cairo-text.html#cairo-font-weight-t" title="enum cairo_font_weight_t">cairo_font_weight_t</a> weight);
|
101
|
+
const char * <a class="link" href="cairo-text.html#cairo-toy-font-face-get-family" title="cairo_toy_font_face_get_family ()">cairo_toy_font_face_get_family</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);
|
102
|
+
<a class="link" href="cairo-text.html#cairo-font-slant-t" title="enum cairo_font_slant_t">cairo_font_slant_t</a> <a class="link" href="cairo-text.html#cairo-toy-font-face-get-slant" title="cairo_toy_font_face_get_slant ()">cairo_toy_font_face_get_slant</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);
|
103
|
+
<a class="link" href="cairo-text.html#cairo-font-weight-t" title="enum cairo_font_weight_t">cairo_font_weight_t</a> <a class="link" href="cairo-text.html#cairo-toy-font-face-get-weight" title="cairo_toy_font_face_get_weight ()">cairo_toy_font_face_get_weight</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);
|
104
|
+
<a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> * <a class="link" href="cairo-text.html#cairo-glyph-allocate" title="cairo_glyph_allocate ()">cairo_glyph_allocate</a> (int num_glyphs);
|
105
|
+
void <a class="link" href="cairo-text.html#cairo-glyph-free" title="cairo_glyph_free ()">cairo_glyph_free</a> (<a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs);
|
106
|
+
<a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> * <a class="link" href="cairo-text.html#cairo-text-cluster-allocate" title="cairo_text_cluster_allocate ()">cairo_text_cluster_allocate</a> (int num_clusters);
|
107
|
+
void <a class="link" href="cairo-text.html#cairo-text-cluster-free" title="cairo_text_cluster_free ()">cairo_text_cluster_free</a> (<a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> *clusters);
|
108
|
+
</pre>
|
109
|
+
</div>
|
110
|
+
<div class="refsect1" title="Description">
|
111
|
+
<a name="cairo-text.description"></a><h2>Description</h2>
|
112
|
+
<p>
|
113
|
+
Cairo has two sets of text rendering capabilities:
|
114
|
+
</p>
|
115
|
+
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
116
|
+
<li class="listitem">
|
117
|
+
The functions with <span class="emphasis"><em>text</em></span> in their name form cairo's
|
118
|
+
<em class="firstterm">toy</em> text API. The toy API takes UTF-8 encoded
|
119
|
+
text and is limited in its functionality to rendering simple
|
120
|
+
left-to-right text with no advanced features. That means for example
|
121
|
+
that most complex scripts like Hebrew, Arabic, and Indic scripts are
|
122
|
+
out of question. No kerning or correct positioning of diacritical marks
|
123
|
+
either. The font selection is pretty limited too and doesn't handle the
|
124
|
+
case that the selected font does not cover the characters in the text.
|
125
|
+
This set of functions are really that, a toy text API, for testing and
|
126
|
+
demonstration purposes. Any serious application should avoid them.
|
127
|
+
</li>
|
128
|
+
<li class="listitem">
|
129
|
+
The functions with <span class="emphasis"><em>glyphs</em></span> in their name form cairo's
|
130
|
+
<em class="firstterm">low-level</em> text API. The low-level API relies on
|
131
|
+
the user to convert text to a set of glyph indexes and positions. This
|
132
|
+
is a very hard problem and is best handled by external libraries, like
|
133
|
+
the pangocairo that is part of the Pango text layout and rendering library.
|
134
|
+
Pango is available from <a class="ulink" href="http://www.pango.org/" target="_top">http://www.pango.org/</a>.
|
135
|
+
</li>
|
136
|
+
</ul></div>
|
137
|
+
<p>
|
138
|
+
</p>
|
139
|
+
</div>
|
140
|
+
<div class="refsect1" title="Details">
|
141
|
+
<a name="cairo-text.details"></a><h2>Details</h2>
|
142
|
+
<div class="refsect2" title="cairo_glyph_t">
|
143
|
+
<a name="cairo-glyph-t"></a><h3>cairo_glyph_t</h3>
|
144
|
+
<pre class="programlisting">typedef struct {
|
145
|
+
unsigned long index;
|
146
|
+
double x;
|
147
|
+
double y;
|
148
|
+
} cairo_glyph_t;
|
149
|
+
</pre>
|
150
|
+
<p>
|
151
|
+
The <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t"><span class="type">cairo_glyph_t</span></a> structure holds information about a single glyph
|
152
|
+
when drawing or measuring text. A font is (in simple terms) a
|
153
|
+
collection of shapes used to draw text. A glyph is one of these
|
154
|
+
shapes. There can be multiple glyphs for a single character
|
155
|
+
(alternates to be used in different contexts, for example), or a
|
156
|
+
glyph can be a <em class="firstterm">ligature</em> of multiple
|
157
|
+
characters. Cairo doesn't expose any way of converting input text
|
158
|
+
into glyphs, so in order to use the Cairo interfaces that take
|
159
|
+
arrays of glyphs, you must directly access the appropriate
|
160
|
+
underlying font system.
|
161
|
+
</p>
|
162
|
+
<p>
|
163
|
+
Note that the offsets given by <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> are not cumulative. When
|
164
|
+
drawing or measuring text, each glyph is individually positioned
|
165
|
+
with respect to the overall origin</p>
|
166
|
+
<p>
|
167
|
+
</p>
|
168
|
+
<div class="variablelist"><table border="0">
|
169
|
+
<col align="left" valign="top">
|
170
|
+
<tbody>
|
171
|
+
<tr>
|
172
|
+
<td><p><span class="term">unsigned long <em class="structfield"><code>index</code></em>;</span></p></td>
|
173
|
+
<td> glyph index in the font. The exact interpretation of the
|
174
|
+
glyph index depends on the font technology being used.
|
175
|
+
</td>
|
176
|
+
</tr>
|
177
|
+
<tr>
|
178
|
+
<td><p><span class="term">double <em class="structfield"><code>x</code></em>;</span></p></td>
|
179
|
+
<td> the offset in the X direction between the origin used for
|
180
|
+
drawing or measuring the string and the origin of this glyph.
|
181
|
+
</td>
|
182
|
+
</tr>
|
183
|
+
<tr>
|
184
|
+
<td><p><span class="term">double <em class="structfield"><code>y</code></em>;</span></p></td>
|
185
|
+
<td> the offset in the Y direction between the origin used for
|
186
|
+
drawing or measuring the string and the origin of this glyph.
|
187
|
+
</td>
|
188
|
+
</tr>
|
189
|
+
</tbody>
|
190
|
+
</table></div>
|
191
|
+
</div>
|
192
|
+
<hr>
|
193
|
+
<div class="refsect2" title="enum cairo_font_slant_t">
|
194
|
+
<a name="cairo-font-slant-t"></a><h3>enum cairo_font_slant_t</h3>
|
195
|
+
<pre class="programlisting">typedef enum _cairo_font_slant {
|
196
|
+
CAIRO_FONT_SLANT_NORMAL,
|
197
|
+
CAIRO_FONT_SLANT_ITALIC,
|
198
|
+
CAIRO_FONT_SLANT_OBLIQUE
|
199
|
+
} cairo_font_slant_t;
|
200
|
+
</pre>
|
201
|
+
<p>
|
202
|
+
Specifies variants of a font face based on their slant.</p>
|
203
|
+
<p>
|
204
|
+
</p>
|
205
|
+
<div class="variablelist"><table border="0">
|
206
|
+
<col align="left" valign="top">
|
207
|
+
<tbody>
|
208
|
+
<tr>
|
209
|
+
<td><p><a name="CAIRO-FONT-SLANT-NORMAL--CAPS"></a><span class="term"><code class="literal">CAIRO_FONT_SLANT_NORMAL</code></span></p></td>
|
210
|
+
<td> Upright font style
|
211
|
+
</td>
|
212
|
+
</tr>
|
213
|
+
<tr>
|
214
|
+
<td><p><a name="CAIRO-FONT-SLANT-ITALIC--CAPS"></a><span class="term"><code class="literal">CAIRO_FONT_SLANT_ITALIC</code></span></p></td>
|
215
|
+
<td> Italic font style
|
216
|
+
</td>
|
217
|
+
</tr>
|
218
|
+
<tr>
|
219
|
+
<td><p><a name="CAIRO-FONT-SLANT-OBLIQUE--CAPS"></a><span class="term"><code class="literal">CAIRO_FONT_SLANT_OBLIQUE</code></span></p></td>
|
220
|
+
<td> Oblique font style
|
221
|
+
</td>
|
222
|
+
</tr>
|
223
|
+
</tbody>
|
224
|
+
</table></div>
|
225
|
+
</div>
|
226
|
+
<hr>
|
227
|
+
<div class="refsect2" title="enum cairo_font_weight_t">
|
228
|
+
<a name="cairo-font-weight-t"></a><h3>enum cairo_font_weight_t</h3>
|
229
|
+
<pre class="programlisting">typedef enum _cairo_font_weight {
|
230
|
+
CAIRO_FONT_WEIGHT_NORMAL,
|
231
|
+
CAIRO_FONT_WEIGHT_BOLD
|
232
|
+
} cairo_font_weight_t;
|
233
|
+
</pre>
|
234
|
+
<p>
|
235
|
+
Specifies variants of a font face based on their weight.</p>
|
236
|
+
<p>
|
237
|
+
</p>
|
238
|
+
<div class="variablelist"><table border="0">
|
239
|
+
<col align="left" valign="top">
|
240
|
+
<tbody>
|
241
|
+
<tr>
|
242
|
+
<td><p><a name="CAIRO-FONT-WEIGHT-NORMAL--CAPS"></a><span class="term"><code class="literal">CAIRO_FONT_WEIGHT_NORMAL</code></span></p></td>
|
243
|
+
<td> Normal font weight
|
244
|
+
</td>
|
245
|
+
</tr>
|
246
|
+
<tr>
|
247
|
+
<td><p><a name="CAIRO-FONT-WEIGHT-BOLD--CAPS"></a><span class="term"><code class="literal">CAIRO_FONT_WEIGHT_BOLD</code></span></p></td>
|
248
|
+
<td> Bold font weight
|
249
|
+
</td>
|
250
|
+
</tr>
|
251
|
+
</tbody>
|
252
|
+
</table></div>
|
253
|
+
</div>
|
254
|
+
<hr>
|
255
|
+
<div class="refsect2" title="cairo_text_cluster_t">
|
256
|
+
<a name="cairo-text-cluster-t"></a><h3>cairo_text_cluster_t</h3>
|
257
|
+
<pre class="programlisting">typedef struct {
|
258
|
+
int num_bytes;
|
259
|
+
int num_glyphs;
|
260
|
+
} cairo_text_cluster_t;
|
261
|
+
</pre>
|
262
|
+
<p>
|
263
|
+
The <a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t"><span class="type">cairo_text_cluster_t</span></a> structure holds information about a single
|
264
|
+
<em class="firstterm">text cluster</em>. A text cluster is a minimal
|
265
|
+
mapping of some glyphs corresponding to some UTF-8 text.
|
266
|
+
</p>
|
267
|
+
<p>
|
268
|
+
For a cluster to be valid, both <em class="parameter"><code>num_bytes</code></em> and <em class="parameter"><code>num_glyphs</code></em> should
|
269
|
+
be non-negative, and at least one should be non-zero.
|
270
|
+
Note that clusters with zero glyphs are not as well supported as
|
271
|
+
normal clusters. For example, PDF rendering applications typically
|
272
|
+
ignore those clusters when PDF text is being selected.
|
273
|
+
</p>
|
274
|
+
<p>
|
275
|
+
See <a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()"><code class="function">cairo_show_text_glyphs()</code></a> for how clusters are used in advanced
|
276
|
+
text operations.</p>
|
277
|
+
<p>
|
278
|
+
</p>
|
279
|
+
<div class="variablelist"><table border="0">
|
280
|
+
<col align="left" valign="top">
|
281
|
+
<tbody>
|
282
|
+
<tr>
|
283
|
+
<td><p><span class="term">int <em class="structfield"><code>num_bytes</code></em>;</span></p></td>
|
284
|
+
<td> the number of bytes of UTF-8 text covered by cluster
|
285
|
+
</td>
|
286
|
+
</tr>
|
287
|
+
<tr>
|
288
|
+
<td><p><span class="term">int <em class="structfield"><code>num_glyphs</code></em>;</span></p></td>
|
289
|
+
<td> the number of glyphs covered by cluster
|
290
|
+
</td>
|
291
|
+
</tr>
|
292
|
+
</tbody>
|
293
|
+
</table></div>
|
294
|
+
<p class="since">Since 1.8</p>
|
295
|
+
</div>
|
296
|
+
<hr>
|
297
|
+
<div class="refsect2" title="enum cairo_text_cluster_flags_t">
|
298
|
+
<a name="cairo-text-cluster-flags-t"></a><h3>enum cairo_text_cluster_flags_t</h3>
|
299
|
+
<pre class="programlisting">typedef enum _cairo_text_cluster_flags {
|
300
|
+
CAIRO_TEXT_CLUSTER_FLAG_BACKWARD = 0x00000001
|
301
|
+
} cairo_text_cluster_flags_t;
|
302
|
+
</pre>
|
303
|
+
<p>
|
304
|
+
Specifies properties of a text cluster mapping.</p>
|
305
|
+
<p>
|
306
|
+
</p>
|
307
|
+
<div class="variablelist"><table border="0">
|
308
|
+
<col align="left" valign="top">
|
309
|
+
<tbody><tr>
|
310
|
+
<td><p><a name="CAIRO-TEXT-CLUSTER-FLAG-BACKWARD--CAPS"></a><span class="term"><code class="literal">CAIRO_TEXT_CLUSTER_FLAG_BACKWARD</code></span></p></td>
|
311
|
+
<td> The clusters in the cluster array
|
312
|
+
map to glyphs in the glyph array from end to start.
|
313
|
+
</td>
|
314
|
+
</tr></tbody>
|
315
|
+
</table></div>
|
316
|
+
<p class="since">Since 1.8</p>
|
317
|
+
</div>
|
318
|
+
<hr>
|
319
|
+
<div class="refsect2" title="cairo_select_font_face ()">
|
320
|
+
<a name="cairo-select-font-face"></a><h3>cairo_select_font_face ()</h3>
|
321
|
+
<pre class="programlisting">void cairo_select_font_face (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
322
|
+
const char *family,
|
323
|
+
<a class="link" href="cairo-text.html#cairo-font-slant-t" title="enum cairo_font_slant_t">cairo_font_slant_t</a> slant,
|
324
|
+
<a class="link" href="cairo-text.html#cairo-font-weight-t" title="enum cairo_font_weight_t">cairo_font_weight_t</a> weight);</pre>
|
325
|
+
<p>
|
326
|
+
Note: The <a class="link" href="cairo-text.html#cairo-select-font-face" title="cairo_select_font_face ()"><code class="function">cairo_select_font_face()</code></a> function call is part of what
|
327
|
+
the cairo designers call the "toy" text API. It is convenient for
|
328
|
+
short demos and simple programs, but it is not expected to be
|
329
|
+
adequate for serious text-using applications.
|
330
|
+
</p>
|
331
|
+
<p>
|
332
|
+
Selects a family and style of font from a simplified description as
|
333
|
+
a family name, slant and weight. Cairo provides no operation to
|
334
|
+
list available family names on the system (this is a "toy",
|
335
|
+
remember), but the standard CSS2 generic family names, ("serif",
|
336
|
+
"sans-serif", "cursive", "fantasy", "monospace"), are likely to
|
337
|
+
work as expected.
|
338
|
+
</p>
|
339
|
+
<p>
|
340
|
+
For "real" font selection, see the font-backend-specific
|
341
|
+
font_face_create functions for the font backend you are using. (For
|
342
|
+
example, if you are using the freetype-based cairo-ft font backend,
|
343
|
+
see <a class="link" href="cairo-ft-font.html#cairo-ft-font-face-create-for-ft-face" title="cairo_ft_font_face_create_for_ft_face ()"><code class="function">cairo_ft_font_face_create_for_ft_face()</code></a> or
|
344
|
+
<a class="link" href="cairo-ft-font.html#cairo-ft-font-face-create-for-pattern" title="cairo_ft_font_face_create_for_pattern ()"><code class="function">cairo_ft_font_face_create_for_pattern()</code></a>.) The resulting font face
|
345
|
+
could then be used with <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a> and
|
346
|
+
<a class="link" href="cairo-text.html#cairo-set-scaled-font" title="cairo_set_scaled_font ()"><code class="function">cairo_set_scaled_font()</code></a>.
|
347
|
+
</p>
|
348
|
+
<p>
|
349
|
+
Similarly, when using the "real" font support, you can call
|
350
|
+
directly into the underlying font system, (such as fontconfig or
|
351
|
+
freetype), for operations such as listing available fonts, etc.
|
352
|
+
</p>
|
353
|
+
<p>
|
354
|
+
It is expected that most applications will need to use a more
|
355
|
+
comprehensive font handling and text layout library, (for example,
|
356
|
+
pango), in conjunction with cairo.
|
357
|
+
</p>
|
358
|
+
<p>
|
359
|
+
If text is drawn without a call to <a class="link" href="cairo-text.html#cairo-select-font-face" title="cairo_select_font_face ()"><code class="function">cairo_select_font_face()</code></a>, (nor
|
360
|
+
<a class="link" href="cairo-text.html#cairo-set-font-face" title="cairo_set_font_face ()"><code class="function">cairo_set_font_face()</code></a> nor <a class="link" href="cairo-text.html#cairo-set-scaled-font" title="cairo_set_scaled_font ()"><code class="function">cairo_set_scaled_font()</code></a>), the default
|
361
|
+
family is platform-specific, but is essentially "sans-serif".
|
362
|
+
Default slant is <a class="link" href="cairo-text.html#CAIRO-FONT-SLANT-NORMAL--CAPS"><code class="literal">CAIRO_FONT_SLANT_NORMAL</code></a>, and default weight is
|
363
|
+
<a class="link" href="cairo-text.html#CAIRO-FONT-WEIGHT-NORMAL--CAPS"><code class="literal">CAIRO_FONT_WEIGHT_NORMAL</code></a>.
|
364
|
+
</p>
|
365
|
+
<p>
|
366
|
+
This function is equivalent to a call to <a class="link" href="cairo-text.html#cairo-toy-font-face-create" title="cairo_toy_font_face_create ()"><code class="function">cairo_toy_font_face_create()</code></a>
|
367
|
+
followed by <a class="link" href="cairo-text.html#cairo-set-font-face" title="cairo_set_font_face ()"><code class="function">cairo_set_font_face()</code></a>.</p>
|
368
|
+
<p>
|
369
|
+
</p>
|
370
|
+
<div class="variablelist"><table border="0">
|
371
|
+
<col align="left" valign="top">
|
372
|
+
<tbody>
|
373
|
+
<tr>
|
374
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
375
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
376
|
+
</td>
|
377
|
+
</tr>
|
378
|
+
<tr>
|
379
|
+
<td><p><span class="term"><em class="parameter"><code>family</code></em> :</span></p></td>
|
380
|
+
<td> a font family name, encoded in UTF-8
|
381
|
+
</td>
|
382
|
+
</tr>
|
383
|
+
<tr>
|
384
|
+
<td><p><span class="term"><em class="parameter"><code>slant</code></em> :</span></p></td>
|
385
|
+
<td> the slant for the font
|
386
|
+
</td>
|
387
|
+
</tr>
|
388
|
+
<tr>
|
389
|
+
<td><p><span class="term"><em class="parameter"><code>weight</code></em> :</span></p></td>
|
390
|
+
<td> the weight for the font
|
391
|
+
</td>
|
392
|
+
</tr>
|
393
|
+
</tbody>
|
394
|
+
</table></div>
|
395
|
+
</div>
|
396
|
+
<hr>
|
397
|
+
<div class="refsect2" title="cairo_set_font_size ()">
|
398
|
+
<a name="cairo-set-font-size"></a><h3>cairo_set_font_size ()</h3>
|
399
|
+
<pre class="programlisting">void cairo_set_font_size (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
400
|
+
double size);</pre>
|
401
|
+
<p>
|
402
|
+
Sets the current font matrix to a scale by a factor of <em class="parameter"><code>size</code></em>, replacing
|
403
|
+
any font matrix previously set with <a class="link" href="cairo-text.html#cairo-set-font-size" title="cairo_set_font_size ()"><code class="function">cairo_set_font_size()</code></a> or
|
404
|
+
<a class="link" href="cairo-text.html#cairo-set-font-matrix" title="cairo_set_font_matrix ()"><code class="function">cairo_set_font_matrix()</code></a>. This results in a font size of <em class="parameter"><code>size</code></em> user space
|
405
|
+
units. (More precisely, this matrix will result in the font's
|
406
|
+
em-square being a <em class="parameter"><code>size</code></em> by <em class="parameter"><code>size</code></em> square in user space.)
|
407
|
+
</p>
|
408
|
+
<p>
|
409
|
+
If text is drawn without a call to <a class="link" href="cairo-text.html#cairo-set-font-size" title="cairo_set_font_size ()"><code class="function">cairo_set_font_size()</code></a>, (nor
|
410
|
+
<a class="link" href="cairo-text.html#cairo-set-font-matrix" title="cairo_set_font_matrix ()"><code class="function">cairo_set_font_matrix()</code></a> nor <a class="link" href="cairo-text.html#cairo-set-scaled-font" title="cairo_set_scaled_font ()"><code class="function">cairo_set_scaled_font()</code></a>), the default
|
411
|
+
font size is 10.0.</p>
|
412
|
+
<p>
|
413
|
+
</p>
|
414
|
+
<div class="variablelist"><table border="0">
|
415
|
+
<col align="left" valign="top">
|
416
|
+
<tbody>
|
417
|
+
<tr>
|
418
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
419
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
420
|
+
</td>
|
421
|
+
</tr>
|
422
|
+
<tr>
|
423
|
+
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
|
424
|
+
<td> the new font size, in user space units
|
425
|
+
</td>
|
426
|
+
</tr>
|
427
|
+
</tbody>
|
428
|
+
</table></div>
|
429
|
+
</div>
|
430
|
+
<hr>
|
431
|
+
<div class="refsect2" title="cairo_set_font_matrix ()">
|
432
|
+
<a name="cairo-set-font-matrix"></a><h3>cairo_set_font_matrix ()</h3>
|
433
|
+
<pre class="programlisting">void cairo_set_font_matrix (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
434
|
+
const <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *matrix);</pre>
|
435
|
+
<p>
|
436
|
+
Sets the current font matrix to <em class="parameter"><code>matrix</code></em>. The font matrix gives a
|
437
|
+
transformation from the design space of the font (in this space,
|
438
|
+
the em-square is 1 unit by 1 unit) to user space. Normally, a
|
439
|
+
simple scale is used (see <a class="link" href="cairo-text.html#cairo-set-font-size" title="cairo_set_font_size ()"><code class="function">cairo_set_font_size()</code></a>), but a more
|
440
|
+
complex font matrix can be used to shear the font
|
441
|
+
or stretch it unequally along the two axes</p>
|
442
|
+
<p>
|
443
|
+
</p>
|
444
|
+
<div class="variablelist"><table border="0">
|
445
|
+
<col align="left" valign="top">
|
446
|
+
<tbody>
|
447
|
+
<tr>
|
448
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
449
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
450
|
+
</td>
|
451
|
+
</tr>
|
452
|
+
<tr>
|
453
|
+
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
|
454
|
+
<td> a <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> describing a transform to be applied to
|
455
|
+
the current font.
|
456
|
+
</td>
|
457
|
+
</tr>
|
458
|
+
</tbody>
|
459
|
+
</table></div>
|
460
|
+
</div>
|
461
|
+
<hr>
|
462
|
+
<div class="refsect2" title="cairo_get_font_matrix ()">
|
463
|
+
<a name="cairo-get-font-matrix"></a><h3>cairo_get_font_matrix ()</h3>
|
464
|
+
<pre class="programlisting">void cairo_get_font_matrix (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
465
|
+
<a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *matrix);</pre>
|
466
|
+
<p>
|
467
|
+
Stores the current font matrix into <em class="parameter"><code>matrix</code></em>. See
|
468
|
+
<a class="link" href="cairo-text.html#cairo-set-font-matrix" title="cairo_set_font_matrix ()"><code class="function">cairo_set_font_matrix()</code></a>.</p>
|
469
|
+
<p>
|
470
|
+
</p>
|
471
|
+
<div class="variablelist"><table border="0">
|
472
|
+
<col align="left" valign="top">
|
473
|
+
<tbody>
|
474
|
+
<tr>
|
475
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
476
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
477
|
+
</td>
|
478
|
+
</tr>
|
479
|
+
<tr>
|
480
|
+
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
|
481
|
+
<td> return value for the matrix
|
482
|
+
</td>
|
483
|
+
</tr>
|
484
|
+
</tbody>
|
485
|
+
</table></div>
|
486
|
+
</div>
|
487
|
+
<hr>
|
488
|
+
<div class="refsect2" title="cairo_set_font_options ()">
|
489
|
+
<a name="cairo-set-font-options"></a><h3>cairo_set_font_options ()</h3>
|
490
|
+
<pre class="programlisting">void cairo_set_font_options (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
491
|
+
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>
|
492
|
+
<p>
|
493
|
+
Sets a set of custom font rendering options for the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.
|
494
|
+
Rendering options are derived by merging these options with the
|
495
|
+
options derived from underlying surface; if the value in <em class="parameter"><code>options</code></em>
|
496
|
+
has a default value (like <a class="link" href="cairo-context.html#CAIRO-ANTIALIAS-DEFAULT--CAPS"><code class="literal">CAIRO_ANTIALIAS_DEFAULT</code></a>), then the value
|
497
|
+
from the surface is used.</p>
|
498
|
+
<p>
|
499
|
+
</p>
|
500
|
+
<div class="variablelist"><table border="0">
|
501
|
+
<col align="left" valign="top">
|
502
|
+
<tbody>
|
503
|
+
<tr>
|
504
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
505
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
506
|
+
</td>
|
507
|
+
</tr>
|
508
|
+
<tr>
|
509
|
+
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
|
510
|
+
<td> font options to use
|
511
|
+
</td>
|
512
|
+
</tr>
|
513
|
+
</tbody>
|
514
|
+
</table></div>
|
515
|
+
</div>
|
516
|
+
<hr>
|
517
|
+
<div class="refsect2" title="cairo_get_font_options ()">
|
518
|
+
<a name="cairo-get-font-options"></a><h3>cairo_get_font_options ()</h3>
|
519
|
+
<pre class="programlisting">void cairo_get_font_options (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
520
|
+
<a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
|
521
|
+
<p>
|
522
|
+
Retrieves font rendering options set via <a class="link" href="cairo-text.html#cairo-set-font-options" title="cairo_set_font_options ()"><span class="type">cairo_set_font_options</span></a>.
|
523
|
+
Note that the returned options do not include any options derived
|
524
|
+
from the underlying surface; they are literally the options
|
525
|
+
passed to <a class="link" href="cairo-text.html#cairo-set-font-options" title="cairo_set_font_options ()"><code class="function">cairo_set_font_options()</code></a>.</p>
|
526
|
+
<p>
|
527
|
+
</p>
|
528
|
+
<div class="variablelist"><table border="0">
|
529
|
+
<col align="left" valign="top">
|
530
|
+
<tbody>
|
531
|
+
<tr>
|
532
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
533
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
534
|
+
</td>
|
535
|
+
</tr>
|
536
|
+
<tr>
|
537
|
+
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
|
538
|
+
<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> object into which to store
|
539
|
+
the retrieved options. All existing values are overwritten
|
540
|
+
</td>
|
541
|
+
</tr>
|
542
|
+
</tbody>
|
543
|
+
</table></div>
|
544
|
+
</div>
|
545
|
+
<hr>
|
546
|
+
<div class="refsect2" title="cairo_set_font_face ()">
|
547
|
+
<a name="cairo-set-font-face"></a><h3>cairo_set_font_face ()</h3>
|
548
|
+
<pre class="programlisting">void cairo_set_font_face (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
549
|
+
<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>
|
550
|
+
<p>
|
551
|
+
Replaces the current <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> object in the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> with
|
552
|
+
<em class="parameter"><code>font_face</code></em>. The replaced font face in the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> will be
|
553
|
+
destroyed if there are no other references to it.</p>
|
554
|
+
<p>
|
555
|
+
</p>
|
556
|
+
<div class="variablelist"><table border="0">
|
557
|
+
<col align="left" valign="top">
|
558
|
+
<tbody>
|
559
|
+
<tr>
|
560
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
561
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
562
|
+
</td>
|
563
|
+
</tr>
|
564
|
+
<tr>
|
565
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
566
|
+
<td> a <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>, or <code class="literal">NULL</code> to restore to the default font
|
567
|
+
</td>
|
568
|
+
</tr>
|
569
|
+
</tbody>
|
570
|
+
</table></div>
|
571
|
+
</div>
|
572
|
+
<hr>
|
573
|
+
<div class="refsect2" title="cairo_get_font_face ()">
|
574
|
+
<a name="cairo-get-font-face"></a><h3>cairo_get_font_face ()</h3>
|
575
|
+
<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_get_font_face (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
576
|
+
<p>
|
577
|
+
Gets the current font face for a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.</p>
|
578
|
+
<p>
|
579
|
+
</p>
|
580
|
+
<div class="variablelist"><table border="0">
|
581
|
+
<col align="left" valign="top">
|
582
|
+
<tbody>
|
583
|
+
<tr>
|
584
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
585
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
586
|
+
</td>
|
587
|
+
</tr>
|
588
|
+
<tr>
|
589
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
590
|
+
<td> the current font face. This object is owned by
|
591
|
+
cairo. To keep a reference to it, you must call
|
592
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-reference" title="cairo_font_face_reference ()"><code class="function">cairo_font_face_reference()</code></a>.
|
593
|
+
|
594
|
+
This function never returns <code class="literal">NULL</code>. If memory cannot be allocated, a
|
595
|
+
special "nil" <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> object will be returned on which
|
596
|
+
<a class="link" href="cairo-font-face.html#cairo-font-face-status" title="cairo_font_face_status ()"><code class="function">cairo_font_face_status()</code></a> returns <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-MEMORY--CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. Using
|
597
|
+
this nil object will cause its error state to propagate to other
|
598
|
+
objects it is passed to, (for example, calling
|
599
|
+
<a class="link" href="cairo-text.html#cairo-set-font-face" title="cairo_set_font_face ()"><code class="function">cairo_set_font_face()</code></a> with a nil font will trigger an error that
|
600
|
+
will shutdown the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> object).
|
601
|
+
</td>
|
602
|
+
</tr>
|
603
|
+
</tbody>
|
604
|
+
</table></div>
|
605
|
+
</div>
|
606
|
+
<hr>
|
607
|
+
<div class="refsect2" title="cairo_set_scaled_font ()">
|
608
|
+
<a name="cairo-set-scaled-font"></a><h3>cairo_set_scaled_font ()</h3>
|
609
|
+
<pre class="programlisting">void cairo_set_scaled_font (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
610
|
+
const <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);</pre>
|
611
|
+
<p>
|
612
|
+
Replaces the current font face, font matrix, and font options in
|
613
|
+
the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> with those of the <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>. Except for
|
614
|
+
some translation, the current CTM of the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> should be the
|
615
|
+
same as that of the <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>, which can be accessed
|
616
|
+
using <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-ctm" title="cairo_scaled_font_get_ctm ()"><code class="function">cairo_scaled_font_get_ctm()</code></a>.</p>
|
617
|
+
<p>
|
618
|
+
</p>
|
619
|
+
<div class="variablelist"><table border="0">
|
620
|
+
<col align="left" valign="top">
|
621
|
+
<tbody>
|
622
|
+
<tr>
|
623
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
624
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
625
|
+
</td>
|
626
|
+
</tr>
|
627
|
+
<tr>
|
628
|
+
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
|
629
|
+
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
|
630
|
+
</td>
|
631
|
+
</tr>
|
632
|
+
</tbody>
|
633
|
+
</table></div>
|
634
|
+
<p class="since">Since 1.2</p>
|
635
|
+
</div>
|
636
|
+
<hr>
|
637
|
+
<div class="refsect2" title="cairo_get_scaled_font ()">
|
638
|
+
<a name="cairo-get-scaled-font"></a><h3>cairo_get_scaled_font ()</h3>
|
639
|
+
<pre class="programlisting"><a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> * cairo_get_scaled_font (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr);</pre>
|
640
|
+
<p>
|
641
|
+
Gets the current scaled font for a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.</p>
|
642
|
+
<p>
|
643
|
+
</p>
|
644
|
+
<div class="variablelist"><table border="0">
|
645
|
+
<col align="left" valign="top">
|
646
|
+
<tbody>
|
647
|
+
<tr>
|
648
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
649
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
650
|
+
</td>
|
651
|
+
</tr>
|
652
|
+
<tr>
|
653
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
654
|
+
<td> the current scaled font. This object is owned by
|
655
|
+
cairo. To keep a reference to it, you must call
|
656
|
+
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-reference" title="cairo_scaled_font_reference ()"><code class="function">cairo_scaled_font_reference()</code></a>.
|
657
|
+
|
658
|
+
This function never returns <code class="literal">NULL</code>. If memory cannot be allocated, a
|
659
|
+
special "nil" <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> object will be returned on which
|
660
|
+
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-status" title="cairo_scaled_font_status ()"><code class="function">cairo_scaled_font_status()</code></a> returns <a class="link" href="cairo-error-status.html#CAIRO-STATUS-NO-MEMORY--CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. Using
|
661
|
+
this nil object will cause its error state to propagate to other
|
662
|
+
objects it is passed to, (for example, calling
|
663
|
+
<a class="link" href="cairo-text.html#cairo-set-scaled-font" title="cairo_set_scaled_font ()"><code class="function">cairo_set_scaled_font()</code></a> with a nil font will trigger an error that
|
664
|
+
will shutdown the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> object).
|
665
|
+
|
666
|
+
</td>
|
667
|
+
</tr>
|
668
|
+
</tbody>
|
669
|
+
</table></div>
|
670
|
+
<p class="since">Since 1.4</p>
|
671
|
+
</div>
|
672
|
+
<hr>
|
673
|
+
<div class="refsect2" title="cairo_show_text ()">
|
674
|
+
<a name="cairo-show-text"></a><h3>cairo_show_text ()</h3>
|
675
|
+
<pre class="programlisting">void cairo_show_text (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
676
|
+
const char *utf8);</pre>
|
677
|
+
<p>
|
678
|
+
A drawing operator that generates the shape from a string of UTF-8
|
679
|
+
characters, rendered according to the current font_face, font_size
|
680
|
+
(font_matrix), and font_options.
|
681
|
+
</p>
|
682
|
+
<p>
|
683
|
+
This function first computes a set of glyphs for the string of
|
684
|
+
text. The first glyph is placed so that its origin is at the
|
685
|
+
current point. The origin of each subsequent glyph is offset from
|
686
|
+
that of the previous glyph by the advance values of the previous
|
687
|
+
glyph.
|
688
|
+
</p>
|
689
|
+
<p>
|
690
|
+
After this call the current point is moved to the origin of where
|
691
|
+
the next glyph would be placed in this same progression. That is,
|
692
|
+
the current point will be at the origin of the final glyph offset
|
693
|
+
by its advance values. This allows for easy display of a single
|
694
|
+
logical string with multiple calls to <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.
|
695
|
+
</p>
|
696
|
+
<p>
|
697
|
+
Note: The <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a> function call is part of what the cairo
|
698
|
+
designers call the "toy" text API. It is convenient for short demos
|
699
|
+
and simple programs, but it is not expected to be adequate for
|
700
|
+
serious text-using applications. See <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a> for the
|
701
|
+
"real" text display API in cairo.</p>
|
702
|
+
<p>
|
703
|
+
</p>
|
704
|
+
<div class="variablelist"><table border="0">
|
705
|
+
<col align="left" valign="top">
|
706
|
+
<tbody>
|
707
|
+
<tr>
|
708
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
709
|
+
<td> a cairo context
|
710
|
+
</td>
|
711
|
+
</tr>
|
712
|
+
<tr>
|
713
|
+
<td><p><span class="term"><em class="parameter"><code>utf8</code></em> :</span></p></td>
|
714
|
+
<td> a NUL-terminated string of text encoded in UTF-8, or <code class="literal">NULL</code>
|
715
|
+
</td>
|
716
|
+
</tr>
|
717
|
+
</tbody>
|
718
|
+
</table></div>
|
719
|
+
</div>
|
720
|
+
<hr>
|
721
|
+
<div class="refsect2" title="cairo_show_glyphs ()">
|
722
|
+
<a name="cairo-show-glyphs"></a><h3>cairo_show_glyphs ()</h3>
|
723
|
+
<pre class="programlisting">void cairo_show_glyphs (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
724
|
+
const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
|
725
|
+
int num_glyphs);</pre>
|
726
|
+
<p>
|
727
|
+
A drawing operator that generates the shape from an array of glyphs,
|
728
|
+
rendered according to the current font face, font size
|
729
|
+
(font matrix), and font options.</p>
|
730
|
+
<p>
|
731
|
+
</p>
|
732
|
+
<div class="variablelist"><table border="0">
|
733
|
+
<col align="left" valign="top">
|
734
|
+
<tbody>
|
735
|
+
<tr>
|
736
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
737
|
+
<td> a cairo context
|
738
|
+
</td>
|
739
|
+
</tr>
|
740
|
+
<tr>
|
741
|
+
<td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
|
742
|
+
<td> array of glyphs to show
|
743
|
+
</td>
|
744
|
+
</tr>
|
745
|
+
<tr>
|
746
|
+
<td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em> :</span></p></td>
|
747
|
+
<td> number of glyphs to show
|
748
|
+
</td>
|
749
|
+
</tr>
|
750
|
+
</tbody>
|
751
|
+
</table></div>
|
752
|
+
</div>
|
753
|
+
<hr>
|
754
|
+
<div class="refsect2" title="cairo_show_text_glyphs ()">
|
755
|
+
<a name="cairo-show-text-glyphs"></a><h3>cairo_show_text_glyphs ()</h3>
|
756
|
+
<pre class="programlisting">void cairo_show_text_glyphs (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
757
|
+
const char *utf8,
|
758
|
+
int utf8_len,
|
759
|
+
const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
|
760
|
+
int num_glyphs,
|
761
|
+
const <a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> *clusters,
|
762
|
+
int num_clusters,
|
763
|
+
<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>
|
764
|
+
<p>
|
765
|
+
This operation has rendering effects similar to <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a>
|
766
|
+
but, if the target surface supports it, uses the provided text and
|
767
|
+
cluster mapping to embed the text for the glyphs shown in the output.
|
768
|
+
If the target does not support the extended attributes, this function
|
769
|
+
acts like the basic <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a> as if it had been passed
|
770
|
+
<em class="parameter"><code>glyphs</code></em> and <em class="parameter"><code>num_glyphs</code></em>.
|
771
|
+
</p>
|
772
|
+
<p>
|
773
|
+
The mapping between <em class="parameter"><code>utf8</code></em> and <em class="parameter"><code>glyphs</code></em> is provided by an array of
|
774
|
+
<em class="firstterm">clusters</em>. Each cluster covers a number of
|
775
|
+
text bytes and glyphs, and neighboring clusters cover neighboring
|
776
|
+
areas of <em class="parameter"><code>utf8</code></em> and <em class="parameter"><code>glyphs</code></em>. The clusters should collectively cover <em class="parameter"><code>utf8</code></em>
|
777
|
+
and <em class="parameter"><code>glyphs</code></em> in entirety.
|
778
|
+
</p>
|
779
|
+
<p>
|
780
|
+
The first cluster always covers bytes from the beginning of <em class="parameter"><code>utf8</code></em>.
|
781
|
+
If <em class="parameter"><code>cluster_flags</code></em> do not have the <a class="link" href="cairo-text.html#CAIRO-TEXT-CLUSTER-FLAG-BACKWARD--CAPS"><code class="literal">CAIRO_TEXT_CLUSTER_FLAG_BACKWARD</code></a>
|
782
|
+
set, the first cluster also covers the beginning
|
783
|
+
of <em class="parameter"><code>glyphs</code></em>, otherwise it covers the end of the <em class="parameter"><code>glyphs</code></em> array and
|
784
|
+
following clusters move backward.
|
785
|
+
</p>
|
786
|
+
<p>
|
787
|
+
See <a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t"><span class="type">cairo_text_cluster_t</span></a> for constraints on valid clusters.</p>
|
788
|
+
<p>
|
789
|
+
</p>
|
790
|
+
<div class="variablelist"><table border="0">
|
791
|
+
<col align="left" valign="top">
|
792
|
+
<tbody>
|
793
|
+
<tr>
|
794
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
795
|
+
<td> a cairo context
|
796
|
+
</td>
|
797
|
+
</tr>
|
798
|
+
<tr>
|
799
|
+
<td><p><span class="term"><em class="parameter"><code>utf8</code></em> :</span></p></td>
|
800
|
+
<td> a string of text encoded in UTF-8
|
801
|
+
</td>
|
802
|
+
</tr>
|
803
|
+
<tr>
|
804
|
+
<td><p><span class="term"><em class="parameter"><code>utf8_len</code></em> :</span></p></td>
|
805
|
+
<td> length of <em class="parameter"><code>utf8</code></em> in bytes, or -1 if it is NUL-terminated
|
806
|
+
</td>
|
807
|
+
</tr>
|
808
|
+
<tr>
|
809
|
+
<td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
|
810
|
+
<td> array of glyphs to show
|
811
|
+
</td>
|
812
|
+
</tr>
|
813
|
+
<tr>
|
814
|
+
<td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em> :</span></p></td>
|
815
|
+
<td> number of glyphs to show
|
816
|
+
</td>
|
817
|
+
</tr>
|
818
|
+
<tr>
|
819
|
+
<td><p><span class="term"><em class="parameter"><code>clusters</code></em> :</span></p></td>
|
820
|
+
<td> array of cluster mapping information
|
821
|
+
</td>
|
822
|
+
</tr>
|
823
|
+
<tr>
|
824
|
+
<td><p><span class="term"><em class="parameter"><code>num_clusters</code></em> :</span></p></td>
|
825
|
+
<td> number of clusters in the mapping
|
826
|
+
</td>
|
827
|
+
</tr>
|
828
|
+
<tr>
|
829
|
+
<td><p><span class="term"><em class="parameter"><code>cluster_flags</code></em> :</span></p></td>
|
830
|
+
<td> cluster mapping flags
|
831
|
+
</td>
|
832
|
+
</tr>
|
833
|
+
</tbody>
|
834
|
+
</table></div>
|
835
|
+
<p class="since">Since 1.8</p>
|
836
|
+
</div>
|
837
|
+
<hr>
|
838
|
+
<div class="refsect2" title="cairo_font_extents ()">
|
839
|
+
<a name="cairo-font-extents"></a><h3>cairo_font_extents ()</h3>
|
840
|
+
<pre class="programlisting">void cairo_font_extents (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
841
|
+
<a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t">cairo_font_extents_t</a> *extents);</pre>
|
842
|
+
<p>
|
843
|
+
Gets the font extents for the currently selected font.</p>
|
844
|
+
<p>
|
845
|
+
</p>
|
846
|
+
<div class="variablelist"><table border="0">
|
847
|
+
<col align="left" valign="top">
|
848
|
+
<tbody>
|
849
|
+
<tr>
|
850
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
851
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
852
|
+
</td>
|
853
|
+
</tr>
|
854
|
+
<tr>
|
855
|
+
<td><p><span class="term"><em class="parameter"><code>extents</code></em> :</span></p></td>
|
856
|
+
<td> a <a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t"><span class="type">cairo_font_extents_t</span></a> object into which the results
|
857
|
+
will be stored.
|
858
|
+
</td>
|
859
|
+
</tr>
|
860
|
+
</tbody>
|
861
|
+
</table></div>
|
862
|
+
</div>
|
863
|
+
<hr>
|
864
|
+
<div class="refsect2" title="cairo_text_extents ()">
|
865
|
+
<a name="cairo-text-extents"></a><h3>cairo_text_extents ()</h3>
|
866
|
+
<pre class="programlisting">void cairo_text_extents (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
867
|
+
const char *utf8,
|
868
|
+
<a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);</pre>
|
869
|
+
<p>
|
870
|
+
Gets the extents for a string of text. The extents describe a
|
871
|
+
user-space rectangle that encloses the "inked" portion of the text,
|
872
|
+
(as it would be drawn by <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>). Additionally, the
|
873
|
+
x_advance and y_advance values indicate the amount by which the
|
874
|
+
current point would be advanced by <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.
|
875
|
+
</p>
|
876
|
+
<p>
|
877
|
+
Note that whitespace characters do not directly contribute to the
|
878
|
+
size of the rectangle (extents.width and extents.height). They do
|
879
|
+
contribute indirectly by changing the position of non-whitespace
|
880
|
+
characters. In particular, trailing whitespace characters are
|
881
|
+
likely to not affect the size of the rectangle, though they will
|
882
|
+
affect the x_advance and y_advance values.</p>
|
883
|
+
<p>
|
884
|
+
</p>
|
885
|
+
<div class="variablelist"><table border="0">
|
886
|
+
<col align="left" valign="top">
|
887
|
+
<tbody>
|
888
|
+
<tr>
|
889
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
890
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
891
|
+
</td>
|
892
|
+
</tr>
|
893
|
+
<tr>
|
894
|
+
<td><p><span class="term"><em class="parameter"><code>utf8</code></em> :</span></p></td>
|
895
|
+
<td> a NUL-terminated string of text encoded in UTF-8, or <code class="literal">NULL</code>
|
896
|
+
</td>
|
897
|
+
</tr>
|
898
|
+
<tr>
|
899
|
+
<td><p><span class="term"><em class="parameter"><code>extents</code></em> :</span></p></td>
|
900
|
+
<td> a <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> object into which the results
|
901
|
+
will be stored
|
902
|
+
</td>
|
903
|
+
</tr>
|
904
|
+
</tbody>
|
905
|
+
</table></div>
|
906
|
+
</div>
|
907
|
+
<hr>
|
908
|
+
<div class="refsect2" title="cairo_glyph_extents ()">
|
909
|
+
<a name="cairo-glyph-extents"></a><h3>cairo_glyph_extents ()</h3>
|
910
|
+
<pre class="programlisting">void cairo_glyph_extents (<a class="link" href="cairo-context.html#cairo-t" title="cairo_t">cairo_t</a> *cr,
|
911
|
+
const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
|
912
|
+
int num_glyphs,
|
913
|
+
<a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);</pre>
|
914
|
+
<p>
|
915
|
+
Gets the extents for an array of glyphs. The extents describe a
|
916
|
+
user-space rectangle that encloses the "inked" portion of the
|
917
|
+
glyphs, (as they would be drawn by <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a>).
|
918
|
+
Additionally, the x_advance and y_advance values indicate the
|
919
|
+
amount by which the current point would be advanced by
|
920
|
+
<a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a>.
|
921
|
+
</p>
|
922
|
+
<p>
|
923
|
+
Note that whitespace glyphs do not contribute to the size of the
|
924
|
+
rectangle (extents.width and extents.height).</p>
|
925
|
+
<p>
|
926
|
+
</p>
|
927
|
+
<div class="variablelist"><table border="0">
|
928
|
+
<col align="left" valign="top">
|
929
|
+
<tbody>
|
930
|
+
<tr>
|
931
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
932
|
+
<td> a <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
933
|
+
</td>
|
934
|
+
</tr>
|
935
|
+
<tr>
|
936
|
+
<td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
|
937
|
+
<td> an array of <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t"><span class="type">cairo_glyph_t</span></a> objects
|
938
|
+
</td>
|
939
|
+
</tr>
|
940
|
+
<tr>
|
941
|
+
<td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em> :</span></p></td>
|
942
|
+
<td> the number of elements in <em class="parameter"><code>glyphs</code></em>
|
943
|
+
</td>
|
944
|
+
</tr>
|
945
|
+
<tr>
|
946
|
+
<td><p><span class="term"><em class="parameter"><code>extents</code></em> :</span></p></td>
|
947
|
+
<td> a <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> object into which the results
|
948
|
+
will be stored
|
949
|
+
</td>
|
950
|
+
</tr>
|
951
|
+
</tbody>
|
952
|
+
</table></div>
|
953
|
+
</div>
|
954
|
+
<hr>
|
955
|
+
<div class="refsect2" title="cairo_toy_font_face_create ()">
|
956
|
+
<a name="cairo-toy-font-face-create"></a><h3>cairo_toy_font_face_create ()</h3>
|
957
|
+
<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_toy_font_face_create (const char *family,
|
958
|
+
<a class="link" href="cairo-text.html#cairo-font-slant-t" title="enum cairo_font_slant_t">cairo_font_slant_t</a> slant,
|
959
|
+
<a class="link" href="cairo-text.html#cairo-font-weight-t" title="enum cairo_font_weight_t">cairo_font_weight_t</a> weight);</pre>
|
960
|
+
<p>
|
961
|
+
Creates a font face from a triplet of family, slant, and weight.
|
962
|
+
These font faces are used in implementation of the the <a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> "toy"
|
963
|
+
font API.
|
964
|
+
</p>
|
965
|
+
<p>
|
966
|
+
If <em class="parameter"><code>family</code></em> is the zero-length string "", the platform-specific default
|
967
|
+
family is assumed. The default family then can be queried using
|
968
|
+
<a class="link" href="cairo-text.html#cairo-toy-font-face-get-family" title="cairo_toy_font_face_get_family ()"><code class="function">cairo_toy_font_face_get_family()</code></a>.
|
969
|
+
</p>
|
970
|
+
<p>
|
971
|
+
The <a class="link" href="cairo-text.html#cairo-select-font-face" title="cairo_select_font_face ()"><code class="function">cairo_select_font_face()</code></a> function uses this to create font faces.
|
972
|
+
See that function for limitations of toy font faces.</p>
|
973
|
+
<p>
|
974
|
+
</p>
|
975
|
+
<div class="variablelist"><table border="0">
|
976
|
+
<col align="left" valign="top">
|
977
|
+
<tbody>
|
978
|
+
<tr>
|
979
|
+
<td><p><span class="term"><em class="parameter"><code>family</code></em> :</span></p></td>
|
980
|
+
<td> a font family name, encoded in UTF-8
|
981
|
+
</td>
|
982
|
+
</tr>
|
983
|
+
<tr>
|
984
|
+
<td><p><span class="term"><em class="parameter"><code>slant</code></em> :</span></p></td>
|
985
|
+
<td> the slant for the font
|
986
|
+
</td>
|
987
|
+
</tr>
|
988
|
+
<tr>
|
989
|
+
<td><p><span class="term"><em class="parameter"><code>weight</code></em> :</span></p></td>
|
990
|
+
<td> the weight for the font
|
991
|
+
</td>
|
992
|
+
</tr>
|
993
|
+
<tr>
|
994
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
995
|
+
<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
|
996
|
+
<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.
|
997
|
+
|
998
|
+
</td>
|
999
|
+
</tr>
|
1000
|
+
</tbody>
|
1001
|
+
</table></div>
|
1002
|
+
<p class="since">Since 1.8</p>
|
1003
|
+
</div>
|
1004
|
+
<hr>
|
1005
|
+
<div class="refsect2" title="cairo_toy_font_face_get_family ()">
|
1006
|
+
<a name="cairo-toy-font-face-get-family"></a><h3>cairo_toy_font_face_get_family ()</h3>
|
1007
|
+
<pre class="programlisting">const char * cairo_toy_font_face_get_family (<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>
|
1008
|
+
<p>
|
1009
|
+
Gets the familly name of a toy font.</p>
|
1010
|
+
<p>
|
1011
|
+
</p>
|
1012
|
+
<div class="variablelist"><table border="0">
|
1013
|
+
<col align="left" valign="top">
|
1014
|
+
<tbody>
|
1015
|
+
<tr>
|
1016
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
1017
|
+
<td> A toy font face
|
1018
|
+
</td>
|
1019
|
+
</tr>
|
1020
|
+
<tr>
|
1021
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1022
|
+
<td> The family name. This string is owned by the font face
|
1023
|
+
and remains valid as long as the font face is alive (referenced).
|
1024
|
+
|
1025
|
+
</td>
|
1026
|
+
</tr>
|
1027
|
+
</tbody>
|
1028
|
+
</table></div>
|
1029
|
+
<p class="since">Since 1.8</p>
|
1030
|
+
</div>
|
1031
|
+
<hr>
|
1032
|
+
<div class="refsect2" title="cairo_toy_font_face_get_slant ()">
|
1033
|
+
<a name="cairo-toy-font-face-get-slant"></a><h3>cairo_toy_font_face_get_slant ()</h3>
|
1034
|
+
<pre class="programlisting"><a class="link" href="cairo-text.html#cairo-font-slant-t" title="enum cairo_font_slant_t">cairo_font_slant_t</a> cairo_toy_font_face_get_slant (<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>
|
1035
|
+
<p>
|
1036
|
+
Gets the slant a toy font.</p>
|
1037
|
+
<p>
|
1038
|
+
</p>
|
1039
|
+
<div class="variablelist"><table border="0">
|
1040
|
+
<col align="left" valign="top">
|
1041
|
+
<tbody>
|
1042
|
+
<tr>
|
1043
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
1044
|
+
<td> A toy font face
|
1045
|
+
</td>
|
1046
|
+
</tr>
|
1047
|
+
<tr>
|
1048
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1049
|
+
<td> The slant value
|
1050
|
+
|
1051
|
+
</td>
|
1052
|
+
</tr>
|
1053
|
+
</tbody>
|
1054
|
+
</table></div>
|
1055
|
+
<p class="since">Since 1.8</p>
|
1056
|
+
</div>
|
1057
|
+
<hr>
|
1058
|
+
<div class="refsect2" title="cairo_toy_font_face_get_weight ()">
|
1059
|
+
<a name="cairo-toy-font-face-get-weight"></a><h3>cairo_toy_font_face_get_weight ()</h3>
|
1060
|
+
<pre class="programlisting"><a class="link" href="cairo-text.html#cairo-font-weight-t" title="enum cairo_font_weight_t">cairo_font_weight_t</a> cairo_toy_font_face_get_weight (<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>
|
1061
|
+
<p>
|
1062
|
+
Gets the weight a toy font.</p>
|
1063
|
+
<p>
|
1064
|
+
</p>
|
1065
|
+
<div class="variablelist"><table border="0">
|
1066
|
+
<col align="left" valign="top">
|
1067
|
+
<tbody>
|
1068
|
+
<tr>
|
1069
|
+
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
|
1070
|
+
<td> A toy font face
|
1071
|
+
</td>
|
1072
|
+
</tr>
|
1073
|
+
<tr>
|
1074
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1075
|
+
<td> The weight value
|
1076
|
+
|
1077
|
+
</td>
|
1078
|
+
</tr>
|
1079
|
+
</tbody>
|
1080
|
+
</table></div>
|
1081
|
+
<p class="since">Since 1.8</p>
|
1082
|
+
</div>
|
1083
|
+
<hr>
|
1084
|
+
<div class="refsect2" title="cairo_glyph_allocate ()">
|
1085
|
+
<a name="cairo-glyph-allocate"></a><h3>cairo_glyph_allocate ()</h3>
|
1086
|
+
<pre class="programlisting"><a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> * cairo_glyph_allocate (int num_glyphs);</pre>
|
1087
|
+
<p>
|
1088
|
+
Allocates an array of <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t"><span class="type">cairo_glyph_t</span></a>'s.
|
1089
|
+
This function is only useful in implementations of
|
1090
|
+
<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> where the user
|
1091
|
+
needs to allocate an array of glyphs that cairo will free.
|
1092
|
+
For all other uses, user can use their own allocation method
|
1093
|
+
for glyphs.
|
1094
|
+
</p>
|
1095
|
+
<p>
|
1096
|
+
This function returns <code class="literal">NULL</code> if <em class="parameter"><code>num_glyphs</code></em> is not positive,
|
1097
|
+
or if out of memory. That means, the <code class="literal">NULL</code> return value
|
1098
|
+
signals out-of-memory only if <em class="parameter"><code>num_glyphs</code></em> was positive.</p>
|
1099
|
+
<p>
|
1100
|
+
</p>
|
1101
|
+
<div class="variablelist"><table border="0">
|
1102
|
+
<col align="left" valign="top">
|
1103
|
+
<tbody>
|
1104
|
+
<tr>
|
1105
|
+
<td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em> :</span></p></td>
|
1106
|
+
<td> number of glyphs to allocate
|
1107
|
+
</td>
|
1108
|
+
</tr>
|
1109
|
+
<tr>
|
1110
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1111
|
+
<td> the newly allocated array of glyphs that should be
|
1112
|
+
freed using <a class="link" href="cairo-text.html#cairo-glyph-free" title="cairo_glyph_free ()"><code class="function">cairo_glyph_free()</code></a>
|
1113
|
+
|
1114
|
+
</td>
|
1115
|
+
</tr>
|
1116
|
+
</tbody>
|
1117
|
+
</table></div>
|
1118
|
+
<p class="since">Since 1.8</p>
|
1119
|
+
</div>
|
1120
|
+
<hr>
|
1121
|
+
<div class="refsect2" title="cairo_glyph_free ()">
|
1122
|
+
<a name="cairo-glyph-free"></a><h3>cairo_glyph_free ()</h3>
|
1123
|
+
<pre class="programlisting">void cairo_glyph_free (<a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs);</pre>
|
1124
|
+
<p>
|
1125
|
+
Frees an array of <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t"><span class="type">cairo_glyph_t</span></a>'s allocated using <a class="link" href="cairo-text.html#cairo-glyph-allocate" title="cairo_glyph_allocate ()"><code class="function">cairo_glyph_allocate()</code></a>.
|
1126
|
+
This function is only useful to free glyph array returned
|
1127
|
+
by <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-text-to-glyphs" title="cairo_scaled_font_text_to_glyphs ()"><code class="function">cairo_scaled_font_text_to_glyphs()</code></a> where cairo returns
|
1128
|
+
an array of glyphs that the user will free.
|
1129
|
+
For all other uses, user can use their own allocation method
|
1130
|
+
for glyphs.</p>
|
1131
|
+
<p>
|
1132
|
+
</p>
|
1133
|
+
<div class="variablelist"><table border="0">
|
1134
|
+
<col align="left" valign="top">
|
1135
|
+
<tbody><tr>
|
1136
|
+
<td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
|
1137
|
+
<td> array of glyphs to free, or <code class="literal">NULL</code>
|
1138
|
+
</td>
|
1139
|
+
</tr></tbody>
|
1140
|
+
</table></div>
|
1141
|
+
<p class="since">Since 1.8</p>
|
1142
|
+
</div>
|
1143
|
+
<hr>
|
1144
|
+
<div class="refsect2" title="cairo_text_cluster_allocate ()">
|
1145
|
+
<a name="cairo-text-cluster-allocate"></a><h3>cairo_text_cluster_allocate ()</h3>
|
1146
|
+
<pre class="programlisting"><a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> * cairo_text_cluster_allocate (int num_clusters);</pre>
|
1147
|
+
<p>
|
1148
|
+
Allocates an array of <a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t"><span class="type">cairo_text_cluster_t</span></a>'s.
|
1149
|
+
This function is only useful in implementations of
|
1150
|
+
<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> where the user
|
1151
|
+
needs to allocate an array of text clusters that cairo will free.
|
1152
|
+
For all other uses, user can use their own allocation method
|
1153
|
+
for text clusters.
|
1154
|
+
</p>
|
1155
|
+
<p>
|
1156
|
+
This function returns <code class="literal">NULL</code> if <em class="parameter"><code>num_clusters</code></em> is not positive,
|
1157
|
+
or if out of memory. That means, the <code class="literal">NULL</code> return value
|
1158
|
+
signals out-of-memory only if <em class="parameter"><code>num_clusters</code></em> was positive.</p>
|
1159
|
+
<p>
|
1160
|
+
</p>
|
1161
|
+
<div class="variablelist"><table border="0">
|
1162
|
+
<col align="left" valign="top">
|
1163
|
+
<tbody>
|
1164
|
+
<tr>
|
1165
|
+
<td><p><span class="term"><em class="parameter"><code>num_clusters</code></em> :</span></p></td>
|
1166
|
+
<td> number of text_clusters to allocate
|
1167
|
+
</td>
|
1168
|
+
</tr>
|
1169
|
+
<tr>
|
1170
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1171
|
+
<td> the newly allocated array of text clusters that should be
|
1172
|
+
freed 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>
|
1173
|
+
|
1174
|
+
</td>
|
1175
|
+
</tr>
|
1176
|
+
</tbody>
|
1177
|
+
</table></div>
|
1178
|
+
<p class="since">Since 1.8</p>
|
1179
|
+
</div>
|
1180
|
+
<hr>
|
1181
|
+
<div class="refsect2" title="cairo_text_cluster_free ()">
|
1182
|
+
<a name="cairo-text-cluster-free"></a><h3>cairo_text_cluster_free ()</h3>
|
1183
|
+
<pre class="programlisting">void cairo_text_cluster_free (<a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> *clusters);</pre>
|
1184
|
+
<p>
|
1185
|
+
Frees an array of <span class="type">cairo_text_cluster</span>'s allocated 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>.
|
1186
|
+
This function is only useful to free text cluster array returned
|
1187
|
+
by <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-text-to-glyphs" title="cairo_scaled_font_text_to_glyphs ()"><code class="function">cairo_scaled_font_text_to_glyphs()</code></a> where cairo returns
|
1188
|
+
an array of text clusters that the user will free.
|
1189
|
+
For all other uses, user can use their own allocation method
|
1190
|
+
for text clusters.</p>
|
1191
|
+
<p>
|
1192
|
+
</p>
|
1193
|
+
<div class="variablelist"><table border="0">
|
1194
|
+
<col align="left" valign="top">
|
1195
|
+
<tbody><tr>
|
1196
|
+
<td><p><span class="term"><em class="parameter"><code>clusters</code></em> :</span></p></td>
|
1197
|
+
<td> array of text clusters to free, or <code class="literal">NULL</code>
|
1198
|
+
</td>
|
1199
|
+
</tr></tbody>
|
1200
|
+
</table></div>
|
1201
|
+
<p class="since">Since 1.8</p>
|
1202
|
+
</div>
|
1203
|
+
</div>
|
1204
|
+
<div class="refsect1" title="See Also">
|
1205
|
+
<a name="cairo-text.see-also"></a><h2>See Also</h2>
|
1206
|
+
<p>
|
1207
|
+
</p>
|
1208
|
+
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
1209
|
+
<li class="listitem"><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></li>
|
1210
|
+
<li class="listitem"><a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a></li>
|
1211
|
+
<li class="listitem"><a class="link" href="cairo-paths.html#cairo-text-path" title="cairo_text_path ()"><code class="function">cairo_text_path()</code></a></li>
|
1212
|
+
<li class="listitem"><a class="link" href="cairo-paths.html#cairo-glyph-path" title="cairo_glyph_path ()"><code class="function">cairo_glyph_path()</code></a></li>
|
1213
|
+
</ul></div>
|
1214
|
+
<p>
|
1215
|
+
</p>
|
1216
|
+
</div>
|
1217
|
+
</div>
|
1218
|
+
<div class="footer">
|
1219
|
+
<hr>
|
1220
|
+
Generated by GTK-Doc V1.11</div>
|
1221
|
+
</body>
|
1222
|
+
</html>
|