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