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
data/cairo/README.txt
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
What's here
|
3
|
+
===========
|
4
|
+
The official ZLIB1.DLL
|
5
|
+
|
6
|
+
|
7
|
+
Source
|
8
|
+
======
|
9
|
+
zlib version 1.2.3
|
10
|
+
available at http://www.gzip.org/zlib/
|
11
|
+
|
12
|
+
|
13
|
+
Specification and rationale
|
14
|
+
===========================
|
15
|
+
See the accompanying DLL_FAQ.txt
|
16
|
+
|
17
|
+
|
18
|
+
Usage
|
19
|
+
=====
|
20
|
+
See the accompanying USAGE.txt
|
21
|
+
|
22
|
+
|
23
|
+
Build info
|
24
|
+
==========
|
25
|
+
Contributed by Gilles Vollant <info@winimage.com>
|
26
|
+
|
27
|
+
Compiler: Microsoft Visual C++ Toolkit 2003
|
28
|
+
Library: Microsoft Visual C++ 6.0 (to link with MSVCRT.DLL)
|
29
|
+
|
30
|
+
|
31
|
+
Copyright notice
|
32
|
+
================
|
33
|
+
(C) 1995-2005 Jean-loup Gailly and Mark Adler
|
34
|
+
|
35
|
+
This software is provided 'as-is', without any express or implied
|
36
|
+
warranty. In no event will the authors be held liable for any damages
|
37
|
+
arising from the use of this software.
|
38
|
+
|
39
|
+
Permission is granted to anyone to use this software for any purpose,
|
40
|
+
including commercial applications, and to alter it and redistribute it
|
41
|
+
freely, subject to the following restrictions:
|
42
|
+
|
43
|
+
1. The origin of this software must not be misrepresented; you must not
|
44
|
+
claim that you wrote the original software. If you use this software
|
45
|
+
in a product, an acknowledgment in the product documentation would be
|
46
|
+
appreciated but is not required.
|
47
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
48
|
+
misrepresented as being the original software.
|
49
|
+
3. This notice may not be removed or altered from any source distribution.
|
50
|
+
|
51
|
+
Jean-loup Gailly Mark Adler
|
52
|
+
jloup@gzip.org madler@alumni.caltech.edu
|
53
|
+
|
data/cairo/USAGE.txt
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
|
2
|
+
Installing ZLIB1.DLL
|
3
|
+
====================
|
4
|
+
Copy ZLIB1.DLL to the SYSTEM or the SYSTEM32 directory.
|
5
|
+
|
6
|
+
|
7
|
+
Using ZLIB1.DLL with Microsoft Visual C++
|
8
|
+
=========================================
|
9
|
+
1. Install the supplied header files "zlib.h" and "zconf.h"
|
10
|
+
into a directory found in the INCLUDE path list.
|
11
|
+
|
12
|
+
2. Install the supplied library files "zdll.exp" and "zdll.lib"
|
13
|
+
into a directory found in the LIB path list.
|
14
|
+
|
15
|
+
3. Add "zdll.exp" or "zdll.lib" to your project.
|
16
|
+
|
17
|
+
Notes:
|
18
|
+
- Usually, you don't need both the .exp file and the .lib file.
|
19
|
+
- If you wish, you may rename "zdll.exp" to "zlib1.exp", and/or
|
20
|
+
rename "zdll.lib" to "zlib1.lib".
|
21
|
+
|
22
|
+
|
23
|
+
Using ZLIB1.DLL with Borland C++
|
24
|
+
================================
|
25
|
+
1. Install the supplied header files "zlib.h" and "zconf.h"
|
26
|
+
into a directory found in the INCLUDE path list.
|
27
|
+
|
28
|
+
2. Build the import library using the IMPLIB tool:
|
29
|
+
implib -a -c -f lib\zdllbor.lib zlib1.dll
|
30
|
+
|
31
|
+
OR
|
32
|
+
|
33
|
+
2' Convert the supplied library file "zdll.lib" to OMF format,
|
34
|
+
using the COFF2OMF tool:
|
35
|
+
coff2omf lib\zdll.lib lib\zdllbor.lib
|
36
|
+
|
37
|
+
3. Install "zdllbor.lib" into a directory found in the LIB path
|
38
|
+
list.
|
39
|
+
|
40
|
+
4. Add "zdllbor.lib" to your project.
|
41
|
+
|
42
|
+
Notes:
|
43
|
+
- The modules that are linked with "zdllbor.lib" must be compiled
|
44
|
+
using a 4-byte alignment (option -a):
|
45
|
+
bcc32 -a -c myprog.c
|
46
|
+
bcc32 myprog.obj zdllbor.lib
|
47
|
+
- If you wish, you may use "zlib1.lib" instead of "zdllbor.lib".
|
48
|
+
|
49
|
+
|
50
|
+
Using ZLIB1.DLL with gcc/MinGW
|
51
|
+
==============================
|
52
|
+
1. Install the supplied header files "zlib.h" and "zconf.h"
|
53
|
+
into the INCLUDE directory.
|
54
|
+
|
55
|
+
2. Build the import library from the supplied "zlib.def":
|
56
|
+
dlltool -D zlib1.dll -d lib/zlib.def -l lib/libzdll.a
|
57
|
+
|
58
|
+
OR
|
59
|
+
|
60
|
+
2' Copy the supplied library file "zdll.lib" to "libzdll.a":
|
61
|
+
cp lib/zdll.lib lib/libzdll.a
|
62
|
+
|
63
|
+
3. Install "libzdll.a" into the LIB directory.
|
64
|
+
|
65
|
+
4. Add "libzdll.a" to your project, or use the -lzdll option.
|
66
|
+
|
67
|
+
|
68
|
+
Using ZLIB1.DLL with gcc/Cygwin
|
69
|
+
===============================
|
70
|
+
ZLIB1.DLL is not designed to work with Cygwin. The Cygwin
|
71
|
+
system has its own DLL build of zlib, named CYGZ.DLL.
|
72
|
+
|
73
|
+
|
74
|
+
Rebuilding ZLIB1.DLL
|
75
|
+
====================
|
76
|
+
Depending on your build environment, use the appropriate
|
77
|
+
makefile from the win32/ directory, found in the zlib source
|
78
|
+
distribution.
|
79
|
+
|
80
|
+
Your custom build has to comply with the requirements stated
|
81
|
+
in DLL_FAQ.txt, including (but not limited to) the following:
|
82
|
+
- It must be built from an unaltered zlib source distribution.
|
83
|
+
- It must be linked to MSVCRT.DLL.
|
84
|
+
- The macros that compile out certain portions of the zlib
|
85
|
+
code (such as NO_GZCOMPRESS, NO_GZIP) must not be enabled.
|
86
|
+
- The ZLIB_WINAPI macro must not be enabled.
|
87
|
+
|
88
|
+
Furthermore, it has to run successfully with the test suite
|
89
|
+
found in this package.
|
90
|
+
|
91
|
+
It is recommended, however, to use the supplied ZLIB1.DLL,
|
92
|
+
instead of rebuilding it yourself. You should rebuild it
|
93
|
+
only if you have a special reason.
|
94
|
+
|
data/cairo/bin/libcairo-2.dll
CHANGED
Binary file
|
data/cairo/bin/libpng12-0.dll
CHANGED
Binary file
|
data/cairo/bin/zlib1.dll
CHANGED
Binary file
|
@@ -52,8 +52,6 @@
|
|
52
52
|
|
53
53
|
#define CAIRO_FONT_TYPE_ATSUI CAIRO_FONT_TYPE_QUARTZ
|
54
54
|
|
55
|
-
#ifndef _CAIROINT_H_
|
56
|
-
|
57
55
|
/* Obsolete functions. These definitions exist to coerce the compiler
|
58
56
|
* into providing a little bit of guidance with its error
|
59
57
|
* messages. The idea is to help users port their old code without
|
@@ -137,6 +135,4 @@
|
|
137
135
|
#define cairo_get_status_string cairo_get_status_string_DEPRECATED_BY_cairo_status_AND_cairo_status_to_string
|
138
136
|
#define cairo_status_string cairo_status_string_DEPRECATED_BY_cairo_status_AND_cairo_status_to_string
|
139
137
|
|
140
|
-
#endif
|
141
|
-
|
142
138
|
#endif /* CAIRO_DEPRECATED_H */
|
@@ -1,35 +1,20 @@
|
|
1
|
-
/* Generated by configure. Do not edit */
|
1
|
+
/* Generated by configure. Do not edit. */
|
2
2
|
#ifndef CAIRO_FEATURES_H
|
3
3
|
#define CAIRO_FEATURES_H
|
4
4
|
|
5
|
-
#
|
6
|
-
# define CAIRO_BEGIN_DECLS extern "C" {
|
7
|
-
# define CAIRO_END_DECLS }
|
8
|
-
#else
|
9
|
-
# define CAIRO_BEGIN_DECLS
|
10
|
-
# define CAIRO_END_DECLS
|
11
|
-
#endif
|
12
|
-
|
13
|
-
#ifndef cairo_public
|
14
|
-
# define cairo_public
|
15
|
-
#endif
|
16
|
-
|
17
|
-
#define CAIRO_VERSION_MAJOR 1
|
18
|
-
#define CAIRO_VERSION_MINOR 6
|
19
|
-
#define CAIRO_VERSION_MICRO 4
|
20
|
-
|
21
|
-
#define CAIRO_VERSION_STRING "1.6.4"
|
22
|
-
|
23
|
-
#define CAIRO_HAS_SVG_SURFACE 1
|
5
|
+
#define CAIRO_HAS_IMAGE_SURFACE 1
|
24
6
|
#define CAIRO_HAS_PDF_SURFACE 1
|
25
|
-
#define CAIRO_HAS_PS_SURFACE 1
|
26
7
|
#define CAIRO_HAS_PNG_FUNCTIONS 1
|
8
|
+
#define CAIRO_HAS_PS_SURFACE 1
|
9
|
+
#define CAIRO_HAS_SVG_SURFACE 1
|
10
|
+
#define CAIRO_HAS_USER_FONT 1
|
27
11
|
#define CAIRO_HAS_WIN32_FONT 1
|
28
12
|
#define CAIRO_HAS_WIN32_SURFACE 1
|
29
13
|
|
14
|
+
/*#undef CAIRO_HAS_FT_FONT */
|
30
15
|
/*#undef CAIRO_HAS_QUARTZ_FONT */
|
31
16
|
/*#undef CAIRO_HAS_QUARTZ_SURFACE */
|
32
|
-
/*#undef CAIRO_HAS_XLIB_XRENDER_SURFACE */
|
33
17
|
/*#undef CAIRO_HAS_XLIB_SURFACE */
|
18
|
+
/*#undef CAIRO_HAS_XLIB_XRENDER_SURFACE */
|
34
19
|
|
35
20
|
#endif
|
@@ -37,7 +37,7 @@
|
|
37
37
|
#ifndef _CAIRO_WIN32_H_
|
38
38
|
#define _CAIRO_WIN32_H_
|
39
39
|
|
40
|
-
#include
|
40
|
+
#include "cairo.h"
|
41
41
|
|
42
42
|
#if CAIRO_HAS_WIN32_SURFACE
|
43
43
|
|
@@ -68,6 +68,12 @@ cairo_win32_surface_get_dc (cairo_surface_t *surface);
|
|
68
68
|
cairo_public cairo_surface_t *
|
69
69
|
cairo_win32_surface_get_image (cairo_surface_t *surface);
|
70
70
|
|
71
|
+
#if CAIRO_HAS_WIN32_FONT
|
72
|
+
|
73
|
+
/*
|
74
|
+
* Win32 font support
|
75
|
+
*/
|
76
|
+
|
71
77
|
cairo_public cairo_font_face_t *
|
72
78
|
cairo_win32_font_face_create_for_logfontw (LOGFONTW *logfont);
|
73
79
|
|
@@ -95,6 +101,8 @@ cairo_public void
|
|
95
101
|
cairo_win32_scaled_font_get_device_to_logical (cairo_scaled_font_t *scaled_font,
|
96
102
|
cairo_matrix_t *device_to_logical);
|
97
103
|
|
104
|
+
#endif /* CAIRO_HAS_WIN32_FONT */
|
105
|
+
|
98
106
|
CAIRO_END_DECLS
|
99
107
|
|
100
108
|
#else /* CAIRO_HAS_WIN32_SURFACE */
|
data/cairo/include/cairo/cairo.h
CHANGED
@@ -38,21 +38,50 @@
|
|
38
38
|
#ifndef CAIRO_H
|
39
39
|
#define CAIRO_H
|
40
40
|
|
41
|
-
#include
|
42
|
-
#include
|
41
|
+
#include "cairo-version.h"
|
42
|
+
#include "cairo-features.h"
|
43
|
+
#include "cairo-deprecated.h"
|
44
|
+
|
45
|
+
#ifdef __cplusplus
|
46
|
+
# define CAIRO_BEGIN_DECLS extern "C" {
|
47
|
+
# define CAIRO_END_DECLS }
|
48
|
+
#else
|
49
|
+
# define CAIRO_BEGIN_DECLS
|
50
|
+
# define CAIRO_END_DECLS
|
51
|
+
#endif
|
52
|
+
|
53
|
+
#ifndef cairo_public
|
54
|
+
# ifdef _MSC_VER
|
55
|
+
# define cairo_public __declspec(dllimport)
|
56
|
+
# else
|
57
|
+
# define cairo_public
|
58
|
+
# endif
|
59
|
+
#endif
|
43
60
|
|
44
61
|
CAIRO_BEGIN_DECLS
|
45
62
|
|
46
|
-
#define CAIRO_VERSION_ENCODE(major, minor, micro) (
|
47
|
-
((major) * 10000)
|
48
|
-
+ ((minor) * 100)
|
63
|
+
#define CAIRO_VERSION_ENCODE(major, minor, micro) ( \
|
64
|
+
((major) * 10000) \
|
65
|
+
+ ((minor) * 100) \
|
49
66
|
+ ((micro) * 1))
|
50
67
|
|
51
|
-
#define CAIRO_VERSION CAIRO_VERSION_ENCODE(
|
52
|
-
CAIRO_VERSION_MAJOR,
|
53
|
-
CAIRO_VERSION_MINOR,
|
68
|
+
#define CAIRO_VERSION CAIRO_VERSION_ENCODE( \
|
69
|
+
CAIRO_VERSION_MAJOR, \
|
70
|
+
CAIRO_VERSION_MINOR, \
|
54
71
|
CAIRO_VERSION_MICRO)
|
55
72
|
|
73
|
+
|
74
|
+
#define CAIRO_VERSION_STRINGIZE_(major, minor, micro) \
|
75
|
+
#major"."#minor"."#micro
|
76
|
+
#define CAIRO_VERSION_STRINGIZE(major, minor, micro) \
|
77
|
+
CAIRO_VERSION_STRINGIZE_(major, minor, micro)
|
78
|
+
|
79
|
+
#define CAIRO_VERSION_STRING CAIRO_VERSION_STRINGIZE( \
|
80
|
+
CAIRO_VERSION_MAJOR, \
|
81
|
+
CAIRO_VERSION_MINOR, \
|
82
|
+
CAIRO_VERSION_MICRO)
|
83
|
+
|
84
|
+
|
56
85
|
cairo_public int
|
57
86
|
cairo_version (void);
|
58
87
|
|
@@ -203,6 +232,13 @@ typedef struct _cairo_user_data_key {
|
|
203
232
|
* @CAIRO_STATUS_CLIP_NOT_REPRESENTABLE: clip region not representable in desired format (Since 1.4)
|
204
233
|
* @CAIRO_STATUS_TEMP_FILE_ERROR: error creating or writing to a temporary file (Since 1.6)
|
205
234
|
* @CAIRO_STATUS_INVALID_STRIDE: invalid value for stride (Since 1.6)
|
235
|
+
* @CAIRO_STATUS_FONT_TYPE_MISMATCH: the font type is not appropriate for the operation (Since 1.8)
|
236
|
+
* @CAIRO_STATUS_USER_FONT_IMMUTABLE: the user-font is immutable (Since 1.8)
|
237
|
+
* @CAIRO_STATUS_USER_FONT_ERROR: error occurred in a user-font callback function (Since 1.8)
|
238
|
+
* @CAIRO_STATUS_NEGATIVE_COUNT: negative number used where it is not allowed (Since 1.8)
|
239
|
+
* @CAIRO_STATUS_INVALID_CLUSTERS: input clusters do not represent the accompanying text and glyph array (Since 1.8)
|
240
|
+
* @CAIRO_STATUS_INVALID_SLANT: invalid value for an input #cairo_font_slant_t (Since 1.8)
|
241
|
+
* @CAIRO_STATUS_INVALID_WEIGHT: invalid value for an input #cairo_font_weight_t (Since 1.8)
|
206
242
|
*
|
207
243
|
* #cairo_status_t is used to indicate errors that can occur when
|
208
244
|
* using Cairo. In some cases it is returned directly by functions.
|
@@ -237,7 +273,14 @@ typedef enum _cairo_status {
|
|
237
273
|
CAIRO_STATUS_INVALID_INDEX,
|
238
274
|
CAIRO_STATUS_CLIP_NOT_REPRESENTABLE,
|
239
275
|
CAIRO_STATUS_TEMP_FILE_ERROR,
|
240
|
-
CAIRO_STATUS_INVALID_STRIDE
|
276
|
+
CAIRO_STATUS_INVALID_STRIDE,
|
277
|
+
CAIRO_STATUS_FONT_TYPE_MISMATCH,
|
278
|
+
CAIRO_STATUS_USER_FONT_IMMUTABLE,
|
279
|
+
CAIRO_STATUS_USER_FONT_ERROR,
|
280
|
+
CAIRO_STATUS_NEGATIVE_COUNT,
|
281
|
+
CAIRO_STATUS_INVALID_CLUSTERS,
|
282
|
+
CAIRO_STATUS_INVALID_SLANT,
|
283
|
+
CAIRO_STATUS_INVALID_WEIGHT
|
241
284
|
/* after adding a new error: update CAIRO_STATUS_LAST_STATUS in cairoint.h */
|
242
285
|
} cairo_status_t;
|
243
286
|
|
@@ -272,8 +315,8 @@ typedef enum _cairo_content {
|
|
272
315
|
* closure which was specified by the user at the time the write
|
273
316
|
* function was registered, the data to write and the length of the
|
274
317
|
* data in bytes. The write function should return
|
275
|
-
* CAIRO_STATUS_SUCCESS if all the data was successfully written,
|
276
|
-
* CAIRO_STATUS_WRITE_ERROR otherwise.
|
318
|
+
* %CAIRO_STATUS_SUCCESS if all the data was successfully written,
|
319
|
+
* %CAIRO_STATUS_WRITE_ERROR otherwise.
|
277
320
|
*
|
278
321
|
* Returns: the status code of the write operation
|
279
322
|
**/
|
@@ -292,8 +335,8 @@ typedef cairo_status_t (*cairo_write_func_t) (void *closure,
|
|
292
335
|
* closure which was specified by the user at the time the read
|
293
336
|
* function was registered, the buffer to read the data into and the
|
294
337
|
* length of the data in bytes. The read function should return
|
295
|
-
* CAIRO_STATUS_SUCCESS if all the data was successfully read,
|
296
|
-
* CAIRO_STATUS_READ_ERROR otherwise.
|
338
|
+
* %CAIRO_STATUS_SUCCESS if all the data was successfully read,
|
339
|
+
* %CAIRO_STATUS_READ_ERROR otherwise.
|
297
340
|
*
|
298
341
|
* Returns: the status code of the read operation
|
299
342
|
**/
|
@@ -811,11 +854,61 @@ typedef struct _cairo_font_face cairo_font_face_t;
|
|
811
854
|
* with respect to the overall origin
|
812
855
|
**/
|
813
856
|
typedef struct {
|
814
|
-
|
815
|
-
|
816
|
-
|
857
|
+
unsigned long index;
|
858
|
+
double x;
|
859
|
+
double y;
|
817
860
|
} cairo_glyph_t;
|
818
861
|
|
862
|
+
cairo_public cairo_glyph_t *
|
863
|
+
cairo_glyph_allocate (int num_glyphs);
|
864
|
+
|
865
|
+
cairo_public void
|
866
|
+
cairo_glyph_free (cairo_glyph_t *glyphs);
|
867
|
+
|
868
|
+
/**
|
869
|
+
* cairo_text_cluster_t:
|
870
|
+
* @num_bytes: the number of bytes of UTF-8 text covered by cluster
|
871
|
+
* @num_glyphs: the number of glyphs covered by cluster
|
872
|
+
*
|
873
|
+
* The #cairo_text_cluster_t structure holds information about a single
|
874
|
+
* <firstterm>text cluster</firstterm>. A text cluster is a minimal
|
875
|
+
* mapping of some glyphs corresponding to some UTF-8 text.
|
876
|
+
*
|
877
|
+
* For a cluster to be valid, both @num_bytes and @num_glyphs should
|
878
|
+
* be non-negative, and at least one should be non-zero.
|
879
|
+
* Note that clusters with zero glyphs are not as well supported as
|
880
|
+
* normal clusters. For example, PDF rendering applications typically
|
881
|
+
* ignore those clusters when PDF text is being selected.
|
882
|
+
*
|
883
|
+
* See cairo_show_text_glyphs() for how clusters are used in advanced
|
884
|
+
* text operations.
|
885
|
+
*
|
886
|
+
* Since: 1.8
|
887
|
+
**/
|
888
|
+
typedef struct {
|
889
|
+
int num_bytes;
|
890
|
+
int num_glyphs;
|
891
|
+
} cairo_text_cluster_t;
|
892
|
+
|
893
|
+
cairo_public cairo_text_cluster_t *
|
894
|
+
cairo_text_cluster_allocate (int num_clusters);
|
895
|
+
|
896
|
+
cairo_public void
|
897
|
+
cairo_text_cluster_free (cairo_text_cluster_t *clusters);
|
898
|
+
|
899
|
+
/**
|
900
|
+
* cairo_text_cluster_flags_t:
|
901
|
+
* @CAIRO_TEXT_CLUSTER_FLAG_BACKWARD: The clusters in the cluster array
|
902
|
+
* map to glyphs in the glyph array from end to start.
|
903
|
+
*
|
904
|
+
* Specifies properties of a text cluster mapping.
|
905
|
+
*
|
906
|
+
* Since: 1.8
|
907
|
+
**/
|
908
|
+
typedef enum _cairo_text_cluster_flags {
|
909
|
+
CAIRO_TEXT_CLUSTER_FLAG_BACKWARD = 0x00000001
|
910
|
+
} cairo_text_cluster_flags_t;
|
911
|
+
|
819
912
|
/**
|
820
913
|
* cairo_text_extents_t:
|
821
914
|
* @x_bearing: the horizontal distance from the origin to the
|
@@ -910,9 +1003,9 @@ typedef struct {
|
|
910
1003
|
* Specifies variants of a font face based on their slant.
|
911
1004
|
**/
|
912
1005
|
typedef enum _cairo_font_slant {
|
913
|
-
|
914
|
-
|
915
|
-
|
1006
|
+
CAIRO_FONT_SLANT_NORMAL,
|
1007
|
+
CAIRO_FONT_SLANT_ITALIC,
|
1008
|
+
CAIRO_FONT_SLANT_OBLIQUE
|
916
1009
|
} cairo_font_slant_t;
|
917
1010
|
|
918
1011
|
/**
|
@@ -923,8 +1016,8 @@ typedef enum _cairo_font_slant {
|
|
923
1016
|
* Specifies variants of a font face based on their weight.
|
924
1017
|
**/
|
925
1018
|
typedef enum _cairo_font_weight {
|
926
|
-
|
927
|
-
|
1019
|
+
CAIRO_FONT_WEIGHT_NORMAL,
|
1020
|
+
CAIRO_FONT_WEIGHT_BOLD
|
928
1021
|
} cairo_font_weight_t;
|
929
1022
|
|
930
1023
|
/**
|
@@ -1116,6 +1209,16 @@ cairo_show_text (cairo_t *cr, const char *utf8);
|
|
1116
1209
|
cairo_public void
|
1117
1210
|
cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs);
|
1118
1211
|
|
1212
|
+
cairo_public void
|
1213
|
+
cairo_show_text_glyphs (cairo_t *cr,
|
1214
|
+
const char *utf8,
|
1215
|
+
int utf8_len,
|
1216
|
+
const cairo_glyph_t *glyphs,
|
1217
|
+
int num_glyphs,
|
1218
|
+
const cairo_text_cluster_t *clusters,
|
1219
|
+
int num_clusters,
|
1220
|
+
cairo_text_cluster_flags_t cluster_flags);
|
1221
|
+
|
1119
1222
|
cairo_public void
|
1120
1223
|
cairo_text_path (cairo_t *cr, const char *utf8);
|
1121
1224
|
|
@@ -1151,12 +1254,14 @@ cairo_font_face_get_reference_count (cairo_font_face_t *font_face);
|
|
1151
1254
|
cairo_public cairo_status_t
|
1152
1255
|
cairo_font_face_status (cairo_font_face_t *font_face);
|
1153
1256
|
|
1257
|
+
|
1154
1258
|
/**
|
1155
1259
|
* cairo_font_type_t:
|
1156
1260
|
* @CAIRO_FONT_TYPE_TOY: The font was created using cairo's toy font api
|
1157
1261
|
* @CAIRO_FONT_TYPE_FT: The font is of type FreeType
|
1158
1262
|
* @CAIRO_FONT_TYPE_WIN32: The font is of type Win32
|
1159
1263
|
* @CAIRO_FONT_TYPE_QUARTZ: The font is of type Quartz (Since: 1.6)
|
1264
|
+
* @CAIRO_FONT_TYPE_USER: The font was create using cairo's user font api (Since: 1.8)
|
1160
1265
|
*
|
1161
1266
|
* #cairo_font_type_t is used to describe the type of a given font
|
1162
1267
|
* face or scaled font. The font types are also known as "font
|
@@ -1164,7 +1269,7 @@ cairo_font_face_status (cairo_font_face_t *font_face);
|
|
1164
1269
|
*
|
1165
1270
|
* The type of a font face is determined by the function used to
|
1166
1271
|
* create it, which will generally be of the form
|
1167
|
-
* cairo_<emphasis>type</emphasis>_font_face_create. The font face type can be queried
|
1272
|
+
* cairo_<emphasis>type</emphasis>_font_face_create(). The font face type can be queried
|
1168
1273
|
* with cairo_font_face_get_type()
|
1169
1274
|
*
|
1170
1275
|
* The various #cairo_font_face_t functions can be used with a font face
|
@@ -1178,7 +1283,7 @@ cairo_font_face_status (cairo_font_face_t *font_face);
|
|
1178
1283
|
* fonts of any type, but some font backends also provide
|
1179
1284
|
* type-specific functions that must only be called with a scaled font
|
1180
1285
|
* of the appropriate type. These functions have names that begin with
|
1181
|
-
* cairo_<emphasis>type</emphasis>_scaled_font such as cairo_ft_scaled_font_lock_face().
|
1286
|
+
* cairo_<emphasis>type</emphasis>_scaled_font() such as cairo_ft_scaled_font_lock_face().
|
1182
1287
|
*
|
1183
1288
|
* The behavior of calling a type-specific function with a scaled font
|
1184
1289
|
* of the wrong type is undefined.
|
@@ -1191,7 +1296,8 @@ typedef enum _cairo_font_type {
|
|
1191
1296
|
CAIRO_FONT_TYPE_TOY,
|
1192
1297
|
CAIRO_FONT_TYPE_FT,
|
1193
1298
|
CAIRO_FONT_TYPE_WIN32,
|
1194
|
-
CAIRO_FONT_TYPE_QUARTZ
|
1299
|
+
CAIRO_FONT_TYPE_QUARTZ,
|
1300
|
+
CAIRO_FONT_TYPE_USER
|
1195
1301
|
} cairo_font_type_t;
|
1196
1302
|
|
1197
1303
|
cairo_public cairo_font_type_t
|
@@ -1255,6 +1361,18 @@ cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font,
|
|
1255
1361
|
int num_glyphs,
|
1256
1362
|
cairo_text_extents_t *extents);
|
1257
1363
|
|
1364
|
+
cairo_public cairo_status_t
|
1365
|
+
cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font,
|
1366
|
+
double x,
|
1367
|
+
double y,
|
1368
|
+
const char *utf8,
|
1369
|
+
int utf8_len,
|
1370
|
+
cairo_glyph_t **glyphs,
|
1371
|
+
int *num_glyphs,
|
1372
|
+
cairo_text_cluster_t **clusters,
|
1373
|
+
int *num_clusters,
|
1374
|
+
cairo_text_cluster_flags_t *cluster_flags);
|
1375
|
+
|
1258
1376
|
cairo_public cairo_font_face_t *
|
1259
1377
|
cairo_scaled_font_get_font_face (cairo_scaled_font_t *scaled_font);
|
1260
1378
|
|
@@ -1266,10 +1384,272 @@ cairo_public void
|
|
1266
1384
|
cairo_scaled_font_get_ctm (cairo_scaled_font_t *scaled_font,
|
1267
1385
|
cairo_matrix_t *ctm);
|
1268
1386
|
|
1387
|
+
cairo_public void
|
1388
|
+
cairo_scaled_font_get_scale_matrix (cairo_scaled_font_t *scaled_font,
|
1389
|
+
cairo_matrix_t *scale_matrix);
|
1390
|
+
|
1269
1391
|
cairo_public void
|
1270
1392
|
cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font,
|
1271
1393
|
cairo_font_options_t *options);
|
1272
1394
|
|
1395
|
+
|
1396
|
+
/* Toy fonts */
|
1397
|
+
|
1398
|
+
cairo_public cairo_font_face_t *
|
1399
|
+
cairo_toy_font_face_create (const char *family,
|
1400
|
+
cairo_font_slant_t slant,
|
1401
|
+
cairo_font_weight_t weight);
|
1402
|
+
|
1403
|
+
cairo_public const char *
|
1404
|
+
cairo_toy_font_face_get_family (cairo_font_face_t *font_face);
|
1405
|
+
|
1406
|
+
cairo_public cairo_font_slant_t
|
1407
|
+
cairo_toy_font_face_get_slant (cairo_font_face_t *font_face);
|
1408
|
+
|
1409
|
+
cairo_public cairo_font_weight_t
|
1410
|
+
cairo_toy_font_face_get_weight (cairo_font_face_t *font_face);
|
1411
|
+
|
1412
|
+
|
1413
|
+
/* User fonts */
|
1414
|
+
|
1415
|
+
cairo_public cairo_font_face_t *
|
1416
|
+
cairo_user_font_face_create (void);
|
1417
|
+
|
1418
|
+
/* User-font method signatures */
|
1419
|
+
|
1420
|
+
/**
|
1421
|
+
* cairo_user_scaled_font_init_func_t:
|
1422
|
+
* @scaled_font: the scaled-font being created
|
1423
|
+
* @cr: a cairo context, in font space
|
1424
|
+
* @extents: font extents to fill in, in font space
|
1425
|
+
*
|
1426
|
+
* #cairo_user_scaled_font_init_func_t is the type of function which is
|
1427
|
+
* called when a scaled-font needs to be created for a user font-face.
|
1428
|
+
*
|
1429
|
+
* The cairo context @cr is not used by the caller, but is prepared in font
|
1430
|
+
* space, similar to what the cairo contexts passed to the render_glyph
|
1431
|
+
* method will look like. The callback can use this context for extents
|
1432
|
+
* computation for example. After the callback is called, @cr is checked
|
1433
|
+
* for any error status.
|
1434
|
+
*
|
1435
|
+
* The @extents argument is where the user font sets the font extents for
|
1436
|
+
* @scaled_font. It is in font space, which means that for most cases its
|
1437
|
+
* ascent and descent members should add to 1.0. @extents is preset to
|
1438
|
+
* hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for
|
1439
|
+
* descent and max_y_advance members.
|
1440
|
+
*
|
1441
|
+
* The callback is optional. If not set, default font extents as described
|
1442
|
+
* in the previous paragraph will be used.
|
1443
|
+
*
|
1444
|
+
* Note that @scaled_font is not fully initialized at this
|
1445
|
+
* point and trying to use it for text operations in the callback will result
|
1446
|
+
* in deadlock.
|
1447
|
+
*
|
1448
|
+
* Returns: %CAIRO_STATUS_SUCCESS upon success, or
|
1449
|
+
* %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
|
1450
|
+
*
|
1451
|
+
* Since: 1.8
|
1452
|
+
**/
|
1453
|
+
typedef cairo_status_t (*cairo_user_scaled_font_init_func_t) (cairo_scaled_font_t *scaled_font,
|
1454
|
+
cairo_t *cr,
|
1455
|
+
cairo_font_extents_t *extents);
|
1456
|
+
|
1457
|
+
/**
|
1458
|
+
* cairo_user_scaled_font_render_glyph_func_t:
|
1459
|
+
* @scaled_font: user scaled-font
|
1460
|
+
* @glyph: glyph code to render
|
1461
|
+
* @cr: cairo context to draw to, in font space
|
1462
|
+
* @extents: glyph extents to fill in, in font space
|
1463
|
+
*
|
1464
|
+
* #cairo_user_scaled_font_render_glyph_func_t is the type of function which
|
1465
|
+
* is called when a user scaled-font needs to render a glyph.
|
1466
|
+
*
|
1467
|
+
* The callback is mandatory, and expected to draw the glyph with code @glyph to
|
1468
|
+
* the cairo context @cr. @cr is prepared such that the glyph drawing is done in
|
1469
|
+
* font space. That is, the matrix set on @cr is the scale matrix of @scaled_font,
|
1470
|
+
* The @extents argument is where the user font sets the font extents for
|
1471
|
+
* @scaled_font. However, if user prefers to draw in user space, they can
|
1472
|
+
* achieve that by changing the matrix on @cr. All cairo rendering operations
|
1473
|
+
* to @cr are permitted, however, the result is undefined if any source other
|
1474
|
+
* than the default source on @cr is used. That means, glyph bitmaps should
|
1475
|
+
* be rendered using cairo_mask() instead of cairo_paint().
|
1476
|
+
*
|
1477
|
+
* Other non-default settings on @cr include a font size of 1.0 (given that
|
1478
|
+
* it is set up to be in font space), and font options corresponding to
|
1479
|
+
* @scaled_font.
|
1480
|
+
*
|
1481
|
+
* The @extents argument is preset to have <literal>x_bearing</literal>,
|
1482
|
+
* <literal>width</literal>, and <literal>y_advance</literal> of zero,
|
1483
|
+
* <literal>y_bearing</literal> set to <literal>-font_extents.ascent</literal>,
|
1484
|
+
* <literal>height</literal> to <literal>font_extents.ascent+font_extents.descent</literal>,
|
1485
|
+
* and <literal>x_advance</literal> to <literal>font_extents.max_x_advance</literal>.
|
1486
|
+
* The only field user needs to set in majority of cases is
|
1487
|
+
* <literal>x_advance</literal>.
|
1488
|
+
* If the <literal>width</literal> field is zero upon the callback returning
|
1489
|
+
* (which is its preset value), the glyph extents are automatically computed
|
1490
|
+
* based on the drawings done to @cr. This is in most cases exactly what the
|
1491
|
+
* desired behavior is. However, if for any reason the callback sets the
|
1492
|
+
* extents, it must be ink extents, and include the extents of all drawing
|
1493
|
+
* done to @cr in the callback.
|
1494
|
+
*
|
1495
|
+
* Returns: %CAIRO_STATUS_SUCCESS upon success, or
|
1496
|
+
* %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
|
1497
|
+
*
|
1498
|
+
* Since: 1.8
|
1499
|
+
**/
|
1500
|
+
typedef cairo_status_t (*cairo_user_scaled_font_render_glyph_func_t) (cairo_scaled_font_t *scaled_font,
|
1501
|
+
unsigned long glyph,
|
1502
|
+
cairo_t *cr,
|
1503
|
+
cairo_text_extents_t *extents);
|
1504
|
+
|
1505
|
+
/**
|
1506
|
+
* cairo_user_scaled_font_text_to_glyphs_func_t:
|
1507
|
+
* @scaled_font: the scaled-font being created
|
1508
|
+
* @utf8: a string of text encoded in UTF-8
|
1509
|
+
* @utf8_len: length of @utf8 in bytes
|
1510
|
+
* @glyphs: pointer to array of glyphs to fill, in font space
|
1511
|
+
* @num_glyphs: pointer to number of glyphs
|
1512
|
+
* @clusters: pointer to array of cluster mapping information to fill, or %NULL
|
1513
|
+
* @num_clusters: pointer to number of clusters
|
1514
|
+
* @cluster_flags: pointer to location to store cluster flags corresponding to the
|
1515
|
+
* output @clusters
|
1516
|
+
*
|
1517
|
+
* #cairo_user_scaled_font_text_to_glyphs_func_t is the type of function which
|
1518
|
+
* is called to convert input text to an array of glyphs. This is used by the
|
1519
|
+
* cairo_show_text() operation.
|
1520
|
+
*
|
1521
|
+
* Using this callback the user-font has full control on glyphs and their
|
1522
|
+
* positions. That means, it allows for features like ligatures and kerning,
|
1523
|
+
* as well as complex <firstterm>shaping</firstterm> required for scripts like
|
1524
|
+
* Arabic and Indic.
|
1525
|
+
*
|
1526
|
+
* The @num_glyphs argument is preset to -1. The callback should allocate an
|
1527
|
+
* array for the resulting glyphs (using malloc()), and populate the glyph indices and
|
1528
|
+
* positions (in font space) assuming that the text is to be shown at the
|
1529
|
+
* origin. Cairo will free the glyph array when done with it, no matter what
|
1530
|
+
* the return value of the callback is.
|
1531
|
+
*
|
1532
|
+
* If @glyphs initially points to a non-%NULL value, that array can be used
|
1533
|
+
* as a glyph buffer, and @num_glyphs points to the number of glyph
|
1534
|
+
* entries available there. If the provided glyph array is too short for
|
1535
|
+
* the conversion (or for convenience), a new glyph array may be allocated
|
1536
|
+
* using cairo_glyph_allocate() and placed in @glyphs. Upon return,
|
1537
|
+
* @num_glyphs should contain the number of generated glyphs.
|
1538
|
+
* If the value @glyphs points at has changed after the call, cairo will
|
1539
|
+
* free the allocated glyph array using cairo_glyph_free().
|
1540
|
+
*
|
1541
|
+
* If @clusters is not %NULL, @num_clusters and @cluster_flags are also non-%NULL,
|
1542
|
+
* and cluster mapping should be computed.
|
1543
|
+
* The semantics of how cluster array allocation works is similar to the glyph
|
1544
|
+
* array. That is,
|
1545
|
+
* if @clusters initially points to a non-%NULL value, that array may be used
|
1546
|
+
* as a cluster buffer, and @num_clusters points to the number of cluster
|
1547
|
+
* entries available there. If the provided cluster array is too short for
|
1548
|
+
* the conversion (or for convenience), a new cluster array may be allocated
|
1549
|
+
* using cairo_text_cluster_allocate() and placed in @clusters. Upon return,
|
1550
|
+
* @num_clusters should contain the number of generated clusters.
|
1551
|
+
* If the value @clusters points at has changed after the call, cairo will
|
1552
|
+
* free the allocated cluster array using cairo_text_cluster_free().
|
1553
|
+
*
|
1554
|
+
* The callback is optional. If not set, or if @num_glyphs is negative upon
|
1555
|
+
* the callback returning, the unicode_to_glyph callback
|
1556
|
+
* is tried. See #cairo_user_scaled_font_unicode_to_glyph_func_t.
|
1557
|
+
*
|
1558
|
+
* Note: While cairo does not impose any limitation on glyph indices,
|
1559
|
+
* some applications may assume that a glyph index fits in a 16-bit
|
1560
|
+
* unsigned integer. As such, it is advised that user-fonts keep their
|
1561
|
+
* glyphs in the 0 to 65535 range. Furthermore, some applications may
|
1562
|
+
* assume that glyph 0 is a special glyph-not-found glyph. User-fonts
|
1563
|
+
* are advised to use glyph 0 for such purposes and do not use that
|
1564
|
+
* glyph value for other purposes.
|
1565
|
+
*
|
1566
|
+
* Returns: %CAIRO_STATUS_SUCCESS upon success, or
|
1567
|
+
* %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
|
1568
|
+
*
|
1569
|
+
* Since: 1.8
|
1570
|
+
**/
|
1571
|
+
typedef cairo_status_t (*cairo_user_scaled_font_text_to_glyphs_func_t) (cairo_scaled_font_t *scaled_font,
|
1572
|
+
const char *utf8,
|
1573
|
+
int utf8_len,
|
1574
|
+
cairo_glyph_t **glyphs,
|
1575
|
+
int *num_glyphs,
|
1576
|
+
cairo_text_cluster_t **clusters,
|
1577
|
+
int *num_clusters,
|
1578
|
+
cairo_text_cluster_flags_t *cluster_flags);
|
1579
|
+
|
1580
|
+
/**
|
1581
|
+
* cairo_user_scaled_font_unicode_to_glyph_func_t:
|
1582
|
+
* @scaled_font: the scaled-font being created
|
1583
|
+
* @unicode: input unicode character code-point
|
1584
|
+
* @glyph_index: output glyph index
|
1585
|
+
*
|
1586
|
+
* #cairo_user_scaled_font_unicode_to_glyph_func_t is the type of function which
|
1587
|
+
* is called to convert an input Unicode character to a single glyph.
|
1588
|
+
* This is used by the cairo_show_text() operation.
|
1589
|
+
*
|
1590
|
+
* This callback is used to provide the same functionality as the
|
1591
|
+
* text_to_glyphs callback does (see #cairo_user_scaled_font_text_to_glyphs_func_t)
|
1592
|
+
* but has much less control on the output,
|
1593
|
+
* in exchange for increased ease of use. The inherent assumption to using
|
1594
|
+
* this callback is that each character maps to one glyph, and that the
|
1595
|
+
* mapping is context independent. It also assumes that glyphs are positioned
|
1596
|
+
* according to their advance width. These mean no ligatures, kerning, or
|
1597
|
+
* complex scripts can be implemented using this callback.
|
1598
|
+
*
|
1599
|
+
* The callback is optional, and only used if text_to_glyphs callback is not
|
1600
|
+
* set or fails to return glyphs. If this callback is not set, an identity
|
1601
|
+
* mapping from Unicode code-points to glyph indices is assumed.
|
1602
|
+
*
|
1603
|
+
* Note: While cairo does not impose any limitation on glyph indices,
|
1604
|
+
* some applications may assume that a glyph index fits in a 16-bit
|
1605
|
+
* unsigned integer. As such, it is advised that user-fonts keep their
|
1606
|
+
* glyphs in the 0 to 65535 range. Furthermore, some applications may
|
1607
|
+
* assume that glyph 0 is a special glyph-not-found glyph. User-fonts
|
1608
|
+
* are advised to use glyph 0 for such purposes and do not use that
|
1609
|
+
* glyph value for other purposes.
|
1610
|
+
*
|
1611
|
+
* Returns: %CAIRO_STATUS_SUCCESS upon success, or
|
1612
|
+
* %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
|
1613
|
+
*
|
1614
|
+
* Since: 1.8
|
1615
|
+
**/
|
1616
|
+
typedef cairo_status_t (*cairo_user_scaled_font_unicode_to_glyph_func_t) (cairo_scaled_font_t *scaled_font,
|
1617
|
+
unsigned long unicode,
|
1618
|
+
unsigned long *glyph_index);
|
1619
|
+
|
1620
|
+
/* User-font method setters */
|
1621
|
+
|
1622
|
+
cairo_public void
|
1623
|
+
cairo_user_font_face_set_init_func (cairo_font_face_t *font_face,
|
1624
|
+
cairo_user_scaled_font_init_func_t init_func);
|
1625
|
+
|
1626
|
+
cairo_public void
|
1627
|
+
cairo_user_font_face_set_render_glyph_func (cairo_font_face_t *font_face,
|
1628
|
+
cairo_user_scaled_font_render_glyph_func_t render_glyph_func);
|
1629
|
+
|
1630
|
+
cairo_public void
|
1631
|
+
cairo_user_font_face_set_text_to_glyphs_func (cairo_font_face_t *font_face,
|
1632
|
+
cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func);
|
1633
|
+
|
1634
|
+
cairo_public void
|
1635
|
+
cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face,
|
1636
|
+
cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func);
|
1637
|
+
|
1638
|
+
/* User-font method getters */
|
1639
|
+
|
1640
|
+
cairo_public cairo_user_scaled_font_init_func_t
|
1641
|
+
cairo_user_font_face_get_init_func (cairo_font_face_t *font_face);
|
1642
|
+
|
1643
|
+
cairo_public cairo_user_scaled_font_render_glyph_func_t
|
1644
|
+
cairo_user_font_face_get_render_glyph_func (cairo_font_face_t *font_face);
|
1645
|
+
|
1646
|
+
cairo_public cairo_user_scaled_font_text_to_glyphs_func_t
|
1647
|
+
cairo_user_font_face_get_text_to_glyphs_func (cairo_font_face_t *font_face);
|
1648
|
+
|
1649
|
+
cairo_public cairo_user_scaled_font_unicode_to_glyph_func_t
|
1650
|
+
cairo_user_font_face_get_unicode_to_glyph_func (cairo_font_face_t *font_face);
|
1651
|
+
|
1652
|
+
|
1273
1653
|
/* Query functions */
|
1274
1654
|
|
1275
1655
|
cairo_public cairo_operator_t
|
@@ -1369,26 +1749,26 @@ typedef enum _cairo_path_data_type {
|
|
1369
1749
|
*
|
1370
1750
|
* <informalexample><programlisting>
|
1371
1751
|
* int i;
|
1372
|
-
*
|
1373
|
-
*
|
1752
|
+
* cairo_path_t *path;
|
1753
|
+
* cairo_path_data_t *data;
|
1374
1754
|
*
|
1375
1755
|
* path = cairo_copy_path (cr);
|
1376
1756
|
*
|
1377
1757
|
* for (i=0; i < path->num_data; i += path->data[i].header.length) {
|
1378
1758
|
* data = &path->data[i];
|
1379
1759
|
* switch (data->header.type) {
|
1380
|
-
* case
|
1760
|
+
* case CAIRO_PATH_MOVE_TO:
|
1381
1761
|
* do_move_to_things (data[1].point.x, data[1].point.y);
|
1382
1762
|
* break;
|
1383
|
-
* case
|
1763
|
+
* case CAIRO_PATH_LINE_TO:
|
1384
1764
|
* do_line_to_things (data[1].point.x, data[1].point.y);
|
1385
1765
|
* break;
|
1386
|
-
* case
|
1766
|
+
* case CAIRO_PATH_CURVE_TO:
|
1387
1767
|
* do_curve_to_things (data[1].point.x, data[1].point.y,
|
1388
1768
|
* data[2].point.x, data[2].point.y,
|
1389
1769
|
* data[3].point.x, data[3].point.y);
|
1390
1770
|
* break;
|
1391
|
-
* case
|
1771
|
+
* case CAIRO_PATH_CLOSE_PATH:
|
1392
1772
|
* do_close_path_things ();
|
1393
1773
|
* break;
|
1394
1774
|
* }
|
@@ -1515,7 +1895,7 @@ cairo_surface_status (cairo_surface_t *surface);
|
|
1515
1895
|
* any type, but some backends also provide type-specific functions
|
1516
1896
|
* that must only be called with a surface of the appropriate
|
1517
1897
|
* type. These functions have names that begin with
|
1518
|
-
* cairo_<emphasis>type</emphasis>_surface such as cairo_image_surface_get_width().
|
1898
|
+
* cairo_<emphasis>type</emphasis>_surface<!-- --> such as cairo_image_surface_get_width().
|
1519
1899
|
*
|
1520
1900
|
* The behavior of calling a type-specific function with a surface of
|
1521
1901
|
* the wrong type is undefined.
|
@@ -1602,12 +1982,20 @@ cairo_surface_set_fallback_resolution (cairo_surface_t *surface,
|
|
1602
1982
|
double x_pixels_per_inch,
|
1603
1983
|
double y_pixels_per_inch);
|
1604
1984
|
|
1985
|
+
cairo_public void
|
1986
|
+
cairo_surface_get_fallback_resolution (cairo_surface_t *surface,
|
1987
|
+
double *x_pixels_per_inch,
|
1988
|
+
double *y_pixels_per_inch);
|
1989
|
+
|
1605
1990
|
cairo_public void
|
1606
1991
|
cairo_surface_copy_page (cairo_surface_t *surface);
|
1607
1992
|
|
1608
1993
|
cairo_public void
|
1609
1994
|
cairo_surface_show_page (cairo_surface_t *surface);
|
1610
1995
|
|
1996
|
+
cairo_public cairo_bool_t
|
1997
|
+
cairo_surface_has_show_text_glyphs (cairo_surface_t *surface);
|
1998
|
+
|
1611
1999
|
/* Image-surface functions */
|
1612
2000
|
|
1613
2001
|
/**
|
@@ -1745,7 +2133,7 @@ cairo_pattern_set_user_data (cairo_pattern_t *pattern,
|
|
1745
2133
|
* The type of a pattern is determined by the function used to create
|
1746
2134
|
* it. The cairo_pattern_create_rgb() and cairo_pattern_create_rgba()
|
1747
2135
|
* functions create SOLID patterns. The remaining
|
1748
|
-
* cairo_pattern_create functions map to pattern types in obvious
|
2136
|
+
* cairo_pattern_create<!-- --> functions map to pattern types in obvious
|
1749
2137
|
* ways.
|
1750
2138
|
*
|
1751
2139
|
* The pattern type can be queried with cairo_pattern_get_type()
|