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.

Files changed (167) hide show
  1. data/ChangeLog +32 -0
  2. data/NEWS +9 -1
  3. data/README +1 -0
  4. data/Rakefile +2 -2
  5. data/cairo/DLL_FAQ.txt +397 -0
  6. data/cairo/README.txt +53 -0
  7. data/cairo/USAGE.txt +94 -0
  8. data/cairo/bin/libcairo-2.dll +0 -0
  9. data/cairo/bin/libpng12-0.dll +0 -0
  10. data/cairo/bin/zlib1.dll +0 -0
  11. data/cairo/include/cairo/cairo-deprecated.h +0 -4
  12. data/cairo/include/cairo/cairo-features.h +7 -22
  13. data/cairo/include/cairo/cairo-pdf.h +1 -1
  14. data/cairo/include/cairo/cairo-ps.h +1 -1
  15. data/cairo/include/cairo/cairo-svg.h +1 -1
  16. data/cairo/include/cairo/cairo-version.h +8 -0
  17. data/cairo/include/cairo/cairo-win32.h +9 -1
  18. data/cairo/include/cairo/cairo.h +420 -32
  19. data/cairo/include/libpng12/png.h +3592 -0
  20. data/cairo/include/libpng12/pngconf.h +1481 -0
  21. data/cairo/include/png.h +36 -13
  22. data/cairo/include/pngconf.h +3 -3
  23. data/cairo/include/zconf.h +332 -0
  24. data/cairo/include/zlib.h +1357 -0
  25. data/cairo/lib/cairo.def +22 -0
  26. data/cairo/lib/cairo.lib +0 -0
  27. data/cairo/lib/libcairo.dll.a +0 -0
  28. data/cairo/lib/libpng.def +1 -0
  29. data/cairo/lib/libpng.lib +0 -0
  30. data/cairo/lib/libpng12.dll.a +0 -0
  31. data/cairo/lib/pkgconfig/cairo-pdf.pc +5 -5
  32. data/cairo/lib/pkgconfig/cairo-png.pc +5 -5
  33. data/cairo/lib/pkgconfig/cairo-ps.pc +5 -5
  34. data/cairo/lib/pkgconfig/cairo-svg.pc +4 -4
  35. data/cairo/lib/pkgconfig/cairo-win32-font.pc +4 -4
  36. data/cairo/lib/pkgconfig/cairo-win32.pc +4 -4
  37. data/cairo/lib/pkgconfig/cairo.pc +4 -4
  38. data/cairo/lib/pkgconfig/libpng.pc +3 -2
  39. data/cairo/lib/pkgconfig/libpng12.pc +3 -2
  40. data/cairo/lib/zdll.exp +0 -0
  41. data/cairo/lib/zdll.lib +0 -0
  42. data/cairo/lib/zlib.def +60 -0
  43. data/cairo/manifest/cairo-dev_1.8.0-1_win32.mft +76 -0
  44. data/cairo/manifest/cairo_1.8.0-1_win32.mft +5 -0
  45. data/cairo/manifest/{libpng-dev-1.2.29.mft → libpng-dev_1.2.32-1_win32.mft} +5 -2
  46. data/cairo/manifest/libpng_1.2.32-1_win32.mft +2 -0
  47. data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING +0 -0
  48. data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-LGPL-2.1 +0 -0
  49. data/cairo/share/doc/{cairo-1.6.4-2 → cairo_1.8.0-1_win32}/COPYING-MPL-1.1 +0 -0
  50. data/cairo/share/gtk-doc/html/cairo/bindings-errors.html +15 -11
  51. data/cairo/share/gtk-doc/html/cairo/bindings-fonts.html +15 -11
  52. data/cairo/share/gtk-doc/html/cairo/bindings-memory.html +20 -16
  53. data/cairo/share/gtk-doc/html/cairo/bindings-overloading.html +16 -12
  54. data/cairo/share/gtk-doc/html/cairo/bindings-path.html +17 -13
  55. data/cairo/share/gtk-doc/html/cairo/bindings-patterns.html +25 -21
  56. data/cairo/share/gtk-doc/html/cairo/bindings-return-values.html +17 -13
  57. data/cairo/share/gtk-doc/html/cairo/bindings-streams.html +14 -10
  58. data/cairo/share/gtk-doc/html/cairo/bindings-surfaces.html +19 -15
  59. data/cairo/share/gtk-doc/html/cairo/cairo-context.html +2721 -0
  60. data/cairo/share/gtk-doc/html/cairo/cairo-drawing.html +57 -0
  61. data/cairo/share/gtk-doc/html/cairo/cairo-error-status.html +361 -0
  62. data/cairo/share/gtk-doc/html/cairo/cairo-font-face.html +418 -0
  63. data/cairo/share/gtk-doc/html/cairo/cairo-font-options.html +695 -0
  64. data/cairo/share/gtk-doc/html/cairo/cairo-fonts.html +63 -0
  65. data/cairo/share/gtk-doc/html/cairo/cairo-ft-font.html +318 -0
  66. data/cairo/share/gtk-doc/html/cairo/cairo-image-surface.html +486 -0
  67. data/cairo/share/gtk-doc/html/cairo/{cairo-cairo-matrix-t.html → cairo-matrix.html} +137 -156
  68. data/cairo/share/gtk-doc/html/cairo/{cairo-Paths.html → cairo-paths.html} +275 -306
  69. data/cairo/share/gtk-doc/html/cairo/cairo-pattern.html +1524 -0
  70. data/cairo/share/gtk-doc/html/cairo/{cairo-PDF-Surfaces.html → cairo-pdf-surface.html} +60 -70
  71. data/cairo/share/gtk-doc/html/cairo/cairo-png-functions.html +332 -0
  72. data/cairo/share/gtk-doc/html/cairo/{cairo-PostScript-Surfaces.html → cairo-ps-surface.html} +131 -150
  73. data/cairo/share/gtk-doc/html/cairo/cairo-quartz-font.html +153 -0
  74. data/cairo/share/gtk-doc/html/cairo/{cairo-Quartz-Surfaces.html → cairo-quartz-surface.html} +53 -62
  75. data/cairo/share/gtk-doc/html/cairo/cairo-scaled-font.html +1051 -0
  76. data/cairo/share/gtk-doc/html/cairo/cairo-support.html +54 -0
  77. data/cairo/share/gtk-doc/html/cairo/cairo-surface.html +1064 -0
  78. data/cairo/share/gtk-doc/html/cairo/cairo-surfaces.html +69 -0
  79. data/cairo/share/gtk-doc/html/cairo/cairo-svg-surface.html +324 -0
  80. data/cairo/share/gtk-doc/html/cairo/cairo-text.html +1264 -0
  81. data/cairo/share/gtk-doc/html/cairo/{cairo-Transformations.html → cairo-transformations.html} +98 -115
  82. data/cairo/share/gtk-doc/html/cairo/cairo-types.html +134 -0
  83. data/cairo/share/gtk-doc/html/cairo/cairo-user-font.html +769 -0
  84. data/cairo/share/gtk-doc/html/cairo/cairo-version-info.html +355 -0
  85. data/cairo/share/gtk-doc/html/cairo/cairo-win32-font.html +366 -0
  86. data/cairo/share/gtk-doc/html/cairo/cairo-win32-surface.html +321 -0
  87. data/cairo/share/gtk-doc/html/cairo/{cairo-XLib-Surfaces.html → cairo-xlib-surface.html} +104 -121
  88. data/cairo/share/gtk-doc/html/cairo/cairo.devhelp +390 -405
  89. data/cairo/share/gtk-doc/html/cairo/cairo.devhelp2 +390 -405
  90. data/cairo/share/gtk-doc/html/cairo/index-1.2.html +63 -59
  91. data/cairo/share/gtk-doc/html/cairo/index-1.4.html +45 -41
  92. data/cairo/share/gtk-doc/html/cairo/index-1.6.html +29 -23
  93. data/cairo/share/gtk-doc/html/cairo/index-1.8.html +107 -0
  94. data/cairo/share/gtk-doc/html/cairo/index-all.html +759 -0
  95. data/cairo/share/gtk-doc/html/cairo/index.html +51 -41
  96. data/cairo/share/gtk-doc/html/cairo/index.sgml +478 -466
  97. data/cairo/share/gtk-doc/html/cairo/language-bindings.html +22 -18
  98. data/cairo/share/gtk-doc/html/cairo/style.css +14 -2
  99. data/cairo/share/man/man3/libpng.3 +443 -17
  100. data/cairo/share/man/man3/libpngpf.3 +618 -102
  101. data/cairo/share/man/man5/png.5 +1 -1
  102. data/cairo/src/tml/make/cairo_1.8.0-1_win32.log +1021 -0
  103. data/cairo/src/tml/make/cairo_1.8.0-1_win32.sh +68 -0
  104. data/cairo/src/tml/make/libpng_1.2.32-1_win32.log +269 -0
  105. data/cairo/src/tml/make/libpng_1.2.32-1_win32.sh +63 -0
  106. data/cairo/test/example_d.exe +0 -0
  107. data/cairo/test/minigzip_d.exe +0 -0
  108. data/cairo/test/testzlib_d.exe +0 -0
  109. data/cairo/test/untgz_d.exe +0 -0
  110. data/doc/en/cairo-context.html +81 -91
  111. data/doc/en/cairo-font-options.html +11 -26
  112. data/doc/en/cairo-text-cluster-flag.html +35 -0
  113. data/doc/en/cairo-user-font-face-text-to-glyphs-data.html +3 -3
  114. data/doc/en/cairo.html +38 -42
  115. data/doc/en/index.html +129 -142
  116. data/doc/ja/cairo-font-options.html +3 -25
  117. data/doc/ja/cairo-text-cluster-flag.html +46 -0
  118. data/doc/ja/cairo-user-font-face-text-to-glyphs-data.html +16 -15
  119. data/doc/ja/cairo.html +3 -7
  120. data/doc/ja/index.html +9 -17
  121. data/src/cairo.def +1 -1
  122. data/src/cairo.so +0 -0
  123. data/src/lib/cairo/constants.rb +3 -1
  124. data/src/libruby-cairo.a +0 -0
  125. data/src/rb_cairo.c +2 -2
  126. data/src/rb_cairo.h +5 -5
  127. data/src/rb_cairo_constants.c +12 -19
  128. data/src/rb_cairo_context.c +25 -21
  129. data/src/rb_cairo_font_face.c +44 -29
  130. data/src/rb_cairo_font_options.c +1 -23
  131. data/src/rb_cairo_scaled_font.c +5 -5
  132. data/test/test_constants.rb +6 -9
  133. data/test/test_context.rb +0 -12
  134. data/test/test_font_face.rb +7 -7
  135. data/test/test_font_options.rb +2 -21
  136. data/test/test_scaled_font.rb +3 -3
  137. data/test/test_text_to_glyphs_data.rb +19 -15
  138. metadata +68 -45
  139. data/cairo/make/cairo-1.6.4-2.sh +0 -55
  140. data/cairo/make/libpng-1.2.29.sh +0 -35
  141. data/cairo/manifest/cairo-1.6.4-2.mft +0 -6
  142. data/cairo/manifest/cairo-dev-1.6.4-2.mft +0 -72
  143. data/cairo/manifest/libpng-1.2.29.mft +0 -2
  144. data/cairo/share/gtk-doc/html/cairo/Drawing.html +0 -53
  145. data/cairo/share/gtk-doc/html/cairo/Fonts.html +0 -56
  146. data/cairo/share/gtk-doc/html/cairo/Support.html +0 -50
  147. data/cairo/share/gtk-doc/html/cairo/Surfaces.html +0 -65
  148. data/cairo/share/gtk-doc/html/cairo/cairo-Error-Handling.html +0 -328
  149. data/cairo/share/gtk-doc/html/cairo/cairo-Font-Options.html +0 -720
  150. data/cairo/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +0 -297
  151. data/cairo/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +0 -484
  152. data/cairo/share/gtk-doc/html/cairo/cairo-PNG-Support.html +0 -345
  153. data/cairo/share/gtk-doc/html/cairo/cairo-Patterns.html +0 -1560
  154. data/cairo/share/gtk-doc/html/cairo/cairo-Quartz-Fonts.html +0 -161
  155. data/cairo/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +0 -337
  156. data/cairo/share/gtk-doc/html/cairo/cairo-Scaled-Fonts.html +0 -823
  157. data/cairo/share/gtk-doc/html/cairo/cairo-Text.html +0 -836
  158. data/cairo/share/gtk-doc/html/cairo/cairo-Types.html +0 -143
  159. data/cairo/share/gtk-doc/html/cairo/cairo-Version-Information.html +0 -325
  160. data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +0 -381
  161. data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +0 -331
  162. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +0 -427
  163. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +0 -995
  164. data/cairo/share/gtk-doc/html/cairo/cairo-cairo-t.html +0 -2795
  165. data/cairo/share/gtk-doc/html/cairo/ix01.html +0 -693
  166. data/doc/en/cairo-lcd-filter.html +0 -39
  167. data/doc/ja/cairo-lcd-filter.html +0 -63
@@ -1,836 +0,0 @@
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=US-ASCII">
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="Drawing.html" title="Drawing">
9
- <link rel="prev" href="cairo-Transformations.html" title="Transformations">
10
- <link rel="next" href="Fonts.html" title="Fonts">
11
- <meta name="generator" content="GTK-Doc V1.9 (XML mode)">
12
- <link rel="stylesheet" href="style.css" type="text/css">
13
- <link rel="chapter" href="Drawing.html" title="Drawing">
14
- <link rel="chapter" href="Fonts.html" title="Fonts">
15
- <link rel="chapter" href="Surfaces.html" title="Surfaces">
16
- <link rel="chapter" href="Support.html" title="Utilities">
17
- <link rel="index" href="ix01.html" title="Index">
18
- <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
- <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
- <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
- <link rel="appendix" href="language-bindings.html" title="Appendix&#160;A.&#160;Creating a language binding for cairo">
22
- </head>
23
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
24
- <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
25
- <tr valign="middle">
26
- <td><a accesskey="p" href="cairo-Transformations.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
27
- <td><a accesskey="u" href="Drawing.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></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="Fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
- </tr>
32
- <tr><td colspan="5" class="shortcuts"><nobr><a href="#id2613967" class="shortcut">Top</a>
33
- &#160;|&#160;
34
- <a href="#id2641905" class="shortcut">Description</a></nobr></td></tr>
35
- </table>
36
- <div class="refentry" lang="en">
37
- <a name="cairo-Text"></a><div class="titlepage"></div>
38
- <div class="refnamediv"><table width="100%"><tr>
39
- <td valign="top">
40
- <h2>
41
- <a name="id2613967"></a><span class="refentrytitle">Text</span>
42
- </h2>
43
- <p>Text &#8212; Rendering text and glyphs</p>
44
- </td>
45
- <td valign="top" align="right"></td>
46
- </tr></table></div>
47
- <div class="refsynopsisdiv">
48
- <h2>Synopsis</h2>
49
- <pre class="synopsis">
50
-
51
-
52
-
53
- <a class="link" href="cairo-Text.html#cairo-glyph-t">cairo_glyph_t</a>;
54
- enum <a class="link" href="cairo-Text.html#cairo-font-slant-t">cairo_font_slant_t</a>;
55
- enum <a class="link" href="cairo-Text.html#cairo-font-weight-t">cairo_font_weight_t</a>;
56
- void <a class="link" href="cairo-Text.html#cairo-select-font-face">cairo_select_font_face</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
57
- const char *family,
58
- <a class="link" href="cairo-Text.html#cairo-font-slant-t">cairo_font_slant_t</a> slant,
59
- <a class="link" href="cairo-Text.html#cairo-font-weight-t">cairo_font_weight_t</a> weight);
60
- void <a class="link" href="cairo-Text.html#cairo-set-font-size">cairo_set_font_size</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
61
- double size);
62
- void <a class="link" href="cairo-Text.html#cairo-set-font-matrix">cairo_set_font_matrix</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
63
- const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);
64
- void <a class="link" href="cairo-Text.html#cairo-get-font-matrix">cairo_get_font_matrix</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
65
- <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);
66
- void <a class="link" href="cairo-Text.html#cairo-set-font-options">cairo_set_font_options</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
67
- const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);
68
- void <a class="link" href="cairo-Text.html#cairo-get-font-options">cairo_get_font_options</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
69
- <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);
70
- void <a class="link" href="cairo-Text.html#cairo-set-font-face">cairo_set_font_face</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
71
- <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);
72
- <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* <a class="link" href="cairo-Text.html#cairo-get-font-face">cairo_get_font_face</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
73
- void <a class="link" href="cairo-Text.html#cairo-set-scaled-font">cairo_set_scaled_font</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
74
- const <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);
75
- <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* <a class="link" href="cairo-Text.html#cairo-get-scaled-font">cairo_get_scaled_font</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);
76
- void <a class="link" href="cairo-Text.html#cairo-show-text">cairo_show_text</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
77
- const char *utf8);
78
- void <a class="link" href="cairo-Text.html#cairo-show-glyphs">cairo_show_glyphs</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
79
- const <a class="link" href="cairo-Text.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs,
80
- int num_glyphs);
81
- void <a class="link" href="cairo-Text.html#cairo-font-extents">cairo_font_extents</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
82
- <a class="link" href="cairo-Scaled-Fonts.html#cairo-font-extents-t">cairo_font_extents_t</a> *extents);
83
- void <a class="link" href="cairo-Text.html#cairo-text-extents">cairo_text_extents</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
84
- const char *utf8,
85
- <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);
86
- void <a class="link" href="cairo-Text.html#cairo-glyph-extents">cairo_glyph_extents</a> (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
87
- const <a class="link" href="cairo-Text.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs,
88
- int num_glyphs,
89
- <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);
90
- </pre>
91
- </div>
92
- <div class="refsect1" lang="en">
93
- <a name="id2641905"></a><h2>Description</h2>
94
- <p>
95
- Cairo has two sets of text rendering capabilities:
96
- </p>
97
- <div class="itemizedlist"><ul type="disc">
98
- <li>
99
- The functions with <span class="emphasis"><em>text</em></span> in their name form cairo's
100
- <em class="firstterm">toy</em> text API. The toy API takes UTF-8 encoded
101
- text and is limited in its functionality to rendering simple
102
- left-to-right text with no advanced features. That means for example
103
- that most complex scripts like Hebrew, Arabic, and Indic scripts are
104
- out of question. No kerning or correct positioning of diacritical marks
105
- either. The font selection is pretty limited too and doesn't handle the
106
- case that the selected font does not cover the characters in the text.
107
- This set of functions are really that, a toy text API, for testing and
108
- demonstration purposes. Any serious application should avoid them.
109
- </li>
110
- <li>
111
- The functions with <span class="emphasis"><em>glyphs</em></span> in their name form cairo's
112
- <em class="firstterm">low-level</em> text API. The low-level API relies on
113
- the user to convert text to a set of glyph indexes and positions. This
114
- is a very hard problem and is best handled by external libraries, like
115
- the pangocairo that is part of the Pango text layout and rendering library.
116
- Pango is available from <a class="ulink" href="http://www.pango.org/" target="_top">http://www.pango.org/</a>.
117
- </li>
118
- </ul></div>
119
- <p>
120
- </p>
121
- </div>
122
- <div class="refsect1" lang="en">
123
- <a name="id2626335"></a><h2>Details</h2>
124
- <div class="refsect2" lang="en">
125
- <a name="id2641954"></a><h3>
126
- <a name="cairo-glyph-t"></a>cairo_glyph_t</h3>
127
- <a class="indexterm" name="id2641966"></a><pre class="programlisting">typedef struct {
128
- unsigned long index;
129
- double x;
130
- double y;
131
- } cairo_glyph_t;
132
- </pre>
133
- <p>
134
- The <a class="link" href="cairo-Text.html#cairo-glyph-t"><span class="type">cairo_glyph_t</span></a> structure holds information about a single glyph
135
- when drawing or measuring text. A font is (in simple terms) a
136
- collection of shapes used to draw text. A glyph is one of these
137
- shapes. There can be multiple glyphs for a single character
138
- (alternates to be used in different contexts, for example), or a
139
- glyph can be a <em class="firstterm">ligature</em> of multiple
140
- characters. Cairo doesn't expose any way of converting input text
141
- into glyphs, so in order to use the Cairo interfaces that take
142
- arrays of glyphs, you must directly access the appropriate
143
- underlying font system.
144
- </p>
145
- <p>
146
- 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
147
- drawing or measuring text, each glyph is individually positioned
148
- with respect to the overall origin</p>
149
- <p>
150
-
151
- </p>
152
- <div class="variablelist"><table border="0">
153
- <col align="left" valign="top">
154
- <tbody>
155
- <tr>
156
- <td><p><span class="term">double&#160;<em class="structfield"><code>x</code></em>;</span></p></td>
157
- <td> the offset in the X direction between the origin used for
158
- drawing or measuring the string and the origin of this glyph.
159
- </td>
160
- </tr>
161
- <tr>
162
- <td><p><span class="term">double&#160;<em class="structfield"><code>y</code></em>;</span></p></td>
163
- <td> the offset in the Y direction between the origin used for
164
- drawing or measuring the string and the origin of this glyph.
165
- </td>
166
- </tr>
167
- </tbody>
168
- </table></div>
169
- </div>
170
- <hr>
171
- <div class="refsect2" lang="en">
172
- <a name="id2642075"></a><h3>
173
- <a name="cairo-font-slant-t"></a>enum cairo_font_slant_t</h3>
174
- <a class="indexterm" name="id2642087"></a><pre class="programlisting">typedef enum _cairo_font_slant {
175
- CAIRO_FONT_SLANT_NORMAL,
176
- CAIRO_FONT_SLANT_ITALIC,
177
- CAIRO_FONT_SLANT_OBLIQUE
178
- } cairo_font_slant_t;
179
- </pre>
180
- <p>
181
- Specifies variants of a font face based on their slant.</p>
182
- <p>
183
-
184
- </p>
185
- <div class="variablelist"><table border="0">
186
- <col align="left" valign="top">
187
- <tbody>
188
- <tr>
189
- <td><p><span class="term"><a name="CAIRO-FONT-SLANT-NORMAL:CAPS"></a><code class="literal">CAIRO_FONT_SLANT_NORMAL</code></span></p></td>
190
- <td> Upright font style
191
- </td>
192
- </tr>
193
- <tr>
194
- <td><p><span class="term"><a name="CAIRO-FONT-SLANT-ITALIC:CAPS"></a><code class="literal">CAIRO_FONT_SLANT_ITALIC</code></span></p></td>
195
- <td> Italic font style
196
- </td>
197
- </tr>
198
- <tr>
199
- <td><p><span class="term"><a name="CAIRO-FONT-SLANT-OBLIQUE:CAPS"></a><code class="literal">CAIRO_FONT_SLANT_OBLIQUE</code></span></p></td>
200
- <td> Oblique font style
201
- </td>
202
- </tr>
203
- </tbody>
204
- </table></div>
205
- </div>
206
- <hr>
207
- <div class="refsect2" lang="en">
208
- <a name="id2583383"></a><h3>
209
- <a name="cairo-font-weight-t"></a>enum cairo_font_weight_t</h3>
210
- <a class="indexterm" name="id2583395"></a><pre class="programlisting">typedef enum _cairo_font_weight {
211
- CAIRO_FONT_WEIGHT_NORMAL,
212
- CAIRO_FONT_WEIGHT_BOLD
213
- } cairo_font_weight_t;
214
- </pre>
215
- <p>
216
- Specifies variants of a font face based on their weight.</p>
217
- <p>
218
-
219
- </p>
220
- <div class="variablelist"><table border="0">
221
- <col align="left" valign="top">
222
- <tbody>
223
- <tr>
224
- <td><p><span class="term"><a name="CAIRO-FONT-WEIGHT-NORMAL:CAPS"></a><code class="literal">CAIRO_FONT_WEIGHT_NORMAL</code></span></p></td>
225
- <td> Normal font weight
226
- </td>
227
- </tr>
228
- <tr>
229
- <td><p><span class="term"><a name="CAIRO-FONT-WEIGHT-BOLD:CAPS"></a><code class="literal">CAIRO_FONT_WEIGHT_BOLD</code></span></p></td>
230
- <td> Bold font weight
231
- </td>
232
- </tr>
233
- </tbody>
234
- </table></div>
235
- </div>
236
- <hr>
237
- <div class="refsect2" lang="en">
238
- <a name="id2583462"></a><h3>
239
- <a name="cairo-select-font-face"></a>cairo_select_font_face ()</h3>
240
- <a class="indexterm" name="id2583474"></a><pre class="programlisting">void cairo_select_font_face (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
241
- const char *family,
242
- <a class="link" href="cairo-Text.html#cairo-font-slant-t">cairo_font_slant_t</a> slant,
243
- <a class="link" href="cairo-Text.html#cairo-font-weight-t">cairo_font_weight_t</a> weight);</pre>
244
- <p>
245
- Note: The <a class="link" href="cairo-Text.html#cairo-select-font-face"><code class="function">cairo_select_font_face()</code></a> function call is part of what
246
- the cairo designers call the "toy" text API. It is convenient for
247
- short demos and simple programs, but it is not expected to be
248
- adequate for serious text-using applications.
249
- </p>
250
- <p>
251
- Selects a family and style of font from a simplified description as
252
- a family name, slant and weight. Cairo provides no operation to
253
- list available family names on the system (this is a "toy",
254
- remember"), but the standard CSS2 generic family names, ("serif",
255
- "sans-serif", "cursive", "fantasy", "monospace"), are likely to
256
- work as expected.
257
- </p>
258
- <p>
259
- For "real" font selection, see the font-backend-specific
260
- font_face_create functions for the font backend you are using. (For
261
- example, if you are using the freetype-based cairo-ft font backend,
262
- see <a class="link" href="cairo-FreeType-Fonts.html#cairo-ft-font-face-create-for-ft-face"><code class="function">cairo_ft_font_face_create_for_ft_face()</code></a> or
263
- <a class="link" href="cairo-FreeType-Fonts.html#cairo-ft-font-face-create-for-pattern"><code class="function">cairo_ft_font_face_create_for_pattern()</code></a>.) The resulting font face
264
- could then be used with <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-create"><code class="function">cairo_scaled_font_create()</code></a> and
265
- <a class="link" href="cairo-Text.html#cairo-set-scaled-font"><code class="function">cairo_set_scaled_font()</code></a>.
266
- </p>
267
- <p>
268
- Similarly, when using the "real" font support, you can call
269
- directly into the underlying font system, (such as fontconfig or
270
- freetype), for operations such as listing available fonts, etc.
271
- </p>
272
- <p>
273
- It is expected that most applications will need to use a more
274
- comprehensive font handling and text layout library, (for example,
275
- pango), in conjunction with cairo.
276
- </p>
277
- <p>
278
- If text is drawn without a call to <a class="link" href="cairo-Text.html#cairo-select-font-face"><code class="function">cairo_select_font_face()</code></a>, (nor
279
- <a class="link" href="cairo-Text.html#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"><code class="function">cairo_set_scaled_font()</code></a>), the default
280
- family is "sans", slant is <a class="link" href="cairo-Text.html#CAIRO-FONT-SLANT-NORMAL:CAPS"><code class="literal">CAIRO_FONT_SLANT_NORMAL</code></a>, and weight is
281
- <a class="link" href="cairo-Text.html#CAIRO-FONT-WEIGHT-NORMAL:CAPS"><code class="literal">CAIRO_FONT_WEIGHT_NORMAL</code></a>.</p>
282
- <p>
283
-
284
- </p>
285
- <div class="variablelist"><table border="0">
286
- <col align="left" valign="top">
287
- <tbody>
288
- <tr>
289
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
290
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
291
- </td>
292
- </tr>
293
- <tr>
294
- <td><p><span class="term"><em class="parameter"><code>family</code></em>&#160;:</span></p></td>
295
- <td> a font family name, encoded in UTF-8
296
- </td>
297
- </tr>
298
- <tr>
299
- <td><p><span class="term"><em class="parameter"><code>slant</code></em>&#160;:</span></p></td>
300
- <td> the slant for the font
301
- </td>
302
- </tr>
303
- <tr>
304
- <td><p><span class="term"><em class="parameter"><code>weight</code></em>&#160;:</span></p></td>
305
- <td> the weight for the font
306
- </td>
307
- </tr>
308
- </tbody>
309
- </table></div>
310
- </div>
311
- <hr>
312
- <div class="refsect2" lang="en">
313
- <a name="id2583720"></a><h3>
314
- <a name="cairo-set-font-size"></a>cairo_set_font_size ()</h3>
315
- <a class="indexterm" name="id2583733"></a><pre class="programlisting">void cairo_set_font_size (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
316
- double size);</pre>
317
- <p>
318
- Sets the current font matrix to a scale by a factor of <em class="parameter"><code>size</code></em>, replacing
319
- any font matrix previously set with <a class="link" href="cairo-Text.html#cairo-set-font-size"><code class="function">cairo_set_font_size()</code></a> or
320
- <a class="link" href="cairo-Text.html#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
321
- units. (More precisely, this matrix will result in the font's
322
- em-square being a <em class="parameter"><code>size</code></em> by <em class="parameter"><code>size</code></em> square in user space.)
323
- </p>
324
- <p>
325
- If text is drawn without a call to <a class="link" href="cairo-Text.html#cairo-set-font-size"><code class="function">cairo_set_font_size()</code></a>, (nor
326
- <a class="link" href="cairo-Text.html#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"><code class="function">cairo_set_scaled_font()</code></a>), the default
327
- font size is 10.0.</p>
328
- <p>
329
-
330
- </p>
331
- <div class="variablelist"><table border="0">
332
- <col align="left" valign="top">
333
- <tbody>
334
- <tr>
335
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
336
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
337
- </td>
338
- </tr>
339
- <tr>
340
- <td><p><span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></p></td>
341
- <td> the new font size, in user space units
342
- </td>
343
- </tr>
344
- </tbody>
345
- </table></div>
346
- </div>
347
- <hr>
348
- <div class="refsect2" lang="en">
349
- <a name="id2647416"></a><h3>
350
- <a name="cairo-set-font-matrix"></a>cairo_set_font_matrix ()</h3>
351
- <a class="indexterm" name="id2647426"></a><pre class="programlisting">void cairo_set_font_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
352
- const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre>
353
- <p>
354
- Sets the current font matrix to <em class="parameter"><code>matrix</code></em>. The font matrix gives a
355
- transformation from the design space of the font (in this space,
356
- the em-square is 1 unit by 1 unit) to user space. Normally, a
357
- simple scale is used (see <a class="link" href="cairo-Text.html#cairo-set-font-size"><code class="function">cairo_set_font_size()</code></a>), but a more
358
- complex font matrix can be used to shear the font
359
- or stretch it unequally along the two axes</p>
360
- <p>
361
-
362
- </p>
363
- <div class="variablelist"><table border="0">
364
- <col align="left" valign="top">
365
- <tbody>
366
- <tr>
367
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
368
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
369
- </td>
370
- </tr>
371
- <tr>
372
- <td><p><span class="term"><em class="parameter"><code>matrix</code></em>&#160;:</span></p></td>
373
- <td> a <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t"><span class="type">cairo_matrix_t</span></a> describing a transform to be applied to
374
- the current font.
375
- </td>
376
- </tr>
377
- </tbody>
378
- </table></div>
379
- </div>
380
- <hr>
381
- <div class="refsect2" lang="en">
382
- <a name="id2647522"></a><h3>
383
- <a name="cairo-get-font-matrix"></a>cairo_get_font_matrix ()</h3>
384
- <a class="indexterm" name="id2647533"></a><pre class="programlisting">void cairo_get_font_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
385
- <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre>
386
- <p>
387
- Stores the current font matrix into <em class="parameter"><code>matrix</code></em>. See
388
- <a class="link" href="cairo-Text.html#cairo-set-font-matrix"><code class="function">cairo_set_font_matrix()</code></a>.</p>
389
- <p>
390
-
391
- </p>
392
- <div class="variablelist"><table border="0">
393
- <col align="left" valign="top">
394
- <tbody>
395
- <tr>
396
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
397
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
398
- </td>
399
- </tr>
400
- <tr>
401
- <td><p><span class="term"><em class="parameter"><code>matrix</code></em>&#160;:</span></p></td>
402
- <td> return value for the matrix
403
- </td>
404
- </tr>
405
- </tbody>
406
- </table></div>
407
- </div>
408
- <hr>
409
- <div class="refsect2" lang="en">
410
- <a name="id2647617"></a><h3>
411
- <a name="cairo-set-font-options"></a>cairo_set_font_options ()</h3>
412
- <a class="indexterm" name="id2647627"></a><pre class="programlisting">void cairo_set_font_options (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
413
- const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
414
- <p>
415
- Sets a set of custom font rendering options for the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>.
416
- Rendering options are derived by merging these options with the
417
- options derived from underlying surface; if the value in <em class="parameter"><code>options</code></em>
418
- has a default value (like <a class="link" href="cairo-cairo-t.html#CAIRO-ANTIALIAS-DEFAULT:CAPS"><code class="literal">CAIRO_ANTIALIAS_DEFAULT</code></a>), then the value
419
- from the surface is used.</p>
420
- <p>
421
-
422
- </p>
423
- <div class="variablelist"><table border="0">
424
- <col align="left" valign="top">
425
- <tbody>
426
- <tr>
427
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
428
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
429
- </td>
430
- </tr>
431
- <tr>
432
- <td><p><span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></p></td>
433
- <td> font options to use
434
- </td>
435
- </tr>
436
- </tbody>
437
- </table></div>
438
- </div>
439
- <hr>
440
- <div class="refsect2" lang="en">
441
- <a name="id2647721"></a><h3>
442
- <a name="cairo-get-font-options"></a>cairo_get_font_options ()</h3>
443
- <a class="indexterm" name="id2647732"></a><pre class="programlisting">void cairo_get_font_options (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
444
- <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
445
- <p>
446
- Retrieves font rendering options set via <a class="link" href="cairo-Text.html#cairo-set-font-options"><span class="type">cairo_set_font_options</span></a>.
447
- Note that the returned options do not include any options derived
448
- from the underlying surface; they are literally the options
449
- passed to <a class="link" href="cairo-Text.html#cairo-set-font-options"><code class="function">cairo_set_font_options()</code></a>.</p>
450
- <p>
451
-
452
- </p>
453
- <div class="variablelist"><table border="0">
454
- <col align="left" valign="top">
455
- <tbody>
456
- <tr>
457
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
458
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
459
- </td>
460
- </tr>
461
- <tr>
462
- <td><p><span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></p></td>
463
- <td> a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a> object into which to store
464
- the retrieved options. All existing values are overwritten
465
- </td>
466
- </tr>
467
- </tbody>
468
- </table></div>
469
- </div>
470
- <hr>
471
- <div class="refsect2" lang="en">
472
- <a name="id2647826"></a><h3>
473
- <a name="cairo-set-font-face"></a>cairo_set_font_face ()</h3>
474
- <a class="indexterm" name="id2647837"></a><pre class="programlisting">void cairo_set_font_face (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
475
- <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre>
476
- <p>
477
- Replaces the current <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a> object in the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> with
478
- <em class="parameter"><code>font_face</code></em>. The replaced font face in the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> will be
479
- destroyed if there are no other references to it.</p>
480
- <p>
481
-
482
- </p>
483
- <div class="variablelist"><table border="0">
484
- <col align="left" valign="top">
485
- <tbody>
486
- <tr>
487
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
488
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
489
- </td>
490
- </tr>
491
- <tr>
492
- <td><p><span class="term"><em class="parameter"><code>font_face</code></em>&#160;:</span></p></td>
493
- <td> a <a class="link" href="cairo-cairo-font-face-t.html#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
494
- </td>
495
- </tr>
496
- </tbody>
497
- </table></div>
498
- </div>
499
- <hr>
500
- <div class="refsect2" lang="en">
501
- <a name="id2647947"></a><h3>
502
- <a name="cairo-get-font-face"></a>cairo_get_font_face ()</h3>
503
- <a class="indexterm" name="id2647958"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_get_font_face (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
504
- <p>
505
- Gets the current font face for a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>.</p>
506
- <p>
507
-
508
- </p>
509
- <div class="variablelist"><table border="0">
510
- <col align="left" valign="top">
511
- <tbody>
512
- <tr>
513
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
514
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
515
- </td>
516
- </tr>
517
- <tr>
518
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
519
- <td> the current font face. This object is owned by
520
- cairo. To keep a reference to it, you must call
521
- cairo_font_face_reference.
522
-
523
- This function never returns <code class="literal">NULL</code>. If memory cannot be allocated, a
524
- special "nil" <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a> object will be returned on which
525
- <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-status"><code class="function">cairo_font_face_status()</code></a> returns <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. Using
526
- this nil object will cause its error state to propagate to other
527
- objects it is passed to, (for example, calling
528
- <a class="link" href="cairo-Text.html#cairo-set-font-face"><code class="function">cairo_set_font_face()</code></a> with a nil font will trigger an error that
529
- will shutdown the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> object).
530
- </td>
531
- </tr>
532
- </tbody>
533
- </table></div>
534
- </div>
535
- <hr>
536
- <div class="refsect2" lang="en">
537
- <a name="id2648077"></a><h3>
538
- <a name="cairo-set-scaled-font"></a>cairo_set_scaled_font ()</h3>
539
- <a class="indexterm" name="id2648090"></a><pre class="programlisting">void cairo_set_scaled_font (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
540
- const <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre>
541
- <p>
542
- Replaces the current font face, font matrix, and font options in
543
- the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> with those of the <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>. Except for
544
- some translation, the current CTM of the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> should be the
545
- same as that of the <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>, which can be accessed
546
- using <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-get-ctm"><code class="function">cairo_scaled_font_get_ctm()</code></a>.</p>
547
- <p>
548
-
549
- </p>
550
- <div class="variablelist"><table border="0">
551
- <col align="left" valign="top">
552
- <tbody>
553
- <tr>
554
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
555
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
556
- </td>
557
- </tr>
558
- <tr>
559
- <td><p><span class="term"><em class="parameter"><code>scaled_font</code></em>&#160;:</span></p></td>
560
- <td> a <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>
561
- </td>
562
- </tr>
563
- </tbody>
564
- </table></div>
565
- <p class="since">Since 1.2
566
- </p>
567
- </div>
568
- <hr>
569
- <div class="refsect2" lang="en">
570
- <a name="id2648209"></a><h3>
571
- <a name="cairo-get-scaled-font"></a>cairo_get_scaled_font ()</h3>
572
- <a class="indexterm" name="id2648221"></a><pre class="programlisting"><a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* cairo_get_scaled_font (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre>
573
- <p>
574
- Gets the current scaled font for a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>.</p>
575
- <p>
576
-
577
- </p>
578
- <div class="variablelist"><table border="0">
579
- <col align="left" valign="top">
580
- <tbody>
581
- <tr>
582
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
583
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
584
- </td>
585
- </tr>
586
- <tr>
587
- <td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
588
- <td> the current scaled font. This object is owned by
589
- cairo. To keep a reference to it, you must call
590
- <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-reference"><code class="function">cairo_scaled_font_reference()</code></a>.
591
-
592
- This function never returns <code class="literal">NULL</code>. If memory cannot be allocated, a
593
- special "nil" <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a> object will be returned on which
594
- <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-status"><code class="function">cairo_scaled_font_status()</code></a> returns <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. Using
595
- this nil object will cause its error state to propagate to other
596
- objects it is passed to, (for example, calling
597
- <a class="link" href="cairo-Text.html#cairo-set-scaled-font"><code class="function">cairo_set_scaled_font()</code></a> with a nil font will trigger an error that
598
- will shutdown the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> object).
599
-
600
- </td>
601
- </tr>
602
- </tbody>
603
- </table></div>
604
- <p class="since">Since 1.4
605
- </p>
606
- </div>
607
- <hr>
608
- <div class="refsect2" lang="en">
609
- <a name="id2648356"></a><h3>
610
- <a name="cairo-show-text"></a>cairo_show_text ()</h3>
611
- <a class="indexterm" name="id2648366"></a><pre class="programlisting">void cairo_show_text (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
612
- const char *utf8);</pre>
613
- <p>
614
- A drawing operator that generates the shape from a string of UTF-8
615
- characters, rendered according to the current font_face, font_size
616
- (font_matrix), and font_options.
617
- </p>
618
- <p>
619
- This function first computes a set of glyphs for the string of
620
- text. The first glyph is placed so that its origin is at the
621
- current point. The origin of each subsequent glyph is offset from
622
- that of the previous glyph by the advance values of the previous
623
- glyph.
624
- </p>
625
- <p>
626
- After this call the current point is moved to the origin of where
627
- the next glyph would be placed in this same progression. That is,
628
- the current point will be at the origin of the final glyph offset
629
- by its advance values. This allows for easy display of a single
630
- logical string with multiple calls to <a class="link" href="cairo-Text.html#cairo-show-text"><code class="function">cairo_show_text()</code></a>.
631
- </p>
632
- <p>
633
- Note: The <a class="link" href="cairo-Text.html#cairo-show-text"><code class="function">cairo_show_text()</code></a> function call is part of what the cairo
634
- designers call the "toy" text API. It is convenient for short demos
635
- and simple programs, but it is not expected to be adequate for
636
- serious text-using applications. See <a class="link" href="cairo-Text.html#cairo-show-glyphs"><code class="function">cairo_show_glyphs()</code></a> for the
637
- "real" text display API in cairo.</p>
638
- <p>
639
-
640
- </p>
641
- <div class="variablelist"><table border="0">
642
- <col align="left" valign="top">
643
- <tbody>
644
- <tr>
645
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
646
- <td> a cairo context
647
- </td>
648
- </tr>
649
- <tr>
650
- <td><p><span class="term"><em class="parameter"><code>utf8</code></em>&#160;:</span></p></td>
651
- <td> a string of text encoded in UTF-8
652
- </td>
653
- </tr>
654
- </tbody>
655
- </table></div>
656
- </div>
657
- <hr>
658
- <div class="refsect2" lang="en">
659
- <a name="id2648481"></a><h3>
660
- <a name="cairo-show-glyphs"></a>cairo_show_glyphs ()</h3>
661
- <a class="indexterm" name="id2648492"></a><pre class="programlisting">void cairo_show_glyphs (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
662
- const <a class="link" href="cairo-Text.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs,
663
- int num_glyphs);</pre>
664
- <p>
665
- A drawing operator that generates the shape from an array of glyphs,
666
- rendered according to the current font_face, font_size
667
- (font_matrix), and font_options.</p>
668
- <p>
669
-
670
- </p>
671
- <div class="variablelist"><table border="0">
672
- <col align="left" valign="top">
673
- <tbody>
674
- <tr>
675
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
676
- <td> a cairo context
677
- </td>
678
- </tr>
679
- <tr>
680
- <td><p><span class="term"><em class="parameter"><code>glyphs</code></em>&#160;:</span></p></td>
681
- <td> array of glyphs to show
682
- </td>
683
- </tr>
684
- <tr>
685
- <td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em>&#160;:</span></p></td>
686
- <td> number of glyphs to show
687
- </td>
688
- </tr>
689
- </tbody>
690
- </table></div>
691
- </div>
692
- <hr>
693
- <div class="refsect2" lang="en">
694
- <a name="id2648577"></a><h3>
695
- <a name="cairo-font-extents"></a>cairo_font_extents ()</h3>
696
- <a class="indexterm" name="id2648587"></a><pre class="programlisting">void cairo_font_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
697
- <a class="link" href="cairo-Scaled-Fonts.html#cairo-font-extents-t">cairo_font_extents_t</a> *extents);</pre>
698
- <p>
699
- Gets the font extents for the currently selected font.</p>
700
- <p>
701
-
702
- </p>
703
- <div class="variablelist"><table border="0">
704
- <col align="left" valign="top">
705
- <tbody>
706
- <tr>
707
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
708
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
709
- </td>
710
- </tr>
711
- <tr>
712
- <td><p><span class="term"><em class="parameter"><code>extents</code></em>&#160;:</span></p></td>
713
- <td> a <a class="link" href="cairo-Scaled-Fonts.html#cairo-font-extents-t"><span class="type">cairo_font_extents_t</span></a> object into which the results
714
- will be stored.
715
- </td>
716
- </tr>
717
- </tbody>
718
- </table></div>
719
- </div>
720
- <hr>
721
- <div class="refsect2" lang="en">
722
- <a name="id2648665"></a><h3>
723
- <a name="cairo-text-extents"></a>cairo_text_extents ()</h3>
724
- <a class="indexterm" name="id2648675"></a><pre class="programlisting">void cairo_text_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
725
- const char *utf8,
726
- <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);</pre>
727
- <p>
728
- Gets the extents for a string of text. The extents describe a
729
- user-space rectangle that encloses the "inked" portion of the text,
730
- (as it would be drawn by <a class="link" href="cairo-Text.html#cairo-show-text"><code class="function">cairo_show_text()</code></a>). Additionally, the
731
- x_advance and y_advance values indicate the amount by which the
732
- current point would be advanced by <a class="link" href="cairo-Text.html#cairo-show-text"><code class="function">cairo_show_text()</code></a>.
733
- </p>
734
- <p>
735
- Note that whitespace characters do not directly contribute to the
736
- size of the rectangle (extents.width and extents.height). They do
737
- contribute indirectly by changing the position of non-whitespace
738
- characters. In particular, trailing whitespace characters are
739
- likely to not affect the size of the rectangle, though they will
740
- affect the x_advance and y_advance values.</p>
741
- <p>
742
-
743
- </p>
744
- <div class="variablelist"><table border="0">
745
- <col align="left" valign="top">
746
- <tbody>
747
- <tr>
748
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
749
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
750
- </td>
751
- </tr>
752
- <tr>
753
- <td><p><span class="term"><em class="parameter"><code>utf8</code></em>&#160;:</span></p></td>
754
- <td> a string of text, encoded in UTF-8
755
- </td>
756
- </tr>
757
- <tr>
758
- <td><p><span class="term"><em class="parameter"><code>extents</code></em>&#160;:</span></p></td>
759
- <td> a <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t"><span class="type">cairo_text_extents_t</span></a> object into which the results
760
- will be stored
761
- </td>
762
- </tr>
763
- </tbody>
764
- </table></div>
765
- </div>
766
- <hr>
767
- <div class="refsect2" lang="en">
768
- <a name="id2648803"></a><h3>
769
- <a name="cairo-glyph-extents"></a>cairo_glyph_extents ()</h3>
770
- <a class="indexterm" name="id2648813"></a><pre class="programlisting">void cairo_glyph_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,
771
- const <a class="link" href="cairo-Text.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs,
772
- int num_glyphs,
773
- <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);</pre>
774
- <p>
775
- Gets the extents for an array of glyphs. The extents describe a
776
- user-space rectangle that encloses the "inked" portion of the
777
- glyphs, (as they would be drawn by <a class="link" href="cairo-Text.html#cairo-show-glyphs"><code class="function">cairo_show_glyphs()</code></a>).
778
- Additionally, the x_advance and y_advance values indicate the
779
- amount by which the current point would be advanced by
780
- cairo_show_glyphs.
781
- </p>
782
- <p>
783
- Note that whitespace glyphs do not contribute to the size of the
784
- rectangle (extents.width and extents.height).</p>
785
- <p>
786
-
787
- </p>
788
- <div class="variablelist"><table border="0">
789
- <col align="left" valign="top">
790
- <tbody>
791
- <tr>
792
- <td><p><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></p></td>
793
- <td> a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>
794
- </td>
795
- </tr>
796
- <tr>
797
- <td><p><span class="term"><em class="parameter"><code>glyphs</code></em>&#160;:</span></p></td>
798
- <td> an array of <a class="link" href="cairo-Text.html#cairo-glyph-t"><span class="type">cairo_glyph_t</span></a> objects
799
- </td>
800
- </tr>
801
- <tr>
802
- <td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em>&#160;:</span></p></td>
803
- <td> the number of elements in <em class="parameter"><code>glyphs</code></em>
804
- </td>
805
- </tr>
806
- <tr>
807
- <td><p><span class="term"><em class="parameter"><code>extents</code></em>&#160;:</span></p></td>
808
- <td> a <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t"><span class="type">cairo_text_extents_t</span></a> object into which the results
809
- will be stored
810
- </td>
811
- </tr>
812
- </tbody>
813
- </table></div>
814
- </div>
815
- </div>
816
- <div class="refsect1" lang="en">
817
- <a name="id2648959"></a><h2>See Also</h2>
818
- <p>
819
- </p>
820
- <div class="itemizedlist"><ul type="disc">
821
- <li><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a></li>
822
- <li><a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a></li>
823
- <li><a class="link" href="cairo-Paths.html#cairo-text-path"><code class="function">cairo_text_path()</code></a></li>
824
- <li><a class="link" href="cairo-Paths.html#cairo-glyph-path"><code class="function">cairo_glyph_path()</code></a></li>
825
- </ul></div>
826
- <p>
827
- </p>
828
- </div>
829
- <div class="refsect1" lang="en">
830
- <a name="id2649005"></a><div class="refsect2" lang="en"><a name="id2649006"></a></div>
831
- <hr>
832
- <div class="refsect2" lang="en"><a name="id2649008"></a></div>
833
- </div>
834
- </div>
835
- </body>
836
- </html>