aboutsummaryrefslogtreecommitdiff
path: root/freetype/include
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/include')
-rw-r--r--freetype/include/freetype/config/ftconfig.h3
-rw-r--r--freetype/include/freetype/config/ftheader.h15
-rw-r--r--freetype/include/freetype/config/ftoption.h22
-rw-r--r--freetype/include/freetype/config/ftstdlib.h4
-rw-r--r--freetype/include/freetype/freetype.h49
-rw-r--r--freetype/include/freetype/ftautoh.h349
-rw-r--r--freetype/include/freetype/ftchapters.h14
-rw-r--r--freetype/include/freetype/fterrdef.h4
-rw-r--r--freetype/include/freetype/ftmodapi.h161
-rw-r--r--freetype/include/freetype/internal/autohint.h71
-rw-r--r--freetype/include/freetype/internal/ftcalc.h4
-rw-r--r--freetype/include/freetype/internal/ftdriver.h368
-rw-r--r--freetype/include/freetype/internal/ftobjs.h800
-rw-r--r--freetype/include/freetype/internal/ftpic.h32
-rw-r--r--freetype/include/freetype/internal/ftrfork.h41
-rw-r--r--freetype/include/freetype/internal/ftserv.h23
-rw-r--r--freetype/include/freetype/internal/fttrace.h5
-rw-r--r--freetype/include/freetype/internal/pshints.h42
-rw-r--r--freetype/include/freetype/internal/services/svprop.h81
-rw-r--r--freetype/include/freetype/internal/sfnt.h319
-rw-r--r--freetype/include/freetype/ttnameid.h20
-rw-r--r--freetype/include/freetype/tttables.h15
22 files changed, 1723 insertions, 719 deletions
diff --git a/freetype/include/freetype/config/ftconfig.h b/freetype/include/freetype/config/ftconfig.h
index 562856947..4502fd83d 100644
--- a/freetype/include/freetype/config/ftconfig.h
+++ b/freetype/include/freetype/config/ftconfig.h
@@ -355,7 +355,8 @@ FT_BEGIN_HEADER
"mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
"orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
: "=r"(a), "=&r"(t2), "=&r"(t)
- : "r"(a), "r"(b) );
+ : "r"(a), "r"(b)
+ : "cc" );
return a;
}
diff --git a/freetype/include/freetype/config/ftheader.h b/freetype/include/freetype/config/ftheader.h
index 2a7b8c4e0..33d6b4054 100644
--- a/freetype/include/freetype/config/ftheader.h
+++ b/freetype/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
+/* Copyright 1996-2008, 2010, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -318,6 +318,19 @@
/*************************************************************************
*
* @macro:
+ * FT_AUTOHINTER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the auto-hinting module.
+ *
+ */
+#define FT_AUTOHINTER_H <freetype/ftautoh.h>
+
+
+ /*************************************************************************
+ *
+ * @macro:
* FT_TYPE1_TABLES_H
*
* @description:
diff --git a/freetype/include/freetype/config/ftoption.h b/freetype/include/freetype/config/ftoption.h
index 66bc43b6b..a73fff455 100644
--- a/freetype/include/freetype/config/ftoption.h
+++ b/freetype/include/freetype/config/ftoption.h
@@ -560,6 +560,28 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */
+ /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */
+ /* replaces the native TrueType hinting mechanism when anything but */
+ /* FT_RENDER_MODE_MONO is requested. */
+ /* */
+ /* Enabling this causes the TrueType driver to ignore instructions under */
+ /* certain conditions. This is done in accordance with the guide here, */
+ /* with some minor differences: */
+ /* */
+ /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
+ /* */
+ /* By undefining this, you only compile the code necessary to hint */
+ /* TrueType glyphs with native TT hinting. */
+ /* */
+ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
+ /* defined. */
+ /* */
+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+
+ /*************************************************************************/
+ /* */
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
/* of the TrueType bytecode interpreter is used that doesn't implement */
/* any of the patented opcodes and algorithms. The patents related to */
diff --git a/freetype/include/freetype/config/ftstdlib.h b/freetype/include/freetype/config/ftstdlib.h
index 11d5d0e65..b940efc42 100644
--- a/freetype/include/freetype/config/ftstdlib.h
+++ b/freetype/include/freetype/config/ftstdlib.h
@@ -5,7 +5,7 @@
/* ANSI-specific library and header configuration file (specification */
/* only). */
/* */
-/* Copyright 2002-2007, 2009, 2011 by */
+/* Copyright 2002-2007, 2009, 2011-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -159,7 +159,7 @@
/* on certain platforms */
#define ft_longjmp longjmp
-#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */
+#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
/* the following is only used for debugging purposes, i.e., if */
diff --git a/freetype/include/freetype/freetype.h b/freetype/include/freetype/freetype.h
index d6cebbc4b..8df4828f6 100644
--- a/freetype/include/freetype/freetype.h
+++ b/freetype/include/freetype/freetype.h
@@ -1109,8 +1109,8 @@ FT_BEGIN_HEADER
* FT_HAS_VERTICAL( face )
*
* @description:
- * A macro that returns true whenever a face object contains vertical
- * metrics.
+ * A macro that returns true whenever a face object contains real
+ * vertical metrics (and not only synthesized ones).
*
*/
#define FT_HAS_VERTICAL( face ) \
@@ -2231,6 +2231,12 @@ FT_BEGIN_HEADER
/* particular bitmap strike. Use @FT_Select_Size instead in that */
/* case. */
/* */
+ /* The relation between the requested size and the resulting glyph */
+ /* size is dependent entirely on how the size is defined in the */
+ /* source face. The font designer chooses the final size of each */
+ /* glyph relative to this size. For more information refer to */
+ /* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */
+ /* */
FT_EXPORT( FT_Error )
FT_Request_Size( FT_Face face,
FT_Size_Request req );
@@ -2300,6 +2306,11 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* You should not rely on the resulting glyphs matching, or being */
+ /* constrained, to this pixel size. Refer to @FT_Request_Size to */
+ /* understand how requested sizes relate to actual sizes. */
+ /* */
FT_EXPORT( FT_Error )
FT_Set_Pixel_Sizes( FT_Face face,
FT_UInt pixel_width,
@@ -2413,14 +2424,20 @@ FT_BEGIN_HEADER
* behaviour to more specific and useful cases.
*
* FT_LOAD_NO_SCALE ::
- * Don't scale the outline glyph loaded, but keep it in font units.
+ * Don't scale the loaded outline glyph but keep it in font units.
*
* This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and
* unsets @FT_LOAD_RENDER.
*
+ * If the font is `tricky' (see @FT_FACE_FLAG_TRICKY for more), using
+ * FT_LOAD_NO_SCALE usually yields meaningless outlines because the
+ * subglyphs must be scaled and positioned with hinting instructions.
+ * This can be solved by loading the font without FT_LOAD_NO_SCALE and
+ * setting the character size to `font->units_per_EM'.
+ *
* FT_LOAD_NO_HINTING ::
- * Disable hinting. This generally generates `blurrier' bitmap glyph
- * when the glyph is rendered in any of the anti-aliased modes. See
+ * Disable hinting. This generally generates `blurrier' bitmap glyphs
+ * when the glyph are rendered in any of the anti-aliased modes. See
* also the note below.
*
* This flag is implied by @FT_LOAD_NO_SCALE.
@@ -2439,8 +2456,14 @@ FT_BEGIN_HEADER
* @FT_LOAD_NO_SCALE always sets this flag.
*
* FT_LOAD_VERTICAL_LAYOUT ::
- * Load the glyph for vertical text layout. _Don't_ use it as it is
- * problematic currently.
+ * Load the glyph for vertical text layout. In particular, the
+ * `advance' value in the @FT_GlyphSlotRec structure is set to the
+ * `vertAdvance' value of the `metrics' field.
+ *
+ * In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use
+ * this flag currently. Reason is that in this case vertical metrics
+ * get synthesized, and those values are not always consistent across
+ * various font formats.
*
* FT_LOAD_FORCE_AUTOHINT ::
* Indicates that the auto-hinter is preferred over the font's native
@@ -3401,9 +3424,13 @@ FT_BEGIN_HEADER
/* code range for CJK characters. */
/* */
/* An IVS is registered and unique; for further details please refer */
- /* to Unicode Technical Report #37, the Ideographic Variation */
- /* Database. To date (October 2007), the character with the most */
- /* variants is U+908A, having 8~such IVS. */
+ /* to Unicode Technical Standard #37, the Ideographic Variation */
+ /* Database: */
+ /* */
+ /* http://www.unicode.org/reports/tr37/ */
+ /* */
+ /* To date (November 2012), the character with the most variants is */
+ /* U+9089, having 31 such IVS. */
/* */
/* Adobe and MS decided to support IVS with a new cmap subtable */
/* (format~14). It is an odd subtable because it is not a mapping of */
@@ -3852,7 +3879,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 4
-#define FREETYPE_PATCH 10
+#define FREETYPE_PATCH 11
/*************************************************************************/
diff --git a/freetype/include/freetype/ftautoh.h b/freetype/include/freetype/ftautoh.h
new file mode 100644
index 000000000..b427c4dd0
--- /dev/null
+++ b/freetype/include/freetype/ftautoh.h
@@ -0,0 +1,349 @@
+/***************************************************************************/
+/* */
+/* ftautoh.h */
+/* */
+/* FreeType API for controlling the auto-hinter (specification only). */
+/* */
+/* Copyright 2012 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FTAUTOH_H__
+#define __FTAUTOH_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * auto_hinter
+ *
+ * @title:
+ * The auto-hinter
+ *
+ * @abstract:
+ * Controlling the auto-hinting module.
+ *
+ * @description:
+ * While FreeType's auto-hinter doesn't expose API functions by itself,
+ * it is possible to control its behaviour with @FT_Property_Set and
+ * @FT_Property_Get. The following lists the available properties
+ * together with the necessary macros and structures.
+ *
+ * Note that the auto-hinter's module name is `autofitter' for
+ * historical reasons.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * glyph-to-script-map
+ *
+ * @description:
+ * The auto-hinter provides various script modules to hint glyphs.
+ * Examples of supported scripts are Latin or CJK. Before a glyph is
+ * auto-hinted, the Unicode character map of the font gets examined, and
+ * the script is then determined based on Unicode character ranges, see
+ * below.
+ *
+ * OpenType fonts, however, often provide much more glyphs than
+ * character codes (small caps, superscripts, ligatures, swashes, etc.),
+ * to be controlled by so-called `features'. Handling OpenType features
+ * can be quite complicated and thus needs a separate library on top of
+ * FreeType.
+ *
+ * The mapping between glyph indices and scripts (in the auto-hinter
+ * sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
+ * array with `num_glyphs' elements, as found in the font's @FT_Face
+ * structure. The `glyph-to-script-map' property returns a pointer to
+ * this array which can be modified as needed. Note that the
+ * modification should happen before the first glyph gets processed by
+ * the auto-hinter so that the global analysis of the font shapes
+ * actually uses the modified mapping.
+ *
+ * The following example code demonstrates how to access it (omitting
+ * the error handling).
+ *
+ * {
+ * FT_Library library;
+ * FT_Face face;
+ * FT_Prop_GlyphToScriptMap prop;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ * FT_New_Face( library, "foo.ttf", 0, &face );
+ *
+ * prop.face = face;
+ *
+ * FT_Property_Get( library, "autofitter",
+ * "glyph-to-script-map", &prop );
+ *
+ * // adjust `prop.map' as needed right here
+ *
+ * FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
+ * }
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_AUTOHINTER_SCRIPT_XXX
+ *
+ * @description:
+ * A list of constants used for the @glyph-to-script-map property to
+ * specify the script submodule the auto-hinter should use for hinting a
+ * particular glyph.
+ *
+ * @values:
+ * FT_AUTOHINTER_SCRIPT_NONE ::
+ * Don't auto-hint this glyph.
+ *
+ * FT_AUTOHINTER_SCRIPT_LATIN ::
+ * Apply the latin auto-hinter. For the auto-hinter, `latin' is a
+ * very broad term, including Cyrillic and Greek also since characters
+ * from those scripts share the same design constraints.
+ *
+ * By default, characters from the following Unicode ranges are
+ * assigned to this submodule.
+ *
+ * {
+ * U+0020 - U+007F // Basic Latin (no control characters)
+ * U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
+ * U+0100 - U+017F // Latin Extended-A
+ * U+0180 - U+024F // Latin Extended-B
+ * U+0250 - U+02AF // IPA Extensions
+ * U+02B0 - U+02FF // Spacing Modifier Letters
+ * U+0300 - U+036F // Combining Diacritical Marks
+ * U+0370 - U+03FF // Greek and Coptic
+ * U+0400 - U+04FF // Cyrillic
+ * U+0500 - U+052F // Cyrillic Supplement
+ * U+1D00 - U+1D7F // Phonetic Extensions
+ * U+1D80 - U+1DBF // Phonetic Extensions Supplement
+ * U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
+ * U+1E00 - U+1EFF // Latin Extended Additional
+ * U+1F00 - U+1FFF // Greek Extended
+ * U+2000 - U+206F // General Punctuation
+ * U+2070 - U+209F // Superscripts and Subscripts
+ * U+20A0 - U+20CF // Currency Symbols
+ * U+2150 - U+218F // Number Forms
+ * U+2460 - U+24FF // Enclosed Alphanumerics
+ * U+2C60 - U+2C7F // Latin Extended-C
+ * U+2DE0 - U+2DFF // Cyrillic Extended-A
+ * U+2E00 - U+2E7F // Supplemental Punctuation
+ * U+A640 - U+A69F // Cyrillic Extended-B
+ * U+A720 - U+A7FF // Latin Extended-D
+ * U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
+ * U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
+ * U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
+ * }
+ *
+ * FT_AUTOHINTER_SCRIPT_CJK ::
+ * Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old
+ * Vietnamese, and some other scripts.
+ *
+ * By default, characters from the following Unicode ranges are
+ * assigned to this submodule.
+ *
+ * {
+ * U+1100 - U+11FF // Hangul Jamo
+ * U+2E80 - U+2EFF // CJK Radicals Supplement
+ * U+2F00 - U+2FDF // Kangxi Radicals
+ * U+2FF0 - U+2FFF // Ideographic Description Characters
+ * U+3000 - U+303F // CJK Symbols and Punctuation
+ * U+3040 - U+309F // Hiragana
+ * U+30A0 - U+30FF // Katakana
+ * U+3100 - U+312F // Bopomofo
+ * U+3130 - U+318F // Hangul Compatibility Jamo
+ * U+3190 - U+319F // Kanbun
+ * U+31A0 - U+31BF // Bopomofo Extended
+ * U+31C0 - U+31EF // CJK Strokes
+ * U+31F0 - U+31FF // Katakana Phonetic Extensions
+ * U+3200 - U+32FF // Enclosed CJK Letters and Months
+ * U+3300 - U+33FF // CJK Compatibility
+ * U+3400 - U+4DBF // CJK Unified Ideographs Extension A
+ * U+4DC0 - U+4DFF // Yijing Hexagram Symbols
+ * U+4E00 - U+9FFF // CJK Unified Ideographs
+ * U+A960 - U+A97F // Hangul Jamo Extended-A
+ * U+AC00 - U+D7AF // Hangul Syllables
+ * U+D7B0 - U+D7FF // Hangul Jamo Extended-B
+ * U+F900 - U+FAFF // CJK Compatibility Ideographs
+ * U+FE10 - U+FE1F // Vertical forms
+ * U+FE30 - U+FE4F // CJK Compatibility Forms
+ * U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
+ * U+1B000 - U+1B0FF // Kana Supplement
+ * U+1D300 - U+1D35F // Tai Xuan Hing Symbols
+ * U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
+ * U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
+ * U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
+ * U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
+ * U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
+ * }
+ *
+ * FT_AUTOHINTER_SCRIPT_INDIC ::
+ * Apply the indic auto-hinter, covering all major scripts from the
+ * Indian sub-continent and some other related scripts like Thai, Lao,
+ * or Tibetan.
+ *
+ * By default, characters from the following Unicode ranges are
+ * assigned to this submodule.
+ *
+ * {
+ * U+0900 - U+0DFF // Indic Range
+ * U+0F00 - U+0FFF // Tibetan
+ * U+1900 - U+194F // Limbu
+ * U+1B80 - U+1BBF // Sundanese
+ * U+1C80 - U+1CDF // Meetei Mayak
+ * U+A800 - U+A82F // Syloti Nagri
+ * U+11800 - U+118DF // Sharada
+ * }
+ *
+ * Note that currently Indic support is rudimentary only, missing blue
+ * zone support.
+ *
+ */
+#define FT_AUTOHINTER_SCRIPT_NONE 0
+#define FT_AUTOHINTER_SCRIPT_LATIN 1
+#define FT_AUTOHINTER_SCRIPT_CJK 2
+#define FT_AUTOHINTER_SCRIPT_INDIC 3
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Prop_GlyphToScriptMap
+ *
+ * @description:
+ * The data exchange structure for the @glyph-to-script-map property.
+ *
+ */
+ typedef struct FT_Prop_GlyphToScriptMap_
+ {
+ FT_Face face;
+ FT_Byte* map;
+
+ } FT_Prop_GlyphToScriptMap;
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * fallback-script
+ *
+ * @description:
+ * If no auto-hinter script module can be assigned to a glyph, a
+ * fallback script gets assigned to it (see also the
+ * @glyph-to-script-map property). By default, this is
+ * @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property,
+ * this fallback value can be changed.
+ *
+ * {
+ * FT_Library library;
+ * FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "fallback-script", &fallback_script );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * It's important to use the right timing for changing this value: The
+ * creation of the glyph-to-script map which eventually uses the
+ * fallback script value gets triggered either by setting or reading a
+ * face-specific property like @glyph-to-script-map, or by auto-hinting
+ * any glyph from that face. In particular, if you have already created
+ * an @FT_Face structure but not loaded any glyph (using the
+ * auto-hinter), a change of the fallback glyph will affect this face.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * increase-x-height
+ *
+ * @description:
+ * For ppem values in the range 6~<= ppem <= `increase-x-height', round
+ * up the font's x~height much more often than normally. If the value
+ * is set to~0, which is the default, this feature is switched off. Use
+ * this property to improve the legibility of small font sizes if
+ * necessary.
+ *
+ * {
+ * FT_Library library;
+ * FT_Face face;
+ * FT_Prop_IncreaseXHeight prop;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ * FT_New_Face( library, "foo.ttf", 0, &face );
+ * FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
+ *
+ * prop.face = face;
+ * prop.limit = 14;
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "increase-x-height", &prop );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * Set this value right after calling @FT_Set_Char_Size, but before
+ * loading any glyph (using the auto-hinter).
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Prop_IncreaseXHeight
+ *
+ * @description:
+ * The data exchange structure for the @increase-x-height property.
+ *
+ */
+ typedef struct FT_Prop_IncreaseXHeight_
+ {
+ FT_Face face;
+ FT_UInt limit;
+
+ } FT_Prop_IncreaseXHeight;
+
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FTAUTOH_H__ */
+
+
+/* END */
diff --git a/freetype/include/freetype/ftchapters.h b/freetype/include/freetype/ftchapters.h
index 6cdf54e49..984eef372 100644
--- a/freetype/include/freetype/ftchapters.h
+++ b/freetype/include/freetype/ftchapters.h
@@ -67,6 +67,20 @@
/***************************************************************************/
/* */
/* <Chapter> */
+/* auto_hinter */
+/* */
+/* <Title> */
+/* The Auto-Hinter */
+/* */
+/* <Sections> */
+/* auto_hinter */
+/* */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/* */
+/* <Chapter> */
/* cache_subsystem */
/* */
/* <Title> */
diff --git a/freetype/include/freetype/fterrdef.h b/freetype/include/freetype/fterrdef.h
index fb4b53bca..bb06d79e9 100644
--- a/freetype/include/freetype/fterrdef.h
+++ b/freetype/include/freetype/fterrdef.h
@@ -4,7 +4,7 @@
/* */
/* FreeType error codes (specification). */
/* */
-/* Copyright 2002, 2004, 2006, 2007, 2010-2011 by */
+/* Copyright 2002, 2004, 2006, 2007, 2010-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -56,6 +56,8 @@
"array allocation size too large" )
FT_ERRORDEF_( Missing_Module, 0x0B, \
"missing module" )
+ FT_ERRORDEF_( Missing_Property, 0x0C, \
+ "missing property" )
/* glyph/character errors */
diff --git a/freetype/include/freetype/ftmodapi.h b/freetype/include/freetype/ftmodapi.h
index 45bce4d31..5e5242cf9 100644
--- a/freetype/include/freetype/ftmodapi.h
+++ b/freetype/include/freetype/ftmodapi.h
@@ -4,7 +4,7 @@
/* */
/* FreeType modules public interface (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */
+/* Copyright 1996-2003, 2006, 2008-2010, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -42,11 +42,38 @@ FT_BEGIN_HEADER
/* Module Management */
/* */
/* <Abstract> */
- /* How to add, upgrade, and remove modules from FreeType. */
+ /* How to add, upgrade, remove, and control modules from FreeType. */
/* */
/* <Description> */
/* The definitions below are used to manage modules within FreeType. */
/* Modules can be added, upgraded, and removed at runtime. */
+ /* Additionally, some module properties can be controlled also. */
+ /* */
+ /* Here is a list of possible values of the `module_name' field in */
+ /* the @FT_Module_Class structure. */
+ /* */
+ /* { */
+ /* autofitter */
+ /* bdf */
+ /* cff */
+ /* gxvalid */
+ /* otvalid */
+ /* pcf */
+ /* pfr */
+ /* psaux */
+ /* pshinter */
+ /* psnames */
+ /* raster1, raster5 */
+ /* sfnt */
+ /* smooth, smooth-lcd, smooth-lcdv */
+ /* truetype */
+ /* type1 */
+ /* type42 */
+ /* t1cid */
+ /* winfonts */
+ /* } */
+ /* */
+ /* Note that the FreeType Cache sub-system is not a FreeType module. */
/* */
/*************************************************************************/
@@ -118,7 +145,7 @@ FT_BEGIN_HEADER
/* A function used to query a given module for a specific interface. */
/* */
/* <Input> */
- /* module :: The module to finalize. */
+ /* module :: The module to be searched. */
/* */
/* name :: The name of the interface in the module. */
/* */
@@ -249,6 +276,130 @@ FT_BEGIN_HEADER
FT_Module module );
+ /**********************************************************************
+ *
+ * @function:
+ * FT_Property_Set
+ *
+ * @description:
+ * Set a property for a given module.
+ *
+ * @input:
+ * library ::
+ * A handle to the library the module is part of.
+ *
+ * module_name ::
+ * The module name.
+ *
+ * property_name ::
+ * The property name. Properties are described in the `Synopsis'
+ * subsection of the module's documentation.
+ *
+ * Note that only a few modules have properties.
+ *
+ * value ::
+ * A generic pointer to a variable or structure which gives the new
+ * value of the property. The exact definition of `value' is
+ * dependent on the property; see the `Synopsis' subsection of the
+ * module's documentation.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * If `module_name' isn't a valid module name, or `property_name'
+ * doesn't specify a valid property, or if `value' doesn't represent a
+ * valid value for the given property, an error is returned.
+ *
+ * The following example sets property `bar' (a simple integer) in
+ * module `foo' to value~1.
+ *
+ * {
+ * FT_UInt bar;
+ *
+ *
+ * bar = 1;
+ * FT_Property_Set( library, "foo", "bar", &bar );
+ * }
+ *
+ * It is not possible to set properties of the FreeType Cache
+ * sub-system with FT_Property_Set; use @FTC_Property_Set instead.
+ *
+ * @since:
+ * 2.4.11
+ *
+ */
+ FT_Error
+ FT_Property_Set( FT_Library library,
+ const FT_String* module_name,
+ const FT_String* property_name,
+ const void* value );
+
+
+ /**********************************************************************
+ *
+ * @function:
+ * FT_Property_Get
+ *
+ * @description:
+ * Get a module's property value.
+ *
+ * @input:
+ * library ::
+ * A handle to the library the module is part of.
+ *
+ * module_name ::
+ * The module name.
+ *
+ * property_name ::
+ * The property name. Properties are described in the `Synopsis'
+ * subsection of the module's documentation.
+ *
+ * @inout:
+ * value ::
+ * A generic pointer to a variable or structure which gives the
+ * value of the property. The exact definition of `value' is
+ * dependent on the property; see the `Synopsis' subsection of the
+ * module's documentation.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * If `module_name' isn't a valid module name, or `property_name'
+ * doesn't specify a valid property, or if `value' doesn't represent a
+ * valid value for the given property, an error is returned.
+ *
+ * The following example gets property `baz' (a range) in module `foo'.
+ *
+ * {
+ * typedef range_
+ * {
+ * FT_Int32 min;
+ * FT_Int32 max;
+ *
+ * } range;
+ *
+ * range baz;
+ *
+ *
+ * FT_Property_Get( library, "foo", "baz", &baz );
+ * }
+ *
+ * It is not possible to retrieve properties of the FreeType Cache
+ * sub-system with FT_Property_Get; use @FTC_Property_Get instead.
+ *
+ * @since:
+ * 2.4.11
+ *
+ */
+ FT_Error
+ FT_Property_Get( FT_Library library,
+ const FT_String* module_name,
+ const FT_String* property_name,
+ void* value );
+
+
/*************************************************************************/
/* */
/* <Function> */
@@ -430,13 +581,13 @@ FT_BEGIN_HEADER
* scale glyph components with bytecode instructions. It produces
* bad output for most other fonts.
*
- * FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
+ * FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
* The library implements a bytecode interpreter that covers
* the full instruction set of the TrueType virtual machine (this
* was governed by patents until May 2010, hence the name).
*
* @since:
- * 2.2
+ * 2.2
*
*/
typedef enum FT_TrueTypeEngineType_
diff --git a/freetype/include/freetype/internal/autohint.h b/freetype/include/freetype/internal/autohint.h
index f2605a699..e1eaff509 100644
--- a/freetype/include/freetype/internal/autohint.h
+++ b/freetype/include/freetype/internal/autohint.h
@@ -4,7 +4,7 @@
/* */
/* High-level `autohint' module-specific interface (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2007 by */
+/* Copyright 1996-2002, 2007, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -86,20 +86,20 @@ FT_BEGIN_HEADER
/* FT_AutoHinter_GlobalGetFunc */
/* */
/* <Description> */
- /* Retrieves the global hints computed for a given face object the */
+ /* Retrieve the global hints computed for a given face object. The */
/* resulting data is dissociated from the face and will survive a */
/* call to FT_Done_Face(). It must be discarded through the API */
/* FT_AutoHinter_GlobalDoneFunc(). */
/* */
/* <Input> */
- /* hinter :: A handle to the source auto-hinter. */
+ /* hinter :: A handle to the source auto-hinter. */
/* */
- /* face :: A handle to the source face object. */
+ /* face :: A handle to the source face object. */
/* */
/* <Output> */
- /* global_hints :: A typeless pointer to the global hints. */
+ /* global_hints :: A typeless pointer to the global hints. */
/* */
- /* global_len :: The size in bytes of the global hints. */
+ /* global_len :: The size in bytes of the global hints. */
/* */
typedef void
(*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter hinter,
@@ -114,7 +114,7 @@ FT_BEGIN_HEADER
/* FT_AutoHinter_GlobalDoneFunc */
/* */
/* <Description> */
- /* Discards the global hints retrieved through */
+ /* Discard the global hints retrieved through */
/* FT_AutoHinter_GlobalGetFunc(). This is the only way these hints */
/* are freed from memory. */
/* */
@@ -168,8 +168,8 @@ FT_BEGIN_HEADER
/* This function is capable of loading composite glyphs by hinting */
/* each sub-glyph independently (which improves quality). */
/* */
- /* It will call the font driver with FT_Load_Glyph(), with */
- /* FT_LOAD_NO_SCALE set. */
+ /* It will call the font driver with @FT_Load_Glyph, with */
+ /* @FT_LOAD_NO_SCALE set. */
/* */
typedef FT_Error
(*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter,
@@ -182,43 +182,56 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
- /* FT_AutoHinter_ServiceRec */
+ /* FT_AutoHinter_InterfaceRec */
/* */
/* <Description> */
/* The auto-hinter module's interface. */
/* */
- typedef struct FT_AutoHinter_ServiceRec_
+ typedef struct FT_AutoHinter_InterfaceRec_
{
FT_AutoHinter_GlobalResetFunc reset_face;
FT_AutoHinter_GlobalGetFunc get_global_hints;
FT_AutoHinter_GlobalDoneFunc done_global_hints;
FT_AutoHinter_GlyphLoadFunc load_glyph;
- } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service;
+ } FT_AutoHinter_InterfaceRec, *FT_AutoHinter_Interface;
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \
- done_global_hints_, load_glyph_) \
- FT_CALLBACK_TABLE_DEF \
- const FT_AutoHinter_ServiceRec class_ = \
- { \
- reset_face_, get_global_hints_, done_global_hints_, load_glyph_ \
+#define FT_DEFINE_AUTOHINTER_INTERFACE( \
+ class_, \
+ reset_face_, \
+ get_global_hints_, \
+ done_global_hints_, \
+ load_glyph_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_AutoHinter_InterfaceRec class_ = \
+ { \
+ reset_face_, \
+ get_global_hints_, \
+ done_global_hints_, \
+ load_glyph_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \
- done_global_hints_, load_glyph_) \
- void \
- FT_Init_Class_##class_( FT_Library library, \
- FT_AutoHinter_ServiceRec* clazz) \
- { \
- FT_UNUSED(library); \
- clazz->reset_face = reset_face_; \
- clazz->get_global_hints = get_global_hints_; \
- clazz->done_global_hints = done_global_hints_; \
- clazz->load_glyph = load_glyph_; \
+#define FT_DEFINE_AUTOHINTER_INTERFACE( \
+ class_, \
+ reset_face_, \
+ get_global_hints_, \
+ done_global_hints_, \
+ load_glyph_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ FT_AutoHinter_InterfaceRec* clazz ) \
+ { \
+ FT_UNUSED( library ); \
+ \
+ clazz->reset_face = reset_face_; \
+ clazz->get_global_hints = get_global_hints_; \
+ clazz->done_global_hints = done_global_hints_; \
+ clazz->load_glyph = load_glyph_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/freetype/include/freetype/internal/ftcalc.h b/freetype/include/freetype/internal/ftcalc.h
index 5dbe1f293..125cda1a3 100644
--- a/freetype/include/freetype/internal/ftcalc.h
+++ b/freetype/include/freetype/internal/ftcalc.h
@@ -78,8 +78,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
-#ifdef TT_USE_BYTECODE_INTERPRETER
-
/*************************************************************************/
/* */
/* <Function> */
@@ -108,8 +106,6 @@ FT_BEGIN_HEADER
FT_Long b,
FT_Long c );
-#endif /* TT_USE_BYTECODE_INTERPRETER */
-
/*
* A variant of FT_Matrix_Multiply which scales its result afterwards.
diff --git a/freetype/include/freetype/internal/ftdriver.h b/freetype/include/freetype/internal/ftdriver.h
index 6f6b20622..093b14b4f 100644
--- a/freetype/include/freetype/internal/ftdriver.h
+++ b/freetype/include/freetype/internal/ftdriver.h
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver interface (specification). */
/* */
-/* Copyright 1996-2003, 2006, 2008, 2011 by */
+/* Copyright 1996-2003, 2006, 2008, 2011-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -181,37 +181,37 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Driver_ClassRec_
{
- FT_Module_Class root;
+ FT_Module_Class root;
- FT_Long face_object_size;
- FT_Long size_object_size;
- FT_Long slot_object_size;
+ FT_Long face_object_size;
+ FT_Long size_object_size;
+ FT_Long slot_object_size;
- FT_Face_InitFunc init_face;
- FT_Face_DoneFunc done_face;
+ FT_Face_InitFunc init_face;
+ FT_Face_DoneFunc done_face;
- FT_Size_InitFunc init_size;
- FT_Size_DoneFunc done_size;
+ FT_Size_InitFunc init_size;
+ FT_Size_DoneFunc done_size;
- FT_Slot_InitFunc init_slot;
- FT_Slot_DoneFunc done_slot;
+ FT_Slot_InitFunc init_slot;
+ FT_Slot_DoneFunc done_slot;
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
- FT_Size_ResetPointsFunc set_char_sizes;
- FT_Size_ResetPixelsFunc set_pixel_sizes;
+ FT_Size_ResetPointsFunc set_char_sizes;
+ FT_Size_ResetPixelsFunc set_pixel_sizes;
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
- FT_Slot_LoadFunc load_glyph;
+ FT_Slot_LoadFunc load_glyph;
- FT_Face_GetKerningFunc get_kerning;
- FT_Face_AttachFunc attach_file;
- FT_Face_GetAdvancesFunc get_advances;
+ FT_Face_GetKerningFunc get_kerning;
+ FT_Face_AttachFunc attach_file;
+ FT_Face_GetAdvancesFunc get_advances;
/* since version 2.2 */
- FT_Size_RequestFunc request_size;
- FT_Size_SelectFunc select_size;
+ FT_Size_RequestFunc request_size;
+ FT_Size_SelectFunc select_size;
} FT_Driver_ClassRec, *FT_Driver_Class;
@@ -239,14 +239,15 @@ FT_BEGIN_HEADER
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
/*************************************************************************/
/* */
/* <Macro> */
/* FT_DECLARE_DRIVER */
/* */
/* <Description> */
- /* Used to create a forward declaration of a */
- /* FT_Driver_ClassRec stract instance. */
+ /* Used to create a forward declaration of an FT_Driver_ClassRec */
+ /* struct instance. */
/* */
/* <Macro> */
/* FT_DEFINE_DRIVER */
@@ -254,160 +255,219 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Driver_ClassRec struct. */
/* */
- /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */
- /* to called with a pointer where the allocated stracture is returned.*/
- /* And when it is no longer needed a Destroy function needs */
- /* to be called to release that allocation. */
- /* fcinit.c (ft_create_default_module_classes) already contains */
- /* a mechanism to call these functions for the default modules */
- /* described in ftmodule.h */
+ /* When FT_CONFIG_OPTION_PIC is defined a `create' function has to be */
+ /* called with a pointer where the allocated structure is returned. */
+ /* And when it is no longer needed a `destroy' function needs to be */
+ /* called to release that allocation. */
+ /* */
+ /* `fcinit.c' (ft_create_default_module_classes) already contains a */
+ /* mechanism to call these functions for the default modules */
+ /* described in `ftmodule.h'. */
/* */
- /* Notice that the created Create and Destroy functions call */
- /* pic_init and pic_free function to allow you to manually allocate */
- /* and initialize any additional global data, like module specific */
+ /* Notice that the created `create' and `destroy' functions call */
+ /* `pic_init' and `pic_free' to allow you to manually allocate and */
+ /* initialize any additional global data, like a module specific */
/* interface, and put them in the global pic container defined in */
- /* ftpic.h. if you don't need them just implement the functions as */
- /* empty to resolve the link error. Also the pic_init and pic_free */
- /* functions should be declared in pic.h, to be referred by driver */
- /* definition calling FT_DEFINE_DRIVER() in following. */
+ /* `ftpic.h'. If you don't need them just implement the functions as */
+ /* empty to resolve the link error. Also the `pic_init' and */
+ /* `pic_free' functions should be declared in `pic.h', to be referred */
+ /* by driver definition calling `FT_DEFINE_DRIVER' in following. */
/* */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
- /* allocated in the global scope (or the scope where the macro */
- /* is used). */
+ /* allocated in the global scope (or the scope where the macro is */
+ /* used). */
/* */
#ifndef FT_CONFIG_OPTION_PIC
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \
- a_, b_,
+#define FT_DEFINE_DRIVERS_OLD_INTERNALS( a_, b_ ) \
+ a_, b_,
#else
- #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_)
+#define FT_DEFINE_DRIVERS_OLD_INTERNALS( a_, b_ ) /* empty */
#endif
-#define FT_DECLARE_DRIVER(class_) \
- FT_CALLBACK_TABLE \
+#define FT_DECLARE_DRIVER( class_ ) \
+ FT_CALLBACK_TABLE \
const FT_Driver_ClassRec class_;
-#define FT_DEFINE_DRIVER(class_, \
- flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_, \
- face_object_size_, size_object_size_, \
- slot_object_size_, init_face_, done_face_, \
- init_size_, done_size_, init_slot_, done_slot_, \
- old_set_char_sizes_, old_set_pixel_sizes_, \
- load_glyph_, get_kerning_, attach_file_, \
- get_advances_, request_size_, select_size_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Driver_ClassRec class_ = \
- { \
- FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \
- init_,done_,get_interface_) \
- \
- face_object_size_, \
- size_object_size_, \
- slot_object_size_, \
- \
- init_face_, \
- done_face_, \
- \
- init_size_, \
- done_size_, \
- \
- init_slot_, \
- done_slot_, \
- \
- FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \
- \
- load_glyph_, \
- \
- get_kerning_, \
- attach_file_, \
- get_advances_, \
- \
- request_size_, \
- select_size_ \
+#define FT_DEFINE_DRIVER( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_, \
+ face_object_size_, \
+ size_object_size_, \
+ slot_object_size_, \
+ init_face_, \
+ done_face_, \
+ init_size_, \
+ done_size_, \
+ init_slot_, \
+ done_slot_, \
+ old_set_char_sizes_, \
+ old_set_pixel_sizes_, \
+ load_glyph_, \
+ get_kerning_, \
+ attach_file_, \
+ get_advances_, \
+ request_size_, \
+ select_size_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_Driver_ClassRec class_ = \
+ { \
+ FT_DEFINE_ROOT_MODULE( flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ \
+ face_object_size_, \
+ size_object_size_, \
+ slot_object_size_, \
+ \
+ init_face_, \
+ done_face_, \
+ \
+ init_size_, \
+ done_size_, \
+ \
+ init_slot_, \
+ done_slot_, \
+ \
+ FT_DEFINE_DRIVERS_OLD_INTERNALS( old_set_char_sizes_, \
+ old_set_pixel_sizes_ ) \
+ \
+ load_glyph_, \
+ \
+ get_kerning_, \
+ attach_file_, \
+ get_advances_, \
+ \
+ request_size_, \
+ select_size_ \
};
#else /* FT_CONFIG_OPTION_PIC */
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \
- clazz->set_char_sizes = a_; \
- clazz->set_pixel_sizes = b_;
+#define FT_DEFINE_DRIVERS_OLD_INTERNALS( a_, b_ ) \
+ clazz->set_char_sizes = a_; \
+ clazz->set_pixel_sizes = b_;
#else
- #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_)
+#define FT_DEFINE_DRIVERS_OLD_INTERNALS( a_, b_ ) /* empty */
#endif
-#define FT_DECLARE_DRIVER(class_) FT_DECLARE_MODULE(class_)
-
-#define FT_DEFINE_DRIVER(class_, \
- flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_, \
- face_object_size_, size_object_size_, \
- slot_object_size_, init_face_, done_face_, \
- init_size_, done_size_, init_slot_, done_slot_, \
- old_set_char_sizes_, old_set_pixel_sizes_, \
- load_glyph_, get_kerning_, attach_file_, \
- get_advances_, request_size_, select_size_ ) \
- \
- void \
- FT_Destroy_Class_##class_( FT_Library library, \
- FT_Module_Class* clazz ) \
- { \
- FT_Memory memory = library->memory; \
- FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \
- class_##_pic_free( library ); \
- if ( dclazz ) \
- FT_FREE( dclazz ); \
- } \
- \
- FT_Error \
- FT_Create_Class_##class_( FT_Library library, \
- FT_Module_Class** output_class ) \
- { \
- FT_Driver_Class clazz; \
- FT_Error error; \
- FT_Memory memory = library->memory; \
- \
- if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \
- return error; \
- \
- error = class_##_pic_init( library ); \
- if(error) \
- { \
- FT_FREE( clazz ); \
- return error; \
- } \
- \
- FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \
- init_,done_,get_interface_) \
- \
- clazz->face_object_size = face_object_size_; \
- clazz->size_object_size = size_object_size_; \
- clazz->slot_object_size = slot_object_size_; \
- \
- clazz->init_face = init_face_; \
- clazz->done_face = done_face_; \
- \
- clazz->init_size = init_size_; \
- clazz->done_size = done_size_; \
- \
- clazz->init_slot = init_slot_; \
- clazz->done_slot = done_slot_; \
- \
- FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \
- \
- clazz->load_glyph = load_glyph_; \
- \
- clazz->get_kerning = get_kerning_; \
- clazz->attach_file = attach_file_; \
- clazz->get_advances = get_advances_; \
- \
- clazz->request_size = request_size_; \
- clazz->select_size = select_size_; \
- \
- *output_class = (FT_Module_Class*)clazz; \
- return FT_Err_Ok; \
+#define FT_DECLARE_DRIVER( class_ ) FT_DECLARE_MODULE( class_ )
+
+#define FT_DEFINE_DRIVER( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_, \
+ face_object_size_, \
+ size_object_size_, \
+ slot_object_size_, \
+ init_face_, \
+ done_face_, \
+ init_size_, \
+ done_size_, \
+ init_slot_, \
+ done_slot_, \
+ old_set_char_sizes_, \
+ old_set_pixel_sizes_, \
+ load_glyph_, \
+ get_kerning_, \
+ attach_file_, \
+ get_advances_, \
+ request_size_, \
+ select_size_ ) \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_Module_Class* clazz ) \
+ { \
+ FT_Memory memory = library->memory; \
+ FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \
+ \
+ \
+ class_ ## _pic_free( library ); \
+ if ( dclazz ) \
+ FT_FREE( dclazz ); \
+ } \
+ \
+ \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_Module_Class** output_class ) \
+ { \
+ FT_Driver_Class clazz = NULL; \
+ FT_Error error; \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
+ return error; \
+ \
+ error = class_ ## _pic_init( library ); \
+ if ( error ) \
+ { \
+ FT_FREE( clazz ); \
+ return error; \
+ } \
+ \
+ FT_DEFINE_ROOT_MODULE( flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ \
+ clazz->face_object_size = face_object_size_; \
+ clazz->size_object_size = size_object_size_; \
+ clazz->slot_object_size = slot_object_size_; \
+ \
+ clazz->init_face = init_face_; \
+ clazz->done_face = done_face_; \
+ \
+ clazz->init_size = init_size_; \
+ clazz->done_size = done_size_; \
+ \
+ clazz->init_slot = init_slot_; \
+ clazz->done_slot = done_slot_; \
+ \
+ FT_DEFINE_DRIVERS_OLD_INTERNALS( old_set_char_sizes_, \
+ old_set_pixel_sizes_ ) \
+ \
+ clazz->load_glyph = load_glyph_; \
+ \
+ clazz->get_kerning = get_kerning_; \
+ clazz->attach_file = attach_file_; \
+ clazz->get_advances = get_advances_; \
+ \
+ clazz->request_size = request_size_; \
+ clazz->select_size = select_size_; \
+ \
+ *output_class = (FT_Module_Class*)clazz; \
+ \
+ return FT_Err_Ok; \
}
diff --git a/freetype/include/freetype/internal/ftobjs.h b/freetype/include/freetype/internal/ftobjs.h
index 10aa23828..c97b25b27 100644
--- a/freetype/include/freetype/internal/ftobjs.h
+++ b/freetype/include/freetype/internal/ftobjs.h
@@ -206,46 +206,79 @@ FT_BEGIN_HEADER
} FT_CMap_ClassRec;
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DECLARE_CMAP_CLASS(class_) \
- FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
-
-#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \
- char_next_, char_var_index_, char_var_default_, variant_list_, \
- charvariant_list_, variantchar_list_) \
- FT_CALLBACK_TABLE_DEF \
- const FT_CMap_ClassRec class_ = \
- { \
- size_, init_, done_, char_index_, char_next_, char_var_index_, \
- char_var_default_, variant_list_, charvariant_list_, variantchar_list_ \
+#define FT_DECLARE_CMAP_CLASS( class_ ) \
+ FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
+
+#define FT_DEFINE_CMAP_CLASS( \
+ class_, \
+ size_, \
+ init_, \
+ done_, \
+ char_index_, \
+ char_next_, \
+ char_var_index_, \
+ char_var_default_, \
+ variant_list_, \
+ charvariant_list_, \
+ variantchar_list_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_CMap_ClassRec class_ = \
+ { \
+ size_, \
+ init_, \
+ done_, \
+ char_index_, \
+ char_next_, \
+ char_var_index_, \
+ char_var_default_, \
+ variant_list_, \
+ charvariant_list_, \
+ variantchar_list_ \
};
+
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DECLARE_CMAP_CLASS(class_) \
- void FT_Init_Class_##class_( FT_Library library, FT_CMap_ClassRec* clazz);
-
-#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \
- char_next_, char_var_index_, char_var_default_, variant_list_, \
- charvariant_list_, variantchar_list_) \
- void \
- FT_Init_Class_##class_( FT_Library library, \
- FT_CMap_ClassRec* clazz) \
- { \
- FT_UNUSED(library); \
- clazz->size = size_; \
- clazz->init = init_; \
- clazz->done = done_; \
- clazz->char_index = char_index_; \
- clazz->char_next = char_next_; \
- clazz->char_var_index = char_var_index_; \
- clazz->char_var_default = char_var_default_; \
- clazz->variant_list = variant_list_; \
- clazz->charvariant_list = charvariant_list_; \
- clazz->variantchar_list = variantchar_list_; \
+#define FT_DECLARE_CMAP_CLASS( class_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ FT_CMap_ClassRec* clazz );
+
+#define FT_DEFINE_CMAP_CLASS( \
+ class_, \
+ size_, \
+ init_, \
+ done_, \
+ char_index_, \
+ char_next_, \
+ char_var_index_, \
+ char_var_default_, \
+ variant_list_, \
+ charvariant_list_, \
+ variantchar_list_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ FT_CMap_ClassRec* clazz ) \
+ { \
+ FT_UNUSED( library ); \
+ \
+ clazz->size = size_; \
+ clazz->init = init_; \
+ clazz->done = done_; \
+ clazz->char_index = char_index_; \
+ clazz->char_next = char_next_; \
+ clazz->char_var_index = char_var_index_; \
+ clazz->char_var_default = char_var_default_; \
+ clazz->variant_list = variant_list_; \
+ clazz->charvariant_list = charvariant_list_; \
+ clazz->variantchar_list = variantchar_list_; \
}
+
#endif /* FT_CONFIG_OPTION_PIC */
+
/* create a new charmap and add it to charmap->face */
FT_BASE( FT_Error )
FT_CMap_New( FT_CMap_Class clazz,
@@ -411,6 +444,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
+ /*************************************************************************/
/**** ****/
/**** ****/
/**** M O D U L E S ****/
@@ -503,7 +537,7 @@ FT_BEGIN_HEADER
ft_module_get_service( FT_Module module,
const char* service_id );
- /* */
+ /* */
/*************************************************************************/
@@ -511,7 +545,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/**** ****/
/**** ****/
- /**** FACE, SIZE & GLYPH SLOT OBJECTS ****/
+ /**** F A C E, S I Z E & G L Y P H S L O T O B J E C T S ****/
/**** ****/
/**** ****/
/*************************************************************************/
@@ -926,12 +960,13 @@ FT_BEGIN_HEADER
FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster;
#endif
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/**** ****/
/**** ****/
- /**** PIC-Support Macros for ftimage.h ****/
+ /**** P I C S U P P O R T ****/
/**** ****/
/**** ****/
/*************************************************************************/
@@ -939,6 +974,9 @@ FT_BEGIN_HEADER
/*************************************************************************/
+ /* PIC support macros for ftimage.h */
+
+
/*************************************************************************/
/* */
/* <Macro> */
@@ -947,38 +985,57 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Outline_Funcs struct. */
/* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */
- /* called with a pre-allocated stracture to be filled. */
+ /* be called with a pre-allocated structure to be filled. */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
/* is used). */
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \
- cubic_to_, shift_, delta_) \
- static const FT_Outline_Funcs class_ = \
- { \
- move_to_, line_to_, conic_to_, cubic_to_, shift_, delta_ \
+#define FT_DEFINE_OUTLINE_FUNCS( \
+ class_, \
+ move_to_, \
+ line_to_, \
+ conic_to_, \
+ cubic_to_, \
+ shift_, \
+ delta_ ) \
+ static const FT_Outline_Funcs class_ = \
+ { \
+ move_to_, \
+ line_to_, \
+ conic_to_, \
+ cubic_to_, \
+ shift_, \
+ delta_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \
- cubic_to_, shift_, delta_) \
- static FT_Error \
- Init_Class_##class_( FT_Outline_Funcs* clazz ) \
- { \
- clazz->move_to = move_to_; \
- clazz->line_to = line_to_; \
- clazz->conic_to = conic_to_; \
- clazz->cubic_to = cubic_to_; \
- clazz->shift = shift_; \
- clazz->delta = delta_; \
- return FT_Err_Ok; \
+#define FT_DEFINE_OUTLINE_FUNCS( \
+ class_, \
+ move_to_, \
+ line_to_, \
+ conic_to_, \
+ cubic_to_, \
+ shift_, \
+ delta_ ) \
+ static FT_Error \
+ Init_Class_ ## class_( FT_Outline_Funcs* clazz ) \
+ { \
+ clazz->move_to = move_to_; \
+ clazz->line_to = line_to_; \
+ clazz->conic_to = conic_to_; \
+ clazz->cubic_to = cubic_to_; \
+ clazz->shift = shift_; \
+ clazz->delta = delta_; \
+ \
+ return FT_Err_Ok; \
}
#endif /* FT_CONFIG_OPTION_PIC */
+
/*************************************************************************/
/* */
/* <Macro> */
@@ -987,51 +1044,56 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Raster_Funcs struct. */
/* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */
- /* called with a pre-allocated stracture to be filled. */
+ /* be called with a pre-allocated structure to be filled. */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
/* is used). */
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \
- raster_reset_, raster_set_mode_, \
- raster_render_, raster_done_) \
- const FT_Raster_Funcs class_ = \
- { \
- glyph_format_, raster_new_, raster_reset_, \
- raster_set_mode_, raster_render_, raster_done_ \
+#define FT_DEFINE_RASTER_FUNCS( \
+ class_, \
+ glyph_format_, \
+ raster_new_, \
+ raster_reset_, \
+ raster_set_mode_, \
+ raster_render_, \
+ raster_done_ ) \
+ const FT_Raster_Funcs class_ = \
+ { \
+ glyph_format_, \
+ raster_new_, \
+ raster_reset_, \
+ raster_set_mode_, \
+ raster_render_, \
+ raster_done_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \
- raster_reset_, raster_set_mode_, raster_render_, raster_done_) \
- void \
- FT_Init_Class_##class_( FT_Raster_Funcs* clazz ) \
- { \
- clazz->glyph_format = glyph_format_; \
- clazz->raster_new = raster_new_; \
- clazz->raster_reset = raster_reset_; \
- clazz->raster_set_mode = raster_set_mode_; \
- clazz->raster_render = raster_render_; \
- clazz->raster_done = raster_done_; \
+#define FT_DEFINE_RASTER_FUNCS( \
+ class_, \
+ glyph_format_, \
+ raster_new_, \
+ raster_reset_, \
+ raster_set_mode_, \
+ raster_render_, \
+ raster_done_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Raster_Funcs* clazz ) \
+ { \
+ clazz->glyph_format = glyph_format_; \
+ clazz->raster_new = raster_new_; \
+ clazz->raster_reset = raster_reset_; \
+ clazz->raster_set_mode = raster_set_mode_; \
+ clazz->raster_render = raster_render_; \
+ clazz->raster_done = raster_done_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** PIC-Support Macros for ftrender.h ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
+ /* PIC support macros for ftrender.h */
/*************************************************************************/
@@ -1042,40 +1104,64 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Glyph_Class struct. */
/* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */
- /* called with a pre-allocated stracture to be filled. */
+ /* be called with a pre-allocated stcture to be filled. */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
/* is used). */
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \
- transform_, bbox_, prepare_) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Glyph_Class class_ = \
- { \
- size_, format_, init_, done_, copy_, transform_, bbox_, prepare_ \
+#define FT_DEFINE_GLYPH( \
+ class_, \
+ size_, \
+ format_, \
+ init_, \
+ done_, \
+ copy_, \
+ transform_, \
+ bbox_, \
+ prepare_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_Glyph_Class class_ = \
+ { \
+ size_, \
+ format_, \
+ init_, \
+ done_, \
+ copy_, \
+ transform_, \
+ bbox_, \
+ prepare_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \
- transform_, bbox_, prepare_) \
- void \
- FT_Init_Class_##class_( FT_Glyph_Class* clazz ) \
- { \
- clazz->glyph_size = size_; \
- clazz->glyph_format = format_; \
- clazz->glyph_init = init_; \
- clazz->glyph_done = done_; \
- clazz->glyph_copy = copy_; \
- clazz->glyph_transform = transform_; \
- clazz->glyph_bbox = bbox_; \
- clazz->glyph_prepare = prepare_; \
+#define FT_DEFINE_GLYPH( \
+ class_, \
+ size_, \
+ format_, \
+ init_, \
+ done_, \
+ copy_, \
+ transform_, \
+ bbox_, \
+ prepare_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Glyph_Class* clazz ) \
+ { \
+ clazz->glyph_size = size_; \
+ clazz->glyph_format = format_; \
+ clazz->glyph_init = init_; \
+ clazz->glyph_done = done_; \
+ clazz->glyph_copy = copy_; \
+ clazz->glyph_transform = transform_; \
+ clazz->glyph_bbox = bbox_; \
+ clazz->glyph_prepare = prepare_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
+
/*************************************************************************/
/* */
/* <Macro> */
@@ -1083,7 +1169,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Used to create a forward declaration of a */
- /* FT_Renderer_Class stract instance. */
+ /* FT_Renderer_Class struct instance. */
/* */
/* <Macro> */
/* FT_DEFINE_RENDERER */
@@ -1091,22 +1177,23 @@ FT_BEGIN_HEADER
/* <Description> */
/* Used to initialize an instance of FT_Renderer_Class struct. */
/* */
- /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */
- /* to called with a pointer where the allocated stracture is returned.*/
- /* And when it is no longer needed a Destroy function needs */
- /* to be called to release that allocation. */
- /* fcinit.c (ft_create_default_module_classes) already contains */
+ /* When FT_CONFIG_OPTION_PIC is defined a `create' funtion will need */
+ /* to be called with a pointer where the allocated structure is */
+ /* returned. And when it is no longer needed a `destroy' function */
+ /* needs to be called to release that allocation. */
+ /* `fcinit.c' (ft_create_default_module_classes) already contains */
/* a mechanism to call these functions for the default modules */
- /* described in ftmodule.h */
+ /* described in `ftmodule.h'. */
/* */
- /* Notice that the created Create and Destroy functions call */
- /* pic_init and pic_free function to allow you to manually allocate */
- /* and initialize any additional global data, like module specific */
+ /* Notice that the created `create' and `destroy' functions call */
+ /* `pic_init' and `pic_free' to allow you to manually allocate and */
+ /* initialize any additional global data, like a module specific */
/* interface, and put them in the global pic container defined in */
- /* ftpic.h. if you don't need them just implement the functions as */
- /* empty to resolve the link error. Also the pic_init and pic_free */
- /* functions should be declared in pic.h, to be referred by renderer */
- /* definition calling FT_DEFINE_RENDERER() in following. */
+ /* `ftpic.h'. If you don't need them just implement the functions as */
+ /* empty to resolve the link error. Also the `pic_init' and */
+ /* `pic_free' functions should be declared in `pic.h', to be referred */
+ /* by the renderer definition calling `FT_DEFINE_RENDERER' in the */
+ /* following. */
/* */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
@@ -1114,99 +1201,130 @@ FT_BEGIN_HEADER
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DECLARE_RENDERER(class_) \
- FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
-
-#define FT_DEFINE_RENDERER(class_, \
- flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_, \
- glyph_format_, render_glyph_, transform_glyph_, \
- get_glyph_cbox_, set_mode_, raster_class_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Renderer_Class class_ = \
- { \
- FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \
- interface_,init_,done_,get_interface_) \
- glyph_format_, \
- \
- render_glyph_, \
- transform_glyph_, \
- get_glyph_cbox_, \
- set_mode_, \
- \
- raster_class_ \
+#define FT_DECLARE_RENDERER( class_ ) \
+ FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
+
+#define FT_DEFINE_RENDERER( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_, \
+ glyph_format_, \
+ render_glyph_, \
+ transform_glyph_, \
+ get_glyph_cbox_, \
+ set_mode_, \
+ raster_class_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_Renderer_Class class_ = \
+ { \
+ FT_DEFINE_ROOT_MODULE( flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ glyph_format_, \
+ \
+ render_glyph_, \
+ transform_glyph_, \
+ get_glyph_cbox_, \
+ set_mode_, \
+ \
+ raster_class_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DECLARE_RENDERER(class_) FT_DECLARE_MODULE(class_)
-
-#define FT_DEFINE_RENDERER(class_, \
- flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_, \
- glyph_format_, render_glyph_, transform_glyph_, \
- get_glyph_cbox_, set_mode_, raster_class_ ) \
- \
- void \
- FT_Destroy_Class_##class_( FT_Library library, \
- FT_Module_Class* clazz ) \
- { \
- FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \
- FT_Memory memory = library->memory; \
- class_##_pic_free( library ); \
- if ( rclazz ) \
- FT_FREE( rclazz ); \
- } \
- \
- FT_Error \
- FT_Create_Class_##class_( FT_Library library, \
- FT_Module_Class** output_class ) \
- { \
- FT_Renderer_Class* clazz; \
- FT_Error error; \
- FT_Memory memory = library->memory; \
- \
- if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \
- return error; \
- \
- error = class_##_pic_init( library ); \
- if(error) \
- { \
- FT_FREE( clazz ); \
- return error; \
- } \
- \
- FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \
- interface_,init_,done_,get_interface_) \
- \
- clazz->glyph_format = glyph_format_; \
- \
- clazz->render_glyph = render_glyph_; \
- clazz->transform_glyph = transform_glyph_; \
- clazz->get_glyph_cbox = get_glyph_cbox_; \
- clazz->set_mode = set_mode_; \
- \
- clazz->raster_class = raster_class_; \
- \
- *output_class = (FT_Module_Class*)clazz; \
- return FT_Err_Ok; \
+#define FT_DECLARE_RENDERER( class_ ) FT_DECLARE_MODULE( class_ )
+
+#define FT_DEFINE_RENDERER( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_, \
+ glyph_format_, \
+ render_glyph_, \
+ transform_glyph_, \
+ get_glyph_cbox_, \
+ set_mode_, \
+ raster_class_ ) \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_Module_Class* clazz ) \
+ { \
+ FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ class_ ## _pic_free( library ); \
+ if ( rclazz ) \
+ FT_FREE( rclazz ); \
+ } \
+ \
+ \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_Module_Class** output_class ) \
+ { \
+ FT_Renderer_Class* clazz = NULL; \
+ FT_Error error; \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
+ return error; \
+ \
+ error = class_ ## _pic_init( library ); \
+ if ( error ) \
+ { \
+ FT_FREE( clazz ); \
+ return error; \
+ } \
+ \
+ FT_DEFINE_ROOT_MODULE( flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ \
+ clazz->glyph_format = glyph_format_; \
+ \
+ clazz->render_glyph = render_glyph_; \
+ clazz->transform_glyph = transform_glyph_; \
+ clazz->get_glyph_cbox = get_glyph_cbox_; \
+ clazz->set_mode = set_mode_; \
+ \
+ clazz->raster_class = raster_class_; \
+ \
+ *output_class = (FT_Module_Class*)clazz; \
+ \
+ return FT_Err_Ok; \
}
-
-
#endif /* FT_CONFIG_OPTION_PIC */
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** PIC-Support Macros for ftmodapi.h ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
+
+ /* PIC support macros for ftmodapi.h **/
#ifdef FT_CONFIG_OPTION_PIC
@@ -1247,6 +1365,7 @@ FT_BEGIN_HEADER
#endif
+
/*************************************************************************/
/* */
/* <Macro> */
@@ -1254,30 +1373,31 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Used to create a forward declaration of a */
- /* FT_Module_Class stract instance. */
+ /* FT_Module_Class struct instance. */
/* */
/* <Macro> */
/* FT_DEFINE_MODULE */
/* */
/* <Description> */
- /* Used to initialize an instance of FT_Module_Class struct. */
+ /* Used to initialize an instance of an FT_Module_Class struct. */
/* */
- /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */
- /* to called with a pointer where the allocated stracture is returned.*/
- /* And when it is no longer needed a Destroy function needs */
- /* to be called to release that allocation. */
- /* fcinit.c (ft_create_default_module_classes) already contains */
+ /* When FT_CONFIG_OPTION_PIC is defined a `create' funtion needs to */
+ /* be called with a pointer where the allocated structure is */
+ /* returned. And when it is no longer needed a `destroy' function */
+ /* needs to be called to release that allocation. */
+ /* `fcinit.c' (ft_create_default_module_classes) already contains */
/* a mechanism to call these functions for the default modules */
- /* described in ftmodule.h */
+ /* described in `ftmodule.h'. */
/* */
- /* Notice that the created Create and Destroy functions call */
- /* pic_init and pic_free function to allow you to manually allocate */
- /* and initialize any additional global data, like module specific */
+ /* Notice that the created `create' and `destroy' functions call */
+ /* `pic_init' and `pic_free' to allow you to manually allocate and */
+ /* initialize any additional global data, like a module specific */
/* interface, and put them in the global pic container defined in */
- /* ftpic.h. if you don't need them just implement the functions as */
- /* empty to resolve the link error. Also the pic_init and pic_free */
- /* functions should be declared in pic.h, to be referred by module */
- /* definition calling FT_DEFINE_MODULE() in following. */
+ /* `ftpic.h'. If you don't need them just implement the functions as */
+ /* empty to resolve the link error. Also the `pic_init' and */
+ /* `pic_free' functions should be declared in `pic.h', to be referred */
+ /* by the module definition calling `FT_DEFINE_MODULE' in the */
+ /* following. */
/* */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro */
@@ -1287,119 +1407,159 @@ FT_BEGIN_HEADER
/* FT_DEFINE_ROOT_MODULE */
/* */
/* <Description> */
- /* Used to initialize an instance of FT_Module_Class struct inside */
- /* another stract that contains it or in a function that initializes */
- /* that containing stract */
+ /* Used to initialize an instance of an FT_Module_Class struct inside */
+ /* another struct that contains it or in a function that initializes */
+ /* that containing struct. */
/* */
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DECLARE_MODULE(class_) \
- FT_CALLBACK_TABLE \
- const FT_Module_Class class_; \
-
-#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_) \
- { \
- flags_, \
- size_, \
- \
- name_, \
- version_, \
- requires_, \
- \
- interface_, \
- \
- init_, \
- done_, \
- get_interface_, \
+#define FT_DECLARE_MODULE( class_ ) \
+ FT_CALLBACK_TABLE \
+ const FT_Module_Class class_;
+
+#define FT_DEFINE_ROOT_MODULE( \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ { \
+ flags_, \
+ size_, \
+ \
+ name_, \
+ version_, \
+ requires_, \
+ \
+ interface_, \
+ \
+ init_, \
+ done_, \
+ get_interface_, \
},
-#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Module_Class class_ = \
- { \
- flags_, \
- size_, \
- \
- name_, \
- version_, \
- requires_, \
- \
- interface_, \
- \
- init_, \
- done_, \
- get_interface_, \
+#define FT_DEFINE_MODULE( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_Module_Class class_ = \
+ { \
+ flags_, \
+ size_, \
+ \
+ name_, \
+ version_, \
+ requires_, \
+ \
+ interface_, \
+ \
+ init_, \
+ done_, \
+ get_interface_, \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DECLARE_MODULE(class_) \
- FT_Error FT_Create_Class_##class_( FT_Library library, \
- FT_Module_Class** output_class ); \
- void FT_Destroy_Class_##class_( FT_Library library, \
- FT_Module_Class* clazz );
-
-#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_) \
- clazz->root.module_flags = flags_; \
- clazz->root.module_size = size_; \
- clazz->root.module_name = name_; \
- clazz->root.module_version = version_; \
- clazz->root.module_requires = requires_; \
- \
- clazz->root.module_interface = interface_; \
- \
- clazz->root.module_init = init_; \
- clazz->root.module_done = done_; \
- clazz->root.get_interface = get_interface_;
-
-#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \
- interface_, init_, done_, get_interface_) \
- \
- void \
- FT_Destroy_Class_##class_( FT_Library library, \
- FT_Module_Class* clazz ) \
- { \
- FT_Memory memory = library->memory; \
- class_##_pic_free( library ); \
- if ( clazz ) \
- FT_FREE( clazz ); \
- } \
- \
- FT_Error \
- FT_Create_Class_##class_( FT_Library library, \
- FT_Module_Class** output_class ) \
- { \
- FT_Memory memory = library->memory; \
- FT_Module_Class* clazz; \
- FT_Error error; \
- \
- if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \
- return error; \
- error = class_##_pic_init( library ); \
- if(error) \
- { \
- FT_FREE( clazz ); \
- return error; \
- } \
- \
- clazz->module_flags = flags_; \
- clazz->module_size = size_; \
- clazz->module_name = name_; \
- clazz->module_version = version_; \
- clazz->module_requires = requires_; \
- \
- clazz->module_interface = interface_; \
- \
- clazz->module_init = init_; \
- clazz->module_done = done_; \
- clazz->get_interface = get_interface_; \
- \
- *output_class = clazz; \
- return FT_Err_Ok; \
+#define FT_DECLARE_MODULE( class_ ) \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_Module_Class** output_class ); \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_Module_Class* clazz );
+
+#define FT_DEFINE_ROOT_MODULE( \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ clazz->root.module_flags = flags_; \
+ clazz->root.module_size = size_; \
+ clazz->root.module_name = name_; \
+ clazz->root.module_version = version_; \
+ clazz->root.module_requires = requires_; \
+ \
+ clazz->root.module_interface = interface_; \
+ \
+ clazz->root.module_init = init_; \
+ clazz->root.module_done = done_; \
+ clazz->root.get_interface = get_interface_;
+
+#define FT_DEFINE_MODULE( \
+ class_, \
+ flags_, \
+ size_, \
+ name_, \
+ version_, \
+ requires_, \
+ interface_, \
+ init_, \
+ done_, \
+ get_interface_ ) \
+ void \
+ FT_Destroy_Class_ ## class_( FT_Library library, \
+ FT_Module_Class* clazz ) \
+ { \
+ FT_Memory memory = library->memory; \
+ \
+ \
+ class_ ## _pic_free( library ); \
+ if ( clazz ) \
+ FT_FREE( clazz ); \
+ } \
+ \
+ \
+ FT_Error \
+ FT_Create_Class_ ## class_( FT_Library library, \
+ FT_Module_Class** output_class ) \
+ { \
+ FT_Memory memory = library->memory; \
+ FT_Module_Class* clazz = NULL; \
+ FT_Error error; \
+ \
+ \
+ if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
+ return error; \
+ error = class_ ## _pic_init( library ); \
+ if ( error ) \
+ { \
+ FT_FREE( clazz ); \
+ return error; \
+ } \
+ \
+ clazz->module_flags = flags_; \
+ clazz->module_size = size_; \
+ clazz->module_name = name_; \
+ clazz->module_version = version_; \
+ clazz->module_requires = requires_; \
+ \
+ clazz->module_interface = interface_; \
+ \
+ clazz->module_init = init_; \
+ clazz->module_done = done_; \
+ clazz->get_interface = get_interface_; \
+ \
+ *output_class = clazz; \
+ \
+ return FT_Err_Ok; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/freetype/include/freetype/internal/ftpic.h b/freetype/include/freetype/internal/ftpic.h
index 5b674e6a5..485ce7a24 100644
--- a/freetype/include/freetype/internal/ftpic.h
+++ b/freetype/include/freetype/internal/ftpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services (declaration). */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2012 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,29 +31,33 @@ FT_BEGIN_HEADER
#ifdef FT_CONFIG_OPTION_PIC
- typedef struct FT_PIC_Container_
+ typedef struct FT_PIC_Container_
{
/* pic containers for base */
- void* base;
+ void* base;
+
/* pic containers for modules */
- void* autofit;
- void* cff;
- void* pshinter;
- void* psnames;
- void* raster;
- void* sfnt;
- void* smooth;
- void* truetype;
+ void* autofit;
+ void* cff;
+ void* pshinter;
+ void* psnames;
+ void* raster;
+ void* sfnt;
+ void* smooth;
+ void* truetype;
+
} FT_PIC_Container;
- /* Initialize the various function tables, structs, etc. stored in the container. */
+
+ /* Initialize the various function tables, structs, etc. */
+ /* stored in the container. */
FT_BASE( FT_Error )
- ft_pic_container_init( FT_Library library );
+ ft_pic_container_init( FT_Library library );
/* Destroy the contents of the container. */
FT_BASE( void )
- ft_pic_container_destroy( FT_Library library );
+ ft_pic_container_destroy( FT_Library library );
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/freetype/include/freetype/internal/ftrfork.h b/freetype/include/freetype/internal/ftrfork.h
index 677944f98..136163c7c 100644
--- a/freetype/include/freetype/internal/ftrfork.h
+++ b/freetype/include/freetype/internal/ftrfork.h
@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (specification). */
/* */
-/* Copyright 2004, 2006, 2007 by */
+/* Copyright 2004, 2006, 2007, 2012 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -80,26 +80,37 @@ FT_BEGIN_HEADER
} ft_raccess_guess_rec;
#ifndef FT_CONFIG_OPTION_PIC
+
/* this array is a storage in non-PIC mode, so ; is needed in END */
-#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
- const type name[] = {
-#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
- { raccess_guess_##func_suffix, FT_RFork_Rule_##type_suffix },
-#define CONST_FT_RFORK_RULE_ARRAY_END };
+#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
+ const type name[] = {
+#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
+ { raccess_guess_ ## func_suffix, \
+ FT_RFork_Rule_ ## type_suffix },
+#define CONST_FT_RFORK_RULE_ARRAY_END };
+
#else /* FT_CONFIG_OPTION_PIC */
+
/* this array is a function in PIC mode, so no ; is needed in END */
-#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
- void FT_Init_##name ( type* storage ) { \
- type *local = storage; \
- int i = 0;
-#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
- local[i].func = raccess_guess_##func_suffix; \
- local[i].type = FT_RFork_Rule_##type_suffix; \
- i++;
-#define CONST_FT_RFORK_RULE_ARRAY_END }
+#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
+ void \
+ FT_Init_ ## name( type* storage ) \
+ { \
+ type* local = storage; \
+ \
+ \
+ int i = 0;
+#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
+ local[i].func = raccess_guess_ ## func_suffix; \
+ local[i].type = FT_RFork_Rule_ ## type_suffix; \
+ i++;
+#define CONST_FT_RFORK_RULE_ARRAY_END }
+
#endif /* FT_CONFIG_OPTION_PIC */
+
#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
+
/*************************************************************************/
/* */
/* <Function> */
diff --git a/freetype/include/freetype/internal/ftserv.h b/freetype/include/freetype/internal/ftserv.h
index 4f481db02..1d4ded54f 100644
--- a/freetype/include/freetype/internal/ftserv.h
+++ b/freetype/include/freetype/internal/ftserv.h
@@ -92,6 +92,7 @@ FT_BEGIN_HEADER
#endif /* !C++ */
+
/*
* @macro:
* FT_FACE_FIND_GLOBAL_SERVICE
@@ -167,7 +168,12 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Macro> */
- /* FT_DEFINE_SERVICEDESCREC1 .. FT_DEFINE_SERVICEDESCREC6 */
+ /* FT_DEFINE_SERVICEDESCREC1 */
+ /* FT_DEFINE_SERVICEDESCREC2 */
+ /* FT_DEFINE_SERVICEDESCREC3 */
+ /* FT_DEFINE_SERVICEDESCREC4 */
+ /* FT_DEFINE_SERVICEDESCREC5 */
+ /* FT_DEFINE_SERVICEDESCREC6 */
/* */
/* <Description> */
/* Used to initialize an array of FT_ServiceDescRec structures. */
@@ -283,7 +289,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -319,7 +325,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -358,7 +364,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -400,7 +406,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -445,7 +451,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -493,7 +499,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -573,7 +579,7 @@ FT_BEGIN_HEADER
/*
* A magic number used within the services cache.
*/
-#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)-2) /* magic number */
+#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)~1) /* magic number */
/*
@@ -671,6 +677,7 @@ FT_BEGIN_HEADER
#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
+#define FT_SERVICE_PROPERTIES_H <freetype/internal/services/svprop.h>
#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h>
#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
diff --git a/freetype/include/freetype/internal/fttrace.h b/freetype/include/freetype/internal/fttrace.h
index fbefdbdf4..6e6cb49fa 100644
--- a/freetype/include/freetype/internal/fttrace.h
+++ b/freetype/include/freetype/internal/fttrace.h
@@ -4,7 +4,7 @@
/* */
/* Tracing handling (specification only). */
/* */
-/* Copyright 2002, 2004-2007, 2009, 2011 by */
+/* Copyright 2002, 2004-2007, 2009, 2011-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -73,6 +73,7 @@ FT_TRACE_DEF( t1parse )
/* PostScript helper module `psaux' */
FT_TRACE_DEF( t1decode )
FT_TRACE_DEF( psobjs )
+FT_TRACE_DEF( psconv )
/* PostScript hinting module `pshinter' */
FT_TRACE_DEF( pshrec )
@@ -136,6 +137,8 @@ FT_TRACE_DEF( gxvprop )
FT_TRACE_DEF( gxvlcar )
/* autofit components */
+FT_TRACE_DEF( afmodule )
+FT_TRACE_DEF( afhints )
FT_TRACE_DEF( afcjk )
FT_TRACE_DEF( aflatin )
FT_TRACE_DEF( aflatin2 )
diff --git a/freetype/include/freetype/internal/pshints.h b/freetype/include/freetype/internal/pshints.h
index c53e285bf..4e9294f90 100644
--- a/freetype/include/freetype/internal/pshints.h
+++ b/freetype/include/freetype/internal/pshints.h
@@ -6,7 +6,7 @@
/* recorders (specification only). These are used to support native */
/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */
/* */
-/* Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2009 by */
+/* Copyright 2001-2003, 2005-2007, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -679,27 +679,37 @@ FT_BEGIN_HEADER
typedef PSHinter_Interface* PSHinter_Service;
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \
- get_t1_funcs_, get_t2_funcs_) \
- static const PSHinter_Interface class_ = \
- { \
- get_globals_funcs_, get_t1_funcs_, get_t2_funcs_ \
+#define FT_DEFINE_PSHINTER_INTERFACE( \
+ class_, \
+ get_globals_funcs_, \
+ get_t1_funcs_, \
+ get_t2_funcs_ ) \
+ static const PSHinter_Interface class_ = \
+ { \
+ get_globals_funcs_, \
+ get_t1_funcs_, \
+ get_t2_funcs_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \
- get_t1_funcs_, get_t2_funcs_) \
- void \
- FT_Init_Class_##class_( FT_Library library, \
- PSHinter_Interface* clazz) \
- { \
- FT_UNUSED(library); \
- clazz->get_globals_funcs = get_globals_funcs_; \
- clazz->get_t1_funcs = get_t1_funcs_; \
- clazz->get_t2_funcs = get_t2_funcs_; \
+#define FT_DEFINE_PSHINTER_INTERFACE( \
+ class_, \
+ get_globals_funcs_, \
+ get_t1_funcs_, \
+ get_t2_funcs_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ PSHinter_Interface* clazz ) \
+ { \
+ FT_UNUSED( library ); \
+ \
+ clazz->get_globals_funcs = get_globals_funcs_; \
+ clazz->get_t1_funcs = get_t1_funcs_; \
+ clazz->get_t2_funcs = get_t2_funcs_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/freetype/include/freetype/internal/services/svprop.h b/freetype/include/freetype/internal/services/svprop.h
new file mode 100644
index 000000000..22da0bbc6
--- /dev/null
+++ b/freetype/include/freetype/internal/services/svprop.h
@@ -0,0 +1,81 @@
+/***************************************************************************/
+/* */
+/* svprop.h */
+/* */
+/* The FreeType property service (specification). */
+/* */
+/* Copyright 2012 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVPROP_H__
+#define __SVPROP_H__
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_PROPERTIES "properties"
+
+
+ typedef FT_Error
+ (*FT_Properties_SetFunc)( FT_Module module,
+ const char* property_name,
+ const void* value );
+
+ typedef FT_Error
+ (*FT_Properties_GetFunc)( FT_Module module,
+ const char* property_name,
+ void* value );
+
+
+ FT_DEFINE_SERVICE( Properties )
+ {
+ FT_Properties_SetFunc set_property;
+ FT_Properties_GetFunc get_property;
+ };
+
+
+#ifndef FT_CONFIG_OPTION_PIC
+
+#define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \
+ set_property_, \
+ get_property_ ) \
+ static const FT_Service_PropertiesRec class_ = \
+ { \
+ set_property_, \
+ get_property_ \
+ };
+
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \
+ set_property_, \
+ get_property_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Service_PropertiesRec* clazz ) \
+ { \
+ clazz->set_property = set_property_; \
+ clazz->get_property = get_property_; \
+ }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVPROP_H__ */
+
+
+/* END */
diff --git a/freetype/include/freetype/internal/sfnt.h b/freetype/include/freetype/internal/sfnt.h
index 9c326cc98..c593ed73c 100644
--- a/freetype/include/freetype/internal/sfnt.h
+++ b/freetype/include/freetype/internal/sfnt.h
@@ -4,7 +4,7 @@
/* */
/* High-level `sfnt' driver interface (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 1996-2006, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -756,135 +756,212 @@ FT_BEGIN_HEADER
#ifndef FT_CONFIG_OPTION_PIC
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) \
- a,
+#define FT_DEFINE_DRIVERS_OLD_INTERNAL( a ) \
+ a,
#else
- #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a)
+#define FT_DEFINE_DRIVERS_OLD_INTERNAL( a ) /* empty */
#endif
-#define FT_INTERNAL(a) \
- a,
-
-#define FT_DEFINE_SFNT_INTERFACE(class_, \
- goto_table_, init_face_, load_face_, done_face_, get_interface_, \
- load_any_, load_sfnt_header_, load_directory_, load_head_, \
- load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \
- load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \
- load_kern_, load_gasp_, load_pclt_, load_bhed_, \
- set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \
- load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \
- get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \
- get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \
- set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \
- static const SFNT_Interface class_ = \
- { \
- FT_INTERNAL(goto_table_) \
- FT_INTERNAL(init_face_) \
- FT_INTERNAL(load_face_) \
- FT_INTERNAL(done_face_) \
- FT_INTERNAL(get_interface_) \
- FT_INTERNAL(load_any_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory_) \
- FT_INTERNAL(load_head_) \
- FT_INTERNAL(load_hhea_) \
- FT_INTERNAL(load_cmap_) \
- FT_INTERNAL(load_maxp_) \
- FT_INTERNAL(load_os2_) \
- FT_INTERNAL(load_post_) \
- FT_INTERNAL(load_name_) \
- FT_INTERNAL(free_name_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub_) \
- FT_INTERNAL(load_kern_) \
- FT_INTERNAL(load_gasp_) \
- FT_INTERNAL(load_pclt_) \
- FT_INTERNAL(load_bhed_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics_) \
- FT_INTERNAL(load_sbit_image_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub_) \
- FT_INTERNAL(get_psname_) \
- FT_INTERNAL(free_psnames_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub_) \
- FT_INTERNAL(get_kerning_) \
- FT_INTERNAL(load_font_dir_) \
- FT_INTERNAL(load_hmtx_) \
- FT_INTERNAL(load_eblc_) \
- FT_INTERNAL(free_eblc_) \
- FT_INTERNAL(set_sbit_strike_) \
- FT_INTERNAL(load_strike_metrics_) \
- FT_INTERNAL(get_metrics_) \
+
+#define FT_INTERNAL( a ) \
+ a,
+
+#define FT_DEFINE_SFNT_INTERFACE( \
+ class_, \
+ goto_table_, \
+ init_face_, \
+ load_face_, \
+ done_face_, \
+ get_interface_, \
+ load_any_, \
+ load_sfnt_header_, \
+ load_directory_, \
+ load_head_, \
+ load_hhea_, \
+ load_cmap_, \
+ load_maxp_, \
+ load_os2_, \
+ load_post_, \
+ load_name_, \
+ free_name_, \
+ load_hdmx_stub_, \
+ free_hdmx_stub_, \
+ load_kern_, \
+ load_gasp_, \
+ load_pclt_, \
+ load_bhed_, \
+ set_sbit_strike_stub_, \
+ load_sbits_stub_, \
+ find_sbit_image_, \
+ load_sbit_metrics_, \
+ load_sbit_image_, \
+ free_sbits_stub_, \
+ get_psname_, \
+ free_psnames_, \
+ load_charmap_stub_, \
+ free_charmap_stub_, \
+ get_kerning_, \
+ load_font_dir_, \
+ load_hmtx_, \
+ load_eblc_, \
+ free_eblc_, \
+ set_sbit_strike_, \
+ load_strike_metrics_, \
+ get_metrics_ ) \
+ static const SFNT_Interface class_ = \
+ { \
+ FT_INTERNAL( goto_table_ ) \
+ FT_INTERNAL( init_face_ ) \
+ FT_INTERNAL( load_face_ ) \
+ FT_INTERNAL( done_face_ ) \
+ FT_INTERNAL( get_interface_ ) \
+ FT_INTERNAL( load_any_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_sfnt_header_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_directory_ ) \
+ FT_INTERNAL( load_head_ ) \
+ FT_INTERNAL( load_hhea_ ) \
+ FT_INTERNAL( load_cmap_ ) \
+ FT_INTERNAL( load_maxp_ ) \
+ FT_INTERNAL( load_os2_ ) \
+ FT_INTERNAL( load_post_ ) \
+ FT_INTERNAL( load_name_ ) \
+ FT_INTERNAL( free_name_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_hdmx_stub_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( free_hdmx_stub_ ) \
+ FT_INTERNAL( load_kern_ ) \
+ FT_INTERNAL( load_gasp_ ) \
+ FT_INTERNAL( load_pclt_ ) \
+ FT_INTERNAL( load_bhed_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( set_sbit_strike_stub_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_sbits_stub_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( find_sbit_image_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_sbit_metrics_ ) \
+ FT_INTERNAL( load_sbit_image_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( free_sbits_stub_ ) \
+ FT_INTERNAL( get_psname_ ) \
+ FT_INTERNAL( free_psnames_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_charmap_stub_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( free_charmap_stub_ ) \
+ FT_INTERNAL( get_kerning_ ) \
+ FT_INTERNAL( load_font_dir_ ) \
+ FT_INTERNAL( load_hmtx_ ) \
+ FT_INTERNAL( load_eblc_ ) \
+ FT_INTERNAL( free_eblc_ ) \
+ FT_INTERNAL( set_sbit_strike_ ) \
+ FT_INTERNAL( load_strike_metrics_ ) \
+ FT_INTERNAL( get_metrics_ ) \
};
#else /* FT_CONFIG_OPTION_PIC */
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
-#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) \
- clazz->a = a_;
+#define FT_DEFINE_DRIVERS_OLD_INTERNAL( a, a_ ) \
+ clazz->a = a_;
#else
- #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_)
+#define FT_DEFINE_DRIVERS_OLD_INTERNAL( a, a_ ) /* empty */
#endif
-#define FT_INTERNAL(a, a_) \
- clazz->a = a_;
-
-#define FT_DEFINE_SFNT_INTERFACE(class_, \
- goto_table_, init_face_, load_face_, done_face_, get_interface_, \
- load_any_, load_sfnt_header_, load_directory_, load_head_, \
- load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \
- load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \
- load_kern_, load_gasp_, load_pclt_, load_bhed_, \
- set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \
- load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \
- get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \
- get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \
- set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \
- void \
- FT_Init_Class_##class_( FT_Library library, SFNT_Interface* clazz ) \
- { \
- FT_UNUSED(library); \
- FT_INTERNAL(goto_table,goto_table_) \
- FT_INTERNAL(init_face,init_face_) \
- FT_INTERNAL(load_face,load_face_) \
- FT_INTERNAL(done_face,done_face_) \
- FT_INTERNAL(get_interface,get_interface_) \
- FT_INTERNAL(load_any,load_any_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header,load_sfnt_header_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory,load_directory_) \
- FT_INTERNAL(load_head,load_head_) \
- FT_INTERNAL(load_hhea,load_hhea_) \
- FT_INTERNAL(load_cmap,load_cmap_) \
- FT_INTERNAL(load_maxp,load_maxp_) \
- FT_INTERNAL(load_os2,load_os2_) \
- FT_INTERNAL(load_post,load_post_) \
- FT_INTERNAL(load_name,load_name_) \
- FT_INTERNAL(free_name,free_name_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub,load_hdmx_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub,free_hdmx_stub_) \
- FT_INTERNAL(load_kern,load_kern_) \
- FT_INTERNAL(load_gasp,load_gasp_) \
- FT_INTERNAL(load_pclt,load_pclt_) \
- FT_INTERNAL(load_bhed,load_bhed_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub,set_sbit_strike_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub,load_sbits_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image,find_sbit_image_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics,load_sbit_metrics_) \
- FT_INTERNAL(load_sbit_image,load_sbit_image_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub,free_sbits_stub_) \
- FT_INTERNAL(get_psname,get_psname_) \
- FT_INTERNAL(free_psnames,free_psnames_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub,load_charmap_stub_) \
- FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub,free_charmap_stub_) \
- FT_INTERNAL(get_kerning,get_kerning_) \
- FT_INTERNAL(load_font_dir,load_font_dir_) \
- FT_INTERNAL(load_hmtx,load_hmtx_) \
- FT_INTERNAL(load_eblc,load_eblc_) \
- FT_INTERNAL(free_eblc,free_eblc_) \
- FT_INTERNAL(set_sbit_strike,set_sbit_strike_) \
- FT_INTERNAL(load_strike_metrics,load_strike_metrics_) \
- FT_INTERNAL(get_metrics,get_metrics_) \
+
+#define FT_INTERNAL( a, a_ ) \
+ clazz->a = a_;
+
+#define FT_DEFINE_SFNT_INTERFACE( \
+ class_, \
+ goto_table_, \
+ init_face_, \
+ load_face_, \
+ done_face_, \
+ get_interface_, \
+ load_any_, \
+ load_sfnt_header_, \
+ load_directory_, \
+ load_head_, \
+ load_hhea_, \
+ load_cmap_, \
+ load_maxp_, \
+ load_os2_, \
+ load_post_, \
+ load_name_, \
+ free_name_, \
+ load_hdmx_stub_, \
+ free_hdmx_stub_, \
+ load_kern_, \
+ load_gasp_, \
+ load_pclt_, \
+ load_bhed_, \
+ set_sbit_strike_stub_, \
+ load_sbits_stub_, \
+ find_sbit_image_, \
+ load_sbit_metrics_, \
+ load_sbit_image_, \
+ free_sbits_stub_, \
+ get_psname_, \
+ free_psnames_, \
+ load_charmap_stub_, \
+ free_charmap_stub_, \
+ get_kerning_, \
+ load_font_dir_, \
+ load_hmtx_, \
+ load_eblc_, \
+ free_eblc_, \
+ set_sbit_strike_, \
+ load_strike_metrics_, \
+ get_metrics_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ SFNT_Interface* clazz ) \
+ { \
+ FT_UNUSED( library ); \
+ \
+ FT_INTERNAL( goto_table, goto_table_ ) \
+ FT_INTERNAL( init_face, init_face_ ) \
+ FT_INTERNAL( load_face, load_face_ ) \
+ FT_INTERNAL( done_face, done_face_ ) \
+ FT_INTERNAL( get_interface, get_interface_ ) \
+ FT_INTERNAL( load_any, load_any_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_sfnt_header, \
+ load_sfnt_header_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_directory, \
+ load_directory_ ) \
+ FT_INTERNAL( load_head, load_head_ ) \
+ FT_INTERNAL( load_hhea, load_hhea_ ) \
+ FT_INTERNAL( load_cmap, load_cmap_ ) \
+ FT_INTERNAL( load_maxp, load_maxp_ ) \
+ FT_INTERNAL( load_os2, load_os2_ ) \
+ FT_INTERNAL( load_post, load_post_ ) \
+ FT_INTERNAL( load_name, load_name_ ) \
+ FT_INTERNAL( free_name, free_name_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_hdmx_stub, \
+ load_hdmx_stub_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( free_hdmx_stub, \
+ free_hdmx_stub_ ) \
+ FT_INTERNAL( load_kern, load_kern_ ) \
+ FT_INTERNAL( load_gasp, load_gasp_ ) \
+ FT_INTERNAL( load_pclt, load_pclt_ ) \
+ FT_INTERNAL( load_bhed, load_bhed_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( set_sbit_strike_stub, \
+ set_sbit_strike_stub_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_sbits_stub, \
+ load_sbits_stub_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( find_sbit_image, \
+ find_sbit_image_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_sbit_metrics, \
+ load_sbit_metrics_ ) \
+ FT_INTERNAL( load_sbit_image, load_sbit_image_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( free_sbits_stub, \
+ free_sbits_stub_ ) \
+ FT_INTERNAL( get_psname, get_psname_ ) \
+ FT_INTERNAL( free_psnames, free_psnames_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( load_charmap_stub, \
+ load_charmap_stub_ ) \
+ FT_DEFINE_DRIVERS_OLD_INTERNAL( free_charmap_stub, \
+ free_charmap_stub_ ) \
+ FT_INTERNAL( get_kerning, get_kerning_ ) \
+ FT_INTERNAL( load_font_dir, load_font_dir_ ) \
+ FT_INTERNAL( load_hmtx, load_hmtx_ ) \
+ FT_INTERNAL( load_eblc, load_eblc_ ) \
+ FT_INTERNAL( free_eblc, free_eblc_ ) \
+ FT_INTERNAL( set_sbit_strike, set_sbit_strike_ ) \
+ FT_INTERNAL( load_strike_metrics, load_strike_metrics_ ) \
+ FT_INTERNAL( get_metrics, get_metrics_ ) \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/freetype/include/freetype/ttnameid.h b/freetype/include/freetype/ttnameid.h
index 66aef0432..173f88c95 100644
--- a/freetype/include/freetype/ttnameid.h
+++ b/freetype/include/freetype/ttnameid.h
@@ -4,7 +4,7 @@
/* */
/* TrueType name ID definitions (specification only). */
/* */
-/* Copyright 1996-2002, 2003, 2004, 2006, 2007, 2008 by */
+/* Copyright 1996-2004, 2006-2008, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -316,11 +316,12 @@ FT_BEGIN_HEADER
/* */
/* Possible values of the language identifier field in the name records */
/* of the TTF `name' table if the `platform' identifier code is */
- /* TT_PLATFORM_MACINTOSH. */
+ /* TT_PLATFORM_MACINTOSH. These values are also used as return values */
+ /* for function @FT_Get_CMap_Language_ID. */
/* */
/* The canonical source for the Apple assigned Language ID's is at */
/* */
- /* http://fonts.apple.com/TTRefMan/RM06/Chap6name.html */
+ /* https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html */
/* */
#define TT_MAC_LANGID_ENGLISH 0
#define TT_MAC_LANGID_FRENCH 1
@@ -461,21 +462,10 @@ FT_BEGIN_HEADER
/* of the TTF `name' table if the `platform' identifier code is */
/* TT_PLATFORM_MICROSOFT. */
/* */
- /* The canonical source for the MS assigned LCID's (seems to) be at */
+ /* The canonical source for the MS assigned LCIDs is */
/* */
/* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */
/* */
- /* It used to be at various places, among them */
- /* */
- /* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */
- /* http://www.microsoft.com/globaldev/reference/loclanghome.asp */
- /* http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP */
- /* http://msdn.microsoft.com/library/en-us/passport25/ */
- /* NET_Passport_VBScript_Documentation/Single_Sign_In/ */
- /* Advanced_Single_Sign_In/Localization_and_LCIDs.asp */
- /* */
- /* Hopefully, it seems now that the Globaldev site prevails... */
- /* (updated by Antoine, 2004-02-17) */
#define TT_MS_LANGID_ARABIC_GENERAL 0x0001
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401
diff --git a/freetype/include/freetype/tttables.h b/freetype/include/freetype/tttables.h
index f10becf1b..4dcfec661 100644
--- a/freetype/include/freetype/tttables.h
+++ b/freetype/include/freetype/tttables.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType tables definitions and interface */
/* (specification only). */
/* */
-/* Copyright 1996-2005, 2008-2011 by */
+/* Copyright 1996-2005, 2008-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -600,6 +600,16 @@ FT_BEGIN_HEADER
/* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */
/* a list. */
/* */
+ /* Here an example how to access the `vhea' table: */
+ /* */
+ /* { */
+ /* TT_VertHeader* vert_header; */
+ /* */
+ /* */
+ /* vert_header = */
+ /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, ft_sfnt_vhea ); */
+ /* } */
+ /* */
FT_EXPORT( void* )
FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag );
@@ -730,6 +740,9 @@ FT_BEGIN_HEADER
/* The language ID of `charmap'. If `charmap' doesn't belong to a */
/* TrueType/sfnt face, just return~0 as the default value. */
/* */
+ /* For a format~14 cmap (to access Unicode IVS), the return value is */
+ /* 0xFFFFFFFF. */
+ /* */
FT_EXPORT( FT_ULong )
FT_Get_CMap_Language_ID( FT_CharMap charmap );