cairo 1.12.6-x86-mingw32 → 1.12.7-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cairo might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/NEWS +24 -0
- data/README.rdoc +1 -1
- data/Rakefile +57 -14
- data/ext/cairo/rb_cairo.h +1 -1
- data/ext/cairo/rb_cairo_surface.c +2 -0
- data/lib/1.9/cairo.so +0 -0
- data/lib/2.0/cairo.so +0 -0
- data/lib/2.1/cairo.so +0 -0
- data/lib/cairo/papers.rb +24 -0
- data/test/test_image_surface.rb +28 -0
- data/vendor/local/bin/fc-cache.exe +0 -0
- data/vendor/local/bin/fc-cat.exe +0 -0
- data/vendor/local/bin/fc-list.exe +0 -0
- data/vendor/local/bin/fc-match.exe +0 -0
- data/vendor/local/bin/fc-pattern.exe +0 -0
- data/vendor/local/bin/fc-query.exe +0 -0
- data/vendor/local/bin/fc-scan.exe +0 -0
- data/vendor/local/bin/fc-validate.exe +0 -0
- data/vendor/local/bin/freetype-config +6 -10
- data/vendor/local/bin/libcairo-2.dll +0 -0
- data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
- data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
- data/vendor/local/bin/libfontconfig-1.dll +0 -0
- data/vendor/local/bin/libfreetype-6.dll +0 -0
- data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
- data/vendor/local/bin/libpixman-1-0.dll +0 -0
- data/vendor/local/bin/libpng-config +1 -1
- data/vendor/local/bin/libpng16-16.dll +0 -0
- data/vendor/local/bin/libpng16-config +1 -1
- data/vendor/local/bin/libxml2-2.dll +0 -0
- data/vendor/local/bin/png-fix-itxt.exe +0 -0
- data/vendor/local/bin/pngfix.exe +0 -0
- data/vendor/local/bin/xmlcatalog.exe +0 -0
- data/vendor/local/bin/xmllint.exe +0 -0
- data/vendor/local/bin/zlib1.dll +0 -0
- data/vendor/local/etc/fonts/conf.d/30-metric-aliases.conf +259 -53
- data/vendor/local/etc/fonts/conf.d/30-urw-aliases.conf +4 -20
- data/vendor/local/etc/fonts/conf.d/45-latin.conf +16 -0
- data/vendor/local/etc/fonts/conf.d/README +3 -3
- data/vendor/local/etc/fonts/fonts.conf +1 -1
- data/vendor/local/include/cairo/cairo-gobject.h +4 -0
- data/vendor/local/include/cairo/cairo-version.h +1 -1
- data/vendor/local/include/fontconfig/fcprivate.h +2 -1
- data/vendor/local/include/fontconfig/fontconfig.h +7 -3
- data/vendor/local/include/freetype2/{freetype/config → config}/ftconfig.h +105 -13
- data/vendor/local/include/freetype2/{freetype/config → config}/ftheader.h +71 -58
- data/vendor/local/include/freetype2/{freetype/config → config}/ftmodule.h +0 -0
- data/vendor/local/include/freetype2/{freetype/config → config}/ftoption.h +41 -35
- data/vendor/local/include/freetype2/{freetype/config → config}/ftstdlib.h +0 -0
- data/vendor/local/include/freetype2/{freetype/freetype.h → freetype.h} +83 -40
- data/vendor/local/include/freetype2/ft2build.h +42 -0
- data/vendor/local/include/freetype2/{freetype/ftadvanc.h → ftadvanc.h} +14 -11
- data/vendor/local/include/freetype2/{freetype/ftautoh.h → ftautoh.h} +11 -3
- data/vendor/local/include/freetype2/{freetype/ftbbox.h → ftbbox.h} +3 -3
- data/vendor/local/include/freetype2/{freetype/ftbdf.h → ftbdf.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftbitmap.h → ftbitmap.h} +4 -4
- data/vendor/local/include/freetype2/{freetype/ftbzip2.h → ftbzip2.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftcache.h → ftcache.h} +4 -87
- data/vendor/local/include/freetype2/ftcffdrv.h +254 -0
- data/vendor/local/include/freetype2/{freetype/ftchapters.h → ftchapters.h} +4 -16
- data/vendor/local/include/freetype2/{freetype/ftcid.h → ftcid.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/fterrdef.h → fterrdef.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/fterrors.h → fterrors.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftgasp.h → ftgasp.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftglyph.h → ftglyph.h} +5 -5
- data/vendor/local/include/freetype2/{freetype/ftgxval.h → ftgxval.h} +5 -5
- data/vendor/local/include/freetype2/{freetype/ftgzip.h → ftgzip.h} +48 -1
- data/vendor/local/include/freetype2/{freetype/ftimage.h → ftimage.h} +20 -11
- data/vendor/local/include/freetype2/{freetype/ftincrem.h → ftincrem.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftlcdfil.h → ftlcdfil.h} +3 -3
- data/vendor/local/include/freetype2/{freetype/ftlist.h → ftlist.h} +6 -6
- data/vendor/local/include/freetype2/{freetype/ftlzw.h → ftlzw.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftmac.h → ftmac.h} +3 -3
- data/vendor/local/include/freetype2/{freetype/ftmm.h → ftmm.h} +3 -4
- data/vendor/local/include/freetype2/{freetype/ftmodapi.h → ftmodapi.h} +15 -8
- data/vendor/local/include/freetype2/{freetype/ftmoderr.h → ftmoderr.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftotval.h → ftotval.h} +3 -3
- data/vendor/local/include/freetype2/{freetype/ftoutln.h → ftoutln.h} +16 -7
- data/vendor/local/include/freetype2/{freetype/ftpfr.h → ftpfr.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftrender.h → ftrender.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftsizes.h → ftsizes.h} +2 -2
- data/vendor/local/include/freetype2/{freetype/ftsnames.h → ftsnames.h} +3 -3
- data/vendor/local/include/freetype2/{freetype/ftstroke.h → ftstroke.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ftsynth.h → ftsynth.h} +2 -2
- data/vendor/local/include/freetype2/{freetype/ftsystem.h → ftsystem.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/fttrigon.h → fttrigon.h} +0 -0
- data/vendor/local/include/freetype2/ftttdrv.h +170 -0
- data/vendor/local/include/freetype2/{freetype/fttypes.h → fttypes.h} +3 -3
- data/vendor/local/include/freetype2/{freetype/ftwinfnt.h → ftwinfnt.h} +4 -3
- data/vendor/local/include/freetype2/{freetype/ftxf86.h → ftxf86.h} +2 -2
- data/vendor/local/include/freetype2/{freetype/t1tables.h → t1tables.h} +0 -0
- data/vendor/local/include/freetype2/{freetype/ttnameid.h → ttnameid.h} +2 -2
- data/vendor/local/include/freetype2/{freetype/tttables.h → tttables.h} +24 -14
- data/vendor/local/include/freetype2/{freetype/tttags.h → tttags.h} +5 -1
- data/vendor/local/include/freetype2/{freetype/ttunpat.h → ttunpat.h} +0 -0
- data/vendor/local/include/libpng16/png.h +30 -12
- data/vendor/local/include/libpng16/pngconf.h +2 -1
- data/vendor/local/include/libpng16/pnglibconf.h +3 -3
- data/vendor/local/include/pixman-1/pixman-version.h +3 -3
- data/vendor/local/include/pixman-1/pixman.h +1 -1
- data/vendor/local/include/png.h +30 -12
- data/vendor/local/include/pngconf.h +2 -1
- data/vendor/local/include/pnglibconf.h +3 -3
- data/vendor/local/lib/fontconfig.def +2 -1
- data/vendor/local/lib/libcairo-gobject.a +0 -0
- data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
- data/vendor/local/lib/libcairo-gobject.la +3 -3
- data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
- data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
- data/vendor/local/lib/libcairo-script-interpreter.la +3 -3
- data/vendor/local/lib/libcairo.a +0 -0
- data/vendor/local/lib/libcairo.dll.a +0 -0
- data/vendor/local/lib/libcairo.la +3 -3
- data/vendor/local/lib/libfontconfig.a +0 -0
- data/vendor/local/lib/libfontconfig.dll.a +0 -0
- data/vendor/local/lib/libfontconfig.la +3 -3
- data/vendor/local/lib/libfreetype.a +0 -0
- data/vendor/local/lib/libfreetype.dll.a +0 -0
- data/vendor/local/lib/libfreetype.la +3 -3
- data/vendor/local/lib/libpixman-1.a +0 -0
- data/vendor/local/lib/libpixman-1.dll.a +0 -0
- data/vendor/local/lib/libpixman-1.la +4 -4
- data/vendor/local/lib/libpng.a +0 -0
- data/vendor/local/lib/libpng.dll.a +0 -0
- data/vendor/local/lib/libpng.la +2 -2
- data/vendor/local/lib/libpng16.a +0 -0
- data/vendor/local/lib/libpng16.dll.a +0 -0
- data/vendor/local/lib/libpng16.la +2 -2
- data/vendor/local/lib/libxml2.a +0 -0
- data/vendor/local/lib/libxml2.dll.a +0 -0
- data/vendor/local/lib/libz.a +0 -0
- data/vendor/local/lib/libz.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/cairo-fc.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-ft.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-gobject.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-pdf.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-png.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-ps.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-script.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-svg.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo-win32.pc +1 -1
- data/vendor/local/lib/pkgconfig/cairo.pc +3 -3
- data/vendor/local/lib/pkgconfig/fontconfig.pc +6 -4
- data/vendor/local/lib/pkgconfig/freetype2.pc +4 -4
- data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
- data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
- data/vendor/local/lib/pkgconfig/pixman-1.pc +1 -1
- data/vendor/local/share/fontconfig/conf.avail/30-metric-aliases.conf +259 -53
- data/vendor/local/share/fontconfig/conf.avail/30-urw-aliases.conf +4 -20
- data/vendor/local/share/fontconfig/conf.avail/45-latin.conf +16 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Error-handling.html +1 -1
- data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +1 -1
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +1 -1
- data/vendor/local/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +3 -3
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +3 -3
- data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +6 -6
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Recording-Surfaces.html +3 -3
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Regions.html +8 -8
- data/vendor/local/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +3 -3
- data/vendor/local/share/gtk-doc/html/cairo/cairo-User-Fonts.html +14 -14
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +1 -1
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +5 -5
- data/vendor/local/share/gtk-doc/html/cairo/cairo-XCB-Surfaces.html +0 -8
- data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +1 -1
- data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-XRender-Backend.html +1 -1
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +3 -3
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +4 -4
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html +2 -2
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +31 -31
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +11 -11
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +13 -13
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +8 -8
- data/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +11 -11
- data/vendor/local/share/gtk-doc/html/cairo/index.html +1 -1
- data/vendor/local/share/license/fontconfig/README +83 -2
- data/vendor/local/share/license/freetype/README +5 -5
- data/vendor/local/share/license/freetype/README.git +5 -1
- data/vendor/local/share/license/libpng/README +18 -18
- data/vendor/local/share/man/man3/libpng.3 +136 -54
- data/vendor/local/share/man/man3/libpngpf.3 +2 -2
- data/vendor/local/share/man/man5/png.5 +1 -1
- metadata +74 -80
- data/vendor/local/etc/fonts/fonts.conf.bak +0 -155
- data/vendor/local/include/freetype2/freetype/ftcffdrv.h +0 -150
- data/vendor/local/include/ft2build.h +0 -61
@@ -0,0 +1,42 @@
|
|
1
|
+
/***************************************************************************/
|
2
|
+
/* */
|
3
|
+
/* ft2build.h */
|
4
|
+
/* */
|
5
|
+
/* FreeType 2 build and setup macros. */
|
6
|
+
/* */
|
7
|
+
/* Copyright 1996-2001, 2006, 2013 by */
|
8
|
+
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
9
|
+
/* */
|
10
|
+
/* This file is part of the FreeType project, and may only be used, */
|
11
|
+
/* modified, and distributed under the terms of the FreeType project */
|
12
|
+
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
13
|
+
/* this file you indicate that you have read the license and */
|
14
|
+
/* understand and accept it fully. */
|
15
|
+
/* */
|
16
|
+
/***************************************************************************/
|
17
|
+
|
18
|
+
|
19
|
+
/*************************************************************************/
|
20
|
+
/* */
|
21
|
+
/* This is the `entry point' for FreeType header file inclusions. It is */
|
22
|
+
/* the only header file which should be included directly; all other */
|
23
|
+
/* FreeType header files should be accessed with macro names (after */
|
24
|
+
/* including `ft2build.h'). */
|
25
|
+
/* */
|
26
|
+
/* A typical example is */
|
27
|
+
/* */
|
28
|
+
/* #include <ft2build.h> */
|
29
|
+
/* #include FT_FREETYPE_H */
|
30
|
+
/* */
|
31
|
+
/*************************************************************************/
|
32
|
+
|
33
|
+
|
34
|
+
#ifndef __FT2BUILD_H__
|
35
|
+
#define __FT2BUILD_H__
|
36
|
+
|
37
|
+
#include <config/ftheader.h>
|
38
|
+
|
39
|
+
#endif /* __FT2BUILD_H__ */
|
40
|
+
|
41
|
+
|
42
|
+
/* END */
|
@@ -4,7 +4,7 @@
|
|
4
4
|
/* */
|
5
5
|
/* Quick computation of advance widths (specification only). */
|
6
6
|
/* */
|
7
|
-
/* Copyright 2008 by
|
7
|
+
/* Copyright 2008, 2013 by */
|
8
8
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
9
9
|
/* */
|
10
10
|
/* This file is part of the FreeType project, and may only be used, */
|
@@ -64,11 +64,11 @@ FT_BEGIN_HEADER
|
|
64
64
|
/* corresponding hinting mode or font driver doesn't allow for very */
|
65
65
|
/* quick advance computation. */
|
66
66
|
/* */
|
67
|
-
/* Typically, glyphs
|
67
|
+
/* Typically, glyphs that are either unscaled, unhinted, bitmapped, */
|
68
68
|
/* or light-hinted can have their advance width computed very */
|
69
69
|
/* quickly. */
|
70
70
|
/* */
|
71
|
-
/* Normal and bytecode hinted modes
|
71
|
+
/* Normal and bytecode hinted modes that require loading, scaling, */
|
72
72
|
/* and hinting of the glyph outline, are extremely slow by */
|
73
73
|
/* comparison. */
|
74
74
|
/* */
|
@@ -82,8 +82,7 @@ FT_BEGIN_HEADER
|
|
82
82
|
/* */
|
83
83
|
/* <Description> */
|
84
84
|
/* Retrieve the advance value of a given glyph outline in an */
|
85
|
-
/* @FT_Face.
|
86
|
-
/* units. */
|
85
|
+
/* @FT_Face. */
|
87
86
|
/* */
|
88
87
|
/* <Input> */
|
89
88
|
/* face :: The source @FT_Face handle. */
|
@@ -94,8 +93,9 @@ FT_BEGIN_HEADER
|
|
94
93
|
/* calling @FT_Load_Glyph, used to determine what kind */
|
95
94
|
/* of advances you need. */
|
96
95
|
/* <Output> */
|
97
|
-
/* padvance :: The advance value
|
98
|
-
/*
|
96
|
+
/* padvance :: The advance value. If scaling is performed (based on */
|
97
|
+
/* the value of `load_flags'), the advance value is in */
|
98
|
+
/* 16.16 format. Otherwise, it is in font units. */
|
99
99
|
/* */
|
100
100
|
/* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */
|
101
101
|
/* vertical advance corresponding to a vertical layout. */
|
@@ -127,8 +127,7 @@ FT_BEGIN_HEADER
|
|
127
127
|
/* */
|
128
128
|
/* <Description> */
|
129
129
|
/* Retrieve the advance values of several glyph outlines in an */
|
130
|
-
/* @FT_Face.
|
131
|
-
/* units. */
|
130
|
+
/* @FT_Face. */
|
132
131
|
/* */
|
133
132
|
/* <Input> */
|
134
133
|
/* face :: The source @FT_Face handle. */
|
@@ -141,8 +140,12 @@ FT_BEGIN_HEADER
|
|
141
140
|
/* calling @FT_Load_Glyph. */
|
142
141
|
/* */
|
143
142
|
/* <Output> */
|
144
|
-
/* padvance :: The
|
145
|
-
/*
|
143
|
+
/* padvance :: The advance values. This array, to be provided by the */
|
144
|
+
/* caller, must contain at least `count' elements. */
|
145
|
+
/* */
|
146
|
+
/* If scaling is performed (based on the value of */
|
147
|
+
/* `load_flags'), the advance values are in 16.16 format. */
|
148
|
+
/* Otherwise, they are in font units. */
|
146
149
|
/* */
|
147
150
|
/* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */
|
148
151
|
/* vertical advances corresponding to a vertical layout. */
|
@@ -4,7 +4,7 @@
|
|
4
4
|
/* */
|
5
5
|
/* FreeType API for controlling the auto-hinter (specification only). */
|
6
6
|
/* */
|
7
|
-
/* Copyright 2012 by
|
7
|
+
/* Copyright 2012, 2013 by */
|
8
8
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
9
9
|
/* */
|
10
10
|
/* This file is part of the FreeType project, and may only be used, */
|
@@ -61,6 +61,8 @@ FT_BEGIN_HEADER
|
|
61
61
|
* glyph-to-script-map
|
62
62
|
*
|
63
63
|
* @description:
|
64
|
+
* *Experimental* *only*
|
65
|
+
*
|
64
66
|
* The auto-hinter provides various script modules to hint glyphs.
|
65
67
|
* Examples of supported scripts are Latin or CJK. Before a glyph is
|
66
68
|
* auto-hinted, the Unicode character map of the font gets examined, and
|
@@ -77,7 +79,7 @@ FT_BEGIN_HEADER
|
|
77
79
|
* sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
|
78
80
|
* array with `num_glyphs' elements, as found in the font's @FT_Face
|
79
81
|
* structure. The `glyph-to-script-map' property returns a pointer to
|
80
|
-
* this array which can be modified as needed. Note that the
|
82
|
+
* this array, which can be modified as needed. Note that the
|
81
83
|
* modification should happen before the first glyph gets processed by
|
82
84
|
* the auto-hinter so that the global analysis of the font shapes
|
83
85
|
* actually uses the modified mapping.
|
@@ -113,6 +115,8 @@ FT_BEGIN_HEADER
|
|
113
115
|
* FT_AUTOHINTER_SCRIPT_XXX
|
114
116
|
*
|
115
117
|
* @description:
|
118
|
+
* *Experimental* *only*
|
119
|
+
*
|
116
120
|
* A list of constants used for the @glyph-to-script-map property to
|
117
121
|
* specify the script submodule the auto-hinter should use for hinting a
|
118
122
|
* particular glyph.
|
@@ -236,6 +240,8 @@ FT_BEGIN_HEADER
|
|
236
240
|
* FT_Prop_GlyphToScriptMap
|
237
241
|
*
|
238
242
|
* @description:
|
243
|
+
* *Experimental* *only*
|
244
|
+
*
|
239
245
|
* The data exchange structure for the @glyph-to-script-map property.
|
240
246
|
*
|
241
247
|
*/
|
@@ -253,6 +259,8 @@ FT_BEGIN_HEADER
|
|
253
259
|
* fallback-script
|
254
260
|
*
|
255
261
|
* @description:
|
262
|
+
* *Experimental* *only*
|
263
|
+
*
|
256
264
|
* If no auto-hinter script module can be assigned to a glyph, a
|
257
265
|
* fallback script gets assigned to it (see also the
|
258
266
|
* @glyph-to-script-map property). By default, this is
|
@@ -274,7 +282,7 @@ FT_BEGIN_HEADER
|
|
274
282
|
* This property can be used with @FT_Property_Get also.
|
275
283
|
*
|
276
284
|
* It's important to use the right timing for changing this value: The
|
277
|
-
* creation of the glyph-to-script map
|
285
|
+
* creation of the glyph-to-script map that eventually uses the
|
278
286
|
* fallback script value gets triggered either by setting or reading a
|
279
287
|
* face-specific property like @glyph-to-script-map, or by auto-hinting
|
280
288
|
* any glyph from that face. In particular, if you have already created
|
@@ -4,7 +4,7 @@
|
|
4
4
|
/* */
|
5
5
|
/* FreeType exact bbox computation (specification). */
|
6
6
|
/* */
|
7
|
-
/* Copyright 1996-2001, 2003, 2007, 2011 by
|
7
|
+
/* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */
|
8
8
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
9
9
|
/* */
|
10
10
|
/* This file is part of the FreeType project, and may only be used, */
|
@@ -60,7 +60,7 @@ FT_BEGIN_HEADER
|
|
60
60
|
/* <Description> */
|
61
61
|
/* Compute the exact bounding box of an outline. This is slower */
|
62
62
|
/* than computing the control box. However, it uses an advanced */
|
63
|
-
/* algorithm
|
63
|
+
/* algorithm that returns _very_ quickly when the two boxes */
|
64
64
|
/* coincide. Otherwise, the outline Bézier arcs are traversed to */
|
65
65
|
/* extract their extrema. */
|
66
66
|
/* */
|
@@ -78,7 +78,7 @@ FT_BEGIN_HEADER
|
|
78
78
|
/* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */
|
79
79
|
/* reasonable values for the BBox it is necessary to load the glyph */
|
80
80
|
/* at a large ppem value (so that the hinting instructions can */
|
81
|
-
/* properly shift and scale the subglyphs), then extracting the BBox
|
81
|
+
/* properly shift and scale the subglyphs), then extracting the BBox, */
|
82
82
|
/* which can be eventually converted back to font units. */
|
83
83
|
/* */
|
84
84
|
FT_EXPORT( FT_Error )
|
File without changes
|
@@ -4,7 +4,7 @@
|
|
4
4
|
/* */
|
5
5
|
/* FreeType utility functions for bitmaps (specification). */
|
6
6
|
/* */
|
7
|
-
/* Copyright 2004,
|
7
|
+
/* Copyright 2004-2006, 2008, 2013 by */
|
8
8
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
9
9
|
/* */
|
10
10
|
/* This file is part of the FreeType project, and may only be used, */
|
@@ -135,9 +135,9 @@ FT_BEGIN_HEADER
|
|
135
135
|
/* FT_Bitmap_Convert */
|
136
136
|
/* */
|
137
137
|
/* <Description> */
|
138
|
-
/* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or
|
139
|
-
/* bitmap object with depth 8bpp, making the number of used
|
140
|
-
/* line (a.k.a. the `pitch') a multiple of `alignment'.
|
138
|
+
/* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */
|
139
|
+
/* to a bitmap object with depth 8bpp, making the number of used */
|
140
|
+
/* bytes line (a.k.a. the `pitch') a multiple of `alignment'. */
|
141
141
|
/* */
|
142
142
|
/* <Input> */
|
143
143
|
/* library :: A handle to a library object. */
|
File without changes
|
@@ -4,7 +4,7 @@
|
|
4
4
|
/* */
|
5
5
|
/* FreeType Cache subsystem (specification). */
|
6
6
|
/* */
|
7
|
-
/* Copyright 1996-
|
7
|
+
/* Copyright 1996-2008, 2010, 2013 by */
|
8
8
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
9
9
|
/* */
|
10
10
|
/* This file is part of the FreeType project, and may only be used, */
|
@@ -156,7 +156,7 @@ FT_BEGIN_HEADER
|
|
156
156
|
* @note:
|
157
157
|
* Never use NULL as a valid @FTC_FaceID.
|
158
158
|
*
|
159
|
-
* Face IDs are passed by the client to the cache manager
|
159
|
+
* Face IDs are passed by the client to the cache manager that calls,
|
160
160
|
* when needed, the @FTC_Face_Requester to translate them into new
|
161
161
|
* @FT_Face objects.
|
162
162
|
*
|
@@ -214,17 +214,6 @@ FT_BEGIN_HEADER
|
|
214
214
|
|
215
215
|
/* */
|
216
216
|
|
217
|
-
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
218
|
-
|
219
|
-
/* these macros are incompatible with LLP64, should not be used */
|
220
|
-
|
221
|
-
#define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) )
|
222
|
-
|
223
|
-
#define FTC_FACE_ID_HASH( i ) \
|
224
|
-
((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \
|
225
|
-
( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
|
226
|
-
|
227
|
-
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
|
228
217
|
|
229
218
|
/*************************************************************************/
|
230
219
|
/*************************************************************************/
|
@@ -381,7 +370,7 @@ FT_BEGIN_HEADER
|
|
381
370
|
/* should never try to discard it yourself. */
|
382
371
|
/* */
|
383
372
|
/* The @FT_Face object doesn't necessarily have a current size object */
|
384
|
-
/* (i.e., face->size can be
|
373
|
+
/* (i.e., face->size can be~0). If you need a specific `font size', */
|
385
374
|
/* use @FTC_Manager_LookupSize instead. */
|
386
375
|
/* */
|
387
376
|
/* Never change the face's transformation matrix (i.e., never call */
|
@@ -705,17 +694,6 @@ FT_BEGIN_HEADER
|
|
705
694
|
(d1)->width == (d2)->width && \
|
706
695
|
(d1)->flags == (d2)->flags )
|
707
696
|
|
708
|
-
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
709
|
-
|
710
|
-
/* this macro is incompatible with LLP64, should not be used */
|
711
|
-
|
712
|
-
#define FTC_IMAGE_TYPE_HASH( d ) \
|
713
|
-
(FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \
|
714
|
-
( (d)->width << 8 ) ^ (d)->height ^ \
|
715
|
-
( (d)->flags << 4 ) )
|
716
|
-
|
717
|
-
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
|
718
|
-
|
719
697
|
|
720
698
|
/*************************************************************************/
|
721
699
|
/* */
|
@@ -723,7 +701,7 @@ FT_BEGIN_HEADER
|
|
723
701
|
/* FTC_ImageCache */
|
724
702
|
/* */
|
725
703
|
/* <Description> */
|
726
|
-
/* A handle to
|
704
|
+
/* A handle to a glyph image cache object. They are designed to */
|
727
705
|
/* hold many distinct glyph images while not exceeding a certain */
|
728
706
|
/* memory threshold. */
|
729
707
|
/* */
|
@@ -1069,67 +1047,6 @@ FT_BEGIN_HEADER
|
|
1069
1047
|
FTC_Node *anode );
|
1070
1048
|
|
1071
1049
|
|
1072
|
-
/* */
|
1073
|
-
|
1074
|
-
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
1075
|
-
|
1076
|
-
/*@***********************************************************************/
|
1077
|
-
/* */
|
1078
|
-
/* <Struct> */
|
1079
|
-
/* FTC_FontRec */
|
1080
|
-
/* */
|
1081
|
-
/* <Description> */
|
1082
|
-
/* A simple structure used to describe a given `font' to the cache */
|
1083
|
-
/* manager. Note that a `font' is the combination of a given face */
|
1084
|
-
/* with a given character size. */
|
1085
|
-
/* */
|
1086
|
-
/* <Fields> */
|
1087
|
-
/* face_id :: The ID of the face to use. */
|
1088
|
-
/* */
|
1089
|
-
/* pix_width :: The character width in integer pixels. */
|
1090
|
-
/* */
|
1091
|
-
/* pix_height :: The character height in integer pixels. */
|
1092
|
-
/* */
|
1093
|
-
typedef struct FTC_FontRec_
|
1094
|
-
{
|
1095
|
-
FTC_FaceID face_id;
|
1096
|
-
FT_UShort pix_width;
|
1097
|
-
FT_UShort pix_height;
|
1098
|
-
|
1099
|
-
} FTC_FontRec;
|
1100
|
-
|
1101
|
-
|
1102
|
-
/* */
|
1103
|
-
|
1104
|
-
|
1105
|
-
#define FTC_FONT_COMPARE( f1, f2 ) \
|
1106
|
-
( (f1)->face_id == (f2)->face_id && \
|
1107
|
-
(f1)->pix_width == (f2)->pix_width && \
|
1108
|
-
(f1)->pix_height == (f2)->pix_height )
|
1109
|
-
|
1110
|
-
/* this macro is incompatible with LLP64, should not be used */
|
1111
|
-
#define FTC_FONT_HASH( f ) \
|
1112
|
-
(FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \
|
1113
|
-
((f)->pix_width << 8) ^ \
|
1114
|
-
((f)->pix_height) )
|
1115
|
-
|
1116
|
-
typedef FTC_FontRec* FTC_Font;
|
1117
|
-
|
1118
|
-
|
1119
|
-
FT_EXPORT( FT_Error )
|
1120
|
-
FTC_Manager_Lookup_Face( FTC_Manager manager,
|
1121
|
-
FTC_FaceID face_id,
|
1122
|
-
FT_Face *aface );
|
1123
|
-
|
1124
|
-
FT_EXPORT( FT_Error )
|
1125
|
-
FTC_Manager_Lookup_Size( FTC_Manager manager,
|
1126
|
-
FTC_Font font,
|
1127
|
-
FT_Face *aface,
|
1128
|
-
FT_Size *asize );
|
1129
|
-
|
1130
|
-
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
|
1131
|
-
|
1132
|
-
|
1133
1050
|
/* */
|
1134
1051
|
|
1135
1052
|
FT_END_HEADER
|
@@ -0,0 +1,254 @@
|
|
1
|
+
/***************************************************************************/
|
2
|
+
/* */
|
3
|
+
/* ftcffdrv.h */
|
4
|
+
/* */
|
5
|
+
/* FreeType API for controlling the CFF driver (specification only). */
|
6
|
+
/* */
|
7
|
+
/* Copyright 2013 by */
|
8
|
+
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
9
|
+
/* */
|
10
|
+
/* This file is part of the FreeType project, and may only be used, */
|
11
|
+
/* modified, and distributed under the terms of the FreeType project */
|
12
|
+
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
13
|
+
/* this file you indicate that you have read the license and */
|
14
|
+
/* understand and accept it fully. */
|
15
|
+
/* */
|
16
|
+
/***************************************************************************/
|
17
|
+
|
18
|
+
|
19
|
+
#ifndef __FTCFFDRV_H__
|
20
|
+
#define __FTCFFDRV_H__
|
21
|
+
|
22
|
+
#include <ft2build.h>
|
23
|
+
#include FT_FREETYPE_H
|
24
|
+
|
25
|
+
#ifdef FREETYPE_H
|
26
|
+
#error "freetype.h of FreeType 1 has been loaded!"
|
27
|
+
#error "Please fix the directory search order for header files"
|
28
|
+
#error "so that freetype.h of FreeType 2 is found first."
|
29
|
+
#endif
|
30
|
+
|
31
|
+
|
32
|
+
FT_BEGIN_HEADER
|
33
|
+
|
34
|
+
|
35
|
+
/**************************************************************************
|
36
|
+
*
|
37
|
+
* @section:
|
38
|
+
* cff_driver
|
39
|
+
*
|
40
|
+
* @title:
|
41
|
+
* The CFF driver
|
42
|
+
*
|
43
|
+
* @abstract:
|
44
|
+
* Controlling the CFF driver module.
|
45
|
+
*
|
46
|
+
* @description:
|
47
|
+
* While FreeType's CFF driver doesn't expose API functions by itself,
|
48
|
+
* it is possible to control its behaviour with @FT_Property_Set and
|
49
|
+
* @FT_Property_Get. The list below gives the available properties
|
50
|
+
* together with the necessary macros and structures.
|
51
|
+
*
|
52
|
+
* The CFF driver's module name is `cff'.
|
53
|
+
*
|
54
|
+
* *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine*
|
55
|
+
*
|
56
|
+
* The rasterizer is positioning horizontal features (e.g., ascender
|
57
|
+
* height & x-height, or crossbars) on the pixel grid and minimizing the
|
58
|
+
* amount of antialiasing applied to them, while placing vertical
|
59
|
+
* features (vertical stems) on the pixel grid without hinting, thus
|
60
|
+
* representing the stem position and weight accurately. Sometimes the
|
61
|
+
* vertical stems may be only partially black. In this context,
|
62
|
+
* `antialiasing' means that stems are not positioned exactly on pixel
|
63
|
+
* borders, causing a fuzzy appearance.
|
64
|
+
*
|
65
|
+
* There are two principles behind this approach.
|
66
|
+
*
|
67
|
+
* 1) No hinting in the horizontal direction: Unlike `superhinted'
|
68
|
+
* TrueType, which changes glyph widths to accommodate regular
|
69
|
+
* inter-glyph spacing, Adobe's approach is `faithful to the design' in
|
70
|
+
* representing both the glyph width and the inter-glyph spacing
|
71
|
+
* designed for the font. This makes the screen display as close as it
|
72
|
+
* can be to the result one would get with infinite resolution, while
|
73
|
+
* preserving what is considered the key characteristics of each glyph.
|
74
|
+
* Note that the distances between unhinted and grid-fitted positions at
|
75
|
+
* small sizes are comparable to kerning values and thus would be
|
76
|
+
* noticeable (and distracting) while reading if hinting were applied.
|
77
|
+
*
|
78
|
+
* One of the reasons to not hint horizontally is antialiasing for LCD
|
79
|
+
* screens: The pixel geometry of modern displays supplies three
|
80
|
+
* vertical sub-pixels as the eye moves horizontally across each visible
|
81
|
+
* pixel. On devices where we can be certain this characteristic is
|
82
|
+
* present a rasterizer can take advantage of the sub-pixels to add
|
83
|
+
* increments of weight. In Western writing systems this turns out to
|
84
|
+
* be the more critical direction anyway; the weights and spacing of
|
85
|
+
* vertical stems (see above) are central to Armenian, Cyrillic, Greek,
|
86
|
+
* and Latin type designs. Even when the rasterizer uses greyscale
|
87
|
+
* antialiasing instead of color (a necessary compromise when one
|
88
|
+
* doesn't know the screen characteristics), the unhinted vertical
|
89
|
+
* features preserve the design's weight and spacing much better than
|
90
|
+
* aliased type would.
|
91
|
+
*
|
92
|
+
* 2) Aligment in the vertical direction: Weights and spacing along the
|
93
|
+
* y~axis are less critical; what is much more important is the visual
|
94
|
+
* alignment of related features (like cap-height and x-height). The
|
95
|
+
* sense of alignment for these is enhanced by the sharpness of grid-fit
|
96
|
+
* edges, while the cruder vertical resolution (full pixels instead of
|
97
|
+
* 1/3 pixels) is less of a problem.
|
98
|
+
*
|
99
|
+
* On the technical side, horizontal alignment zones for ascender,
|
100
|
+
* x-height, and other important height values (traditionally called
|
101
|
+
* `blue zones') as defined in the font are positioned independently,
|
102
|
+
* each being rounded to the nearest pixel edge, taking care of
|
103
|
+
* overshoot suppression at small sizes, stem darkening, and scaling.
|
104
|
+
*
|
105
|
+
* Hstems (this is, hint values defined in the font to help align
|
106
|
+
* horizontal features) that fall within a blue zone are said to be
|
107
|
+
* `captured' and are aligned to that zone. Uncaptured stems are moved
|
108
|
+
* in one of four ways, top edge up or down, bottom edge up or down.
|
109
|
+
* Unless there are conflicting hstems, the smallest movement is taken
|
110
|
+
* to minimize distortion.
|
111
|
+
*/
|
112
|
+
|
113
|
+
|
114
|
+
/**************************************************************************
|
115
|
+
*
|
116
|
+
* @property:
|
117
|
+
* hinting-engine
|
118
|
+
*
|
119
|
+
* @description:
|
120
|
+
* Thanks to Adobe, which contributed a new hinting (and parsing)
|
121
|
+
* engine, an application can select between `freetype' and `adobe' if
|
122
|
+
* compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration
|
123
|
+
* macro isn't defined, `hinting-engine' does nothing.
|
124
|
+
*
|
125
|
+
* The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is
|
126
|
+
* defined, and `adobe' otherwise.
|
127
|
+
*
|
128
|
+
* The following example code demonstrates how to select Adobe's hinting
|
129
|
+
* engine (omitting the error handling).
|
130
|
+
*
|
131
|
+
* {
|
132
|
+
* FT_Library library;
|
133
|
+
* FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
|
134
|
+
*
|
135
|
+
*
|
136
|
+
* FT_Init_FreeType( &library );
|
137
|
+
*
|
138
|
+
* FT_Property_Set( library, "cff",
|
139
|
+
* "hinting-engine", &hinting_engine );
|
140
|
+
* }
|
141
|
+
*
|
142
|
+
* @note:
|
143
|
+
* This property can be used with @FT_Property_Get also.
|
144
|
+
*
|
145
|
+
*/
|
146
|
+
|
147
|
+
|
148
|
+
/**************************************************************************
|
149
|
+
*
|
150
|
+
* @enum:
|
151
|
+
* FT_CFF_HINTING_XXX
|
152
|
+
*
|
153
|
+
* @description:
|
154
|
+
* A list of constants used for the @hinting-engine property to select
|
155
|
+
* the hinting engine for CFF fonts.
|
156
|
+
*
|
157
|
+
* @values:
|
158
|
+
* FT_CFF_HINTING_FREETYPE ::
|
159
|
+
* Use the old FreeType hinting engine.
|
160
|
+
*
|
161
|
+
* FT_CFF_HINTING_ADOBE ::
|
162
|
+
* Use the hinting engine contributed by Adobe.
|
163
|
+
*
|
164
|
+
*/
|
165
|
+
#define FT_CFF_HINTING_FREETYPE 0
|
166
|
+
#define FT_CFF_HINTING_ADOBE 1
|
167
|
+
|
168
|
+
|
169
|
+
/**************************************************************************
|
170
|
+
*
|
171
|
+
* @property:
|
172
|
+
* no-stem-darkening
|
173
|
+
*
|
174
|
+
* @description:
|
175
|
+
* By default, the Adobe CFF engine darkens stems at smaller sizes,
|
176
|
+
* regardless of hinting, to enhance contrast. This feature requires
|
177
|
+
* a rendering system with proper gamma correction. Setting this
|
178
|
+
* property, stem darkening gets switched off.
|
179
|
+
*
|
180
|
+
* Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
|
181
|
+
*
|
182
|
+
* {
|
183
|
+
* FT_Library library;
|
184
|
+
* FT_Bool no_stem_darkening = TRUE;
|
185
|
+
*
|
186
|
+
*
|
187
|
+
* FT_Init_FreeType( &library );
|
188
|
+
*
|
189
|
+
* FT_Property_Set( library, "cff",
|
190
|
+
* "no-stem-darkening", &no_stem_darkening );
|
191
|
+
* }
|
192
|
+
*
|
193
|
+
* @note:
|
194
|
+
* This property can be used with @FT_Property_Get also.
|
195
|
+
*
|
196
|
+
*/
|
197
|
+
|
198
|
+
|
199
|
+
/**************************************************************************
|
200
|
+
*
|
201
|
+
* @property:
|
202
|
+
* darkening-parameters
|
203
|
+
*
|
204
|
+
* @description:
|
205
|
+
* By default, the Adobe CFF engine darkens stems as follows (if the
|
206
|
+
* `no-stem-darkening' property isn't set):
|
207
|
+
*
|
208
|
+
* {
|
209
|
+
* stem width <= 0.5px: darkening amount = 0.4px
|
210
|
+
* stem width = 1px: darkening amount = 0.275px
|
211
|
+
* stem width = 1.667px: darkening amount = 0.275px
|
212
|
+
* stem width >= 2.333px: darkening amount = 0px
|
213
|
+
* }
|
214
|
+
*
|
215
|
+
* and piecewise linear in-between. Using the `darkening-parameters'
|
216
|
+
* property, these four control points can be changed, as the following
|
217
|
+
* example demonstrates.
|
218
|
+
*
|
219
|
+
* {
|
220
|
+
* FT_Library library;
|
221
|
+
* FT_Int darken_params[8] = { 500, 300, // x1, y1
|
222
|
+
* 1000, 200, // x2, y2
|
223
|
+
* 1500, 100, // x3, y3
|
224
|
+
* 2000, 0 }; // x4, y4
|
225
|
+
*
|
226
|
+
*
|
227
|
+
* FT_Init_FreeType( &library );
|
228
|
+
*
|
229
|
+
* FT_Property_Set( library, "cff",
|
230
|
+
* "darkening-parameters", darken_params );
|
231
|
+
* }
|
232
|
+
*
|
233
|
+
* The x~values give the stem width, and the y~values the darkening
|
234
|
+
* amount. The unit is 1000th of pixels. All coordinate values must be
|
235
|
+
* positive; the x~values must be monotonically increasing; the
|
236
|
+
* y~values must be monotonically decreasing and smaller than or
|
237
|
+
* equal to 500 (corresponding to half a pixel); the slope of each
|
238
|
+
* linear piece must be shallower than -1 (e.g., -.4).
|
239
|
+
*
|
240
|
+
* @note:
|
241
|
+
* This property can be used with @FT_Property_Get also.
|
242
|
+
*
|
243
|
+
*/
|
244
|
+
|
245
|
+
|
246
|
+
/* */
|
247
|
+
|
248
|
+
FT_END_HEADER
|
249
|
+
|
250
|
+
|
251
|
+
#endif /* __FTCFFDRV_H__ */
|
252
|
+
|
253
|
+
|
254
|
+
/* END */
|