ref: b08fe2dc7af972a61f4e6bcadd7bb522861faec5
parent: 51b6699a35ae3204ffadf0e53fbfb73c486050f4
author: David Turner <[email protected]>
date: Tue Aug 27 16:20:29 EDT 2002
* massive re-formatting changes to many, many source files. I don't want to list them all here. The operations performed were all logical transformations of the sources: - trying to convert all enums and constants to CAPITALIZED_STYLE, with #define definitions like #define my_old_constants MY_NEW_CONSTANT - big, big update of the documentation comments * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c, include/freetype/ftimage.h: adding support for LCD-optimized rendering though the new constants/enums: FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V this is still work in progress, don't expect everything to work correctly though most of the features have been implemented. * adding new FT_LOAD_XXX flags, used to specify both hinting and rendering targets: FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering FT_LOAD_TARGET_MONO :: monochrome bitmaps FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering note that FT_LOAD_TARGET_NORMAL is 0, which means that the default behaviour of the font engine is _unchanged_.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2002-08-27 David Turner <[email protected]>
+
+ * massive re-formatting changes to many, many source files. I don't
+ want to list them all here. The operations performed were all logical
+ transformations of the sources:
+
+ - trying to convert all enums and constants to CAPITALIZED_STYLE, with
+ #define definitions like
+
+ #define my_old_constants MY_NEW_CONSTANT
+
+ - big, big update of the documentation comments
+
+ * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
+ include/freetype/ftimage.h: adding support for LCD-optimized rendering
+ though the new constants/enums:
+
+ FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
+ FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
+
+ this is still work in progress, don't expect everything to work correctly
+ though most of the features have been implemented.
+
+ * adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
+ targets:
+
+ FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
+ FT_LOAD_TARGET_MONO :: monochrome bitmaps
+ FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
+ FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
+
+ note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
+ behaviour of the font engine is _unchanged_.
+
+
2002-08-27 Werner Lemberg <[email protected]>
* docs/VERSION.DLL: New file.
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -407,12 +407,14 @@
/* */
/* to get a simple enumeration without assigning special numbers. */
/* */
+
#ifndef FT_ENC_TAG
-#define FT_ENC_TAG( value, _x1, _x2, _x3, _x4 ) \
- value = ( ( (unsigned long)_x1 << 24 ) | \
- ( (unsigned long)_x2 << 16 ) | \
- ( (unsigned long)_x3 << 8 ) | \
- (unsigned long)_x4 )
+#define FT_ENC_TAG(value,a,b,c,d) \
+ value = ( ( (FT_UInt32)(a) << 24 ) | \
+ ( (FT_UInt32)(b) << 16 ) | \
+ ( (FT_UInt32)(c) << 8 ) | \
+ (FT_UInt32)(d) )
+
#endif /* FT_ENC_TAG */
@@ -429,31 +431,157 @@
/* Because of 32-bit charcodes defined in Unicode (i.e., surrogates), */
/* all character codes must be expressed as FT_Longs. */
/* */
+ /* The values of this type correspond to specific character */
+ /* repertories (i.e. charsets), and not to text encoding methods */
+ /* (like UTF-8, UTF-16, GB2312_EUC, etc...) */
+ /* */
/* Other encodings might be defined in the future. */
/* */
+ /* <Values> */
+ /* FT_ENCODING_NONE :: */
+ /* the encoding value 0 is reserved. */
+ /* */
+ /* FT_ENCODING_UNICODE :: */
+ /* corresponds to the Unicode character set. This value covers */
+ /* all versions of the Unicode repertoire, including ASCII and */
+ /* Latin-1. Most fonts include a Unicode charmap, but not all */
+ /* of them. */
+ /* */
+ /* FT_ENCODING_MS_SYMBOL :: */
+ /* corresponds to the Microsoft Symbol encoding, used to encode */
+ /* mathematical symbols in the 32..255 character code range. For */
+ /* more information, see http://www.ceviz.net/symbol.htm */
+ /* */
+ /* FT_ENCODING_MS_SJIS :: */
+ /* corresponds to Microsoft's Japanese SJIS encoding. More info */
+ /* at http://langsupport.japanreference.com/encoding.shtml. */
+ /* see note on multi-byte encodings below. */
+ /* */
+ /* FT_ENCODING_MS_GB2312 :: */
+ /* corresponds to the encoding system for Simplified Chinese, as */
+ /* used in China. Only found in some TrueType fonts */
+ /* */
+ /* */
+ /* FT_ENCODING_MS_BIG5 :: */
+ /* corresponds to the encoding system for Simplified Chinese, as */
+ /* used in Taiwan and Hong Kong. Only found in some TrueType fonts */
+ /* */
+ /* FT_ENCODING_MS_WANSUNG :: */
+ /* corresponds to the Korean encoding system known as Wansung. */
+ /* This is a Microsoft encoding that is only found in some TrueType */
+ /* fonts. For more information, see */
+ /* http://www.microsoft.com/typography/unicode/949.txt */
+ /* */
+ /* FT_ENCODING_MS_JOHAB :: */
+ /* The Korean standard character set (KS C-5601-1992), which */
+ /* corresponds to Windows code page 1361. This character set */
+ /* includes all possible Hangeul character combinations. */
+ /* only found on some rare TrueType fonts. */
+ /* */
+ /* FT_ENCODING_ADOBE_LATIN_1 :: */
+ /* corresponds to a Latin-1 encoding as defined in a Type 1 */
+ /* Postscript font. It is limited to no more than 256 character */
+ /* codes. */
+ /* */
+ /* FT_ENCODING_ADOBE_STANDARD :: */
+ /* corresponds to the Adobe Standard encoding, as found in Type 1, */
+ /* CFF and OpenType/CFF fonts. It is limited to no more than 256 */
+ /* character codes. */
+ /* */
+ /* FT_ENCODING_ADOBE_EXPERT :: */
+ /* corresponds to the Adobe Expert encoding, as found in Type 1, */
+ /* CFF and OpenType/CFF fonts. It is limited to no more than 256 */
+ /* character codes */
+ /* */
+ /* FT_ENCODING_ADOBE_CUSTOM :: */
+ /* corresponds to a custom encoding, as found in Type 1, CFF and */
+ /* OpenType/CFF fonts. It is limited to no more than 256 character */
+ /* codes */
+ /* */
+ /* FT_ENCODING_APPLE_ROMAN :: */
+ /* corresponds to the 8-bit Apple roman encoding. Many TrueType and */
+ /* OpenType fonts contain a charmap for this encoding, since it */
+ /* older versions of Mac OS are able to use it. */
+ /* */
+ /* FT_ENCODING_OLD_LATIN_2 :: */
+ /* this value is deprecated and was never used nor reported by */
+ /* FreeType. Don't use or test for it. */
+ /* */
+ /* <Note> */
+ /* By default, FreeType automatically synthetizes a Unicode charmap */
+ /* for Postscript fonts, using their glyph names dictionaries. */
+ /* However, it will also report the encodings defined explicitely */
+ /* in the font file, for the cases when they're needed, with the */
+ /* Adobe values as well */
+ /* */
+
typedef enum FT_Encoding_
{
- FT_ENC_TAG( ft_encoding_none, 0, 0, 0, 0 ),
+ FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
- FT_ENC_TAG( ft_encoding_symbol, 's', 'y', 'm', 'b' ),
- FT_ENC_TAG( ft_encoding_unicode, 'u', 'n', 'i', 'c' ),
- FT_ENC_TAG( ft_encoding_latin_1, 'l', 'a', 't', '1' ),
- FT_ENC_TAG( ft_encoding_latin_2, 'l', 'a', 't', '2' ),
- FT_ENC_TAG( ft_encoding_sjis, 's', 'j', 'i', 's' ),
- FT_ENC_TAG( ft_encoding_gb2312, 'g', 'b', ' ', ' ' ),
- FT_ENC_TAG( ft_encoding_big5, 'b', 'i', 'g', '5' ),
- FT_ENC_TAG( ft_encoding_wansung, 'w', 'a', 'n', 's' ),
- FT_ENC_TAG( ft_encoding_johab, 'j', 'o', 'h', 'a' ),
+ FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
+ FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ),
- FT_ENC_TAG( ft_encoding_adobe_standard, 'A', 'D', 'O', 'B' ),
- FT_ENC_TAG( ft_encoding_adobe_expert, 'A', 'D', 'B', 'E' ),
- FT_ENC_TAG( ft_encoding_adobe_custom, 'A', 'D', 'B', 'C' ),
+ FT_ENC_TAG( FT_ENCODING_MS_SJIS, 's', 'j', 'i', 's' ),
+ FT_ENC_TAG( FT_ENCODING_MS_GB2312, 'g', 'b', ' ', ' ' ),
+ FT_ENC_TAG( FT_ENCODING_MS_BIG5, 'b', 'i', 'g', '5' ),
+ FT_ENC_TAG( FT_ENCODING_MS_WANSUNG, 'w', 'a', 'n', 's' ),
+ FT_ENC_TAG( FT_ENCODING_MS_JOHAB, 'j', 'o', 'h', 'a' ),
- FT_ENC_TAG( ft_encoding_apple_roman, 'a', 'r', 'm', 'n' )
+ FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ),
+ FT_ENC_TAG( FT_ENCODING_LATIN_2, 'l', 'a', 't', '2' ),
+
+ FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
+
} FT_Encoding;
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* ft_encoding_xxx */
+ /* */
+ /* <Description> */
+ /* These constants are deprecated, use the corresponding @FT_Encoding */
+ /* values instead. */
+ /* */
+ /* <Values> */
+ /* ft_encoding_none :: see @FT_ENCODING_NONE */
+ /* ft_encoding_unicode :: see @FT_ENCODING_UNICODE */
+ /* ft_encoding_latin_2 :: see @FT_ENCODING_LATIN_2 */
+ /* ft_encoding_symbol :: see @FT_ENCODING_MS_SYMBOL */
+ /* ft_encoding_sjis :: see @FT_ENCODING_MS_SJIS */
+ /* ft_encoding_gb2312 :: see @FT_ENCODING_MS_GB2312 */
+ /* ft_encoding_big5 :: see @FT_ENCODING_MS_BIG5 */
+ /* ft_encoding_wansung :: see @FT_ENCODING_MS_WANSUNG */
+ /* ft_encoding_johab :: see @FT_ENCODING_MS_JOHAB */
+ /* */
+ /* ft_encoding_adobe_standard :: see @FT_ENCODING_ADOBE_STANDARD */
+ /* ft_encoding_adobe_expert :: see @FT_ENCODING_ADOBE_EXPERT */
+ /* ft_encoding_adobe_custom :: see @FT_ENCODING_ADOBE_CUSTOM */
+ /* ft_encoding_latin_1 :: see @FT_ENCODING_ADOBE_LATIN_1 */
+ /* */
+ /* ft_encoding_apple_roman :: see @FT_ENCODING_APPLE_ROMAN */
+ /* */
+#define ft_encoding_none FT_ENCODING_NONE
+#define ft_encoding_unicode FT_ENCODING_UNICODE
+#define ft_encoding_symbol FT_ENCODING_SYMBOL
+#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
+#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
+#define ft_encoding_sjis FT_ENCODING_MS_SJIS
+#define ft_encoding_gb2312 FT_ENCODING_MS_GB2312
+#define ft_encoding_big5 FT_ENCODING_MS_BIG5
+#define ft_encoding_wansung FT_ENCODING_MS_WANSUNG
+#define ft_encoding_johab FT_ENCODING_MS_JOHAB
+#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD
+#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT
+#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
+#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -536,11 +664,11 @@
/* */
/* face_flags :: A set of bit flags that give important */
/* information about the face; see the */
- /* FT_FACE_FLAG_XXX constants for details. */
+ /* @FT_FACE_FLAG_XXX constants for details. */
/* */
/* style_flags :: A set of bit flags indicating the style of */
/* the face (i.e., italic, bold, underline, */
- /* etc). */
+ /* etc). See the @FT_STYLE_FLAG_XXX constants */
/* */
/* num_glyphs :: The total number of glyphs in the face. */
/* */
@@ -725,157 +853,79 @@
/*************************************************************************/
/* */
- /* <Constant> */
- /* FT_FACE_FLAG_SCALABLE */
+ /* <Enum> */
+ /* FT_FACE_FLAG_XXX */
/* */
/* <Description> */
- /* A bit-field constant, used to indicate that a given face provides */
- /* vectorial outlines (i.e., TrueType or Type1). This doesn't */
- /* prevent embedding of bitmap strikes though, i.e., a given face can */
- /* have both this bit set, and a `num_fixed_sizes' property > 0. */
+ /* A list of bit flags used in the 'face_flags' field of the */
+ /* @FT_FaceRec structure. They inform client applications of */
+ /* properties of the corresponding face. */
/* */
-#define FT_FACE_FLAG_SCALABLE 1
-
-
- /*************************************************************************/
+ /* <Values> */
+ /* FT_FACE_FLAG_SCALABLE :: */
+ /* indicates that the face provides vectorial outlines. This doesn't */
+ /* prevent embedded bitmaps. I.e. a face can have both this bit and */
+ /* @FT_FACE_FLAG_FIXED_SIZES set */
/* */
- /* <Constant> */
- /* FT_FACE_FLAG_FIXED_SIZES */
+ /* FT_FACE_FLAG_FIXED_SIZES :: */
+ /* indicates that the face contains 'fixed sizes', i.e. bitmap */
+ /* strikes for some given pixel sizes. See the 'num_fixed_sizes' */
+ /* and 'available_sizes' fields of @FT_FaceRec */
/* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* `fixed sizes', i.e., bitmap strikes for some given pixel sizes. */
- /* See the `num_fixed_sizes' and `available_sizes' face properties */
- /* for more information. */
+ /* FT_FACE_FLAG_FIXED_WIDTH :: */
+ /* indicates that the face contains fixed-width characters (like */
+ /* Courier, Lucido, MonoType, etc..) */
/* */
-#define FT_FACE_FLAG_FIXED_SIZES 2
-
-
- /*************************************************************************/
+ /* FT_FACE_FLAG_SFNT :: */
+ /* indicates that the face uses the 'sfnt' storage scheme. For */
+ /* now, this means TrueType and OpenType */
/* */
- /* <Constant> */
- /* FT_FACE_FLAG_FIXED_WIDTH */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* fixed-width characters (like Courier, Lucida, MonoType, etc.). */
- /* */
-#define FT_FACE_FLAG_FIXED_WIDTH 4
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_SFNT */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face uses the */
- /* `sfnt' storage fomat. For now, this means TrueType or OpenType. */
- /* */
-#define FT_FACE_FLAG_SFNT 8
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_HORIZONTAL */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* horizontal glyph metrics. This should be set for all common */
- /* formats, but who knows. */
+ /* FT_FACE_FLAG_HORIZONTAL :: */
+ /* indicates that the face contains horizontal glyph metrics. */
+ /* This should be set for all common formats */
/* */
-#define FT_FACE_FLAG_HORIZONTAL 0x10
-
-
- /*************************************************************************/
+ /* FT_FACE_FLAG_VERTICAL :: */
+ /* indicates that the face contains vertical glyph metrics. This */
+ /* is only available in some formats, not all of them */
/* */
- /* <Constant> */
- /* FT_FACE_FLAG_VERTICAL */
+ /* FT_FACE_FLAG_KERNING :: */
+ /* indicates that the face contains kerning information. When set, */
+ /* the kerning idstance can be retrieved through the function */
+ /* FT_Get_Kerning. Note that if unset, this function will always */
+ /* return the vector (0,0) */
/* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* vertical glyph metrics. If not set, the glyph loader will */
- /* synthetize vertical metrics itself to help display vertical text */
- /* correctly. */
+ /* FT_FACE_FLAG_FAST_GLYPHS :: */
+ /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT */
/* */
-#define FT_FACE_FLAG_VERTICAL 0x20
-
-
- /*************************************************************************/
+ /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */
+ /* indicates that the font contains multiple masters and is capable */
+ /* of interpolating between them. See the multiple-masters specific */
+ /* API for details */
/* */
- /* <Constant> */
- /* FT_FACE_FLAG_KERNING */
+ /* FT_FACE_FLAG_GLYPH_NAMES :: */
+ /* indicates that the font contains glyph names that can be */
+ /* retrieved through @FT_Get_Glyph_Names. Note that some TrueType */
+ /* fonts contain broken glyph name tables. Use the function */
+ /* use @FT_Has_PS_Glyph_Name when needed. */
/* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* kerning information. When set, this information can be retrieved */
- /* through the function @FT_Get_Kerning. Note that if unset, this */
- /* function will always return the kerning vector (0,0). */
+ /* FT_FACE_FLAG_EXTERNAL_STREAM :: */
+ /* used internally by FreeType to indicate that a face's stream */
+ /* was provided by the client application and should not be */
+ /* destroyed when @FT_Done_Face is called. Don't read or test */
+ /* this flag. */
/* */
-#define FT_FACE_FLAG_KERNING 0x40
+#define FT_FACE_FLAG_SCALABLE (1L << 0)
+#define FT_FACE_FLAG_FIXED_SIZES (1L << 1)
+#define FT_FACE_FLAG_FIXED_WIDTH (1L << 2)
+#define FT_FACE_FLAG_SFNT (1L << 3)
+#define FT_FACE_FLAG_HORIZONTAL (1L << 4)
+#define FT_FACE_FLAG_VERTICAL (1L << 5)
+#define FT_FACE_FLAG_KERNING (1L << 6)
+#define FT_FACE_FLAG_FAST_GLYPHS (1L << 7)
+#define FT_FACE_FLAG_MULTIPLE_MASTERS (1L << 8)
+#define FT_FACE_FLAG_GLYPH_NAMES (1L << 9)
+#define FT_FACE_FLAG_EXTERNAL_STREAM (1L << 10)
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_FAST_GLYPHS */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that the glyphs in a given */
- /* font can be retrieved very quickly, and that a glyph cache is thus */
- /* not necessary for any of its child size objects. */
- /* */
- /* This flag should really be set for fixed-size formats like FNT, */
- /* where each glyph bitmap is available directly in binary form */
- /* without any kind of compression. */
- /* */
- /* <Note> */
- /* This bit flag is deprecated, because even if the bitmaps are */
- /* available directly in the font file, the glyph sub-system is very */
- /* likely to be faster anyway. */
- /* */
-#define FT_FACE_FLAG_FAST_GLYPHS 0x80
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_MULTIPLE_MASTERS */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that the font contains */
- /* multiple masters and is capable of interpolating between them. */
- /* See the multiple-masters specific API for more details. */
- /* */
-#define FT_FACE_FLAG_MULTIPLE_MASTERS 0x100
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_GLYPH_NAMES */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that the font contains */
- /* glyph names that can be retrieved through @FT_Get_Glyph_Name. */
- /* */
-#define FT_FACE_FLAG_GLYPH_NAMES 0x200
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_EXTERNAL_STREAM */
- /* */
- /* <Description> */
- /* This bit field is used internally by FreeType to indicate that */
- /* a face's stream was provided by the client application and should */
- /* not be destroyed by @FT_Done_Face. */
- /* */
-#define FT_FACE_FLAG_EXTERNAL_STREAM 0x4000
-
-
/* */
@@ -1025,28 +1075,26 @@
( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_STYLE_FLAG_ITALIC */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face is */
- /* italicized. */
- /* */
-#define FT_STYLE_FLAG_ITALIC 1
/*************************************************************************/
/* */
/* <Constant> */
- /* FT_STYLE_FLAG_BOLD */
+ /* FT_STYLE_FLAG_XXX */
/* */
/* <Description> */
- /* A bit-field constant, used to indicate that a given face is */
- /* emboldened. */
+ /* A list of bit-flags used to indicate the style of a given face. */
+ /* These are used in the 'style_flags' field of @FT_FaceRec */
/* */
-#define FT_STYLE_FLAG_BOLD 2
+ /* <Values> */
+ /* FT_STYLE_FLAG_ITALIC :: */
+ /* indicates that a given face is italicized */
+ /* */
+ /* FT_STYLE_FLAG_BOLD :: */
+ /* indicates that a given face is bold */
+ /* */
+#define FT_STYLE_FLAG_ITALIC (1 << 0)
+#define FT_STYLE_FLAG_BOLD (1 << 1)
/*************************************************************************/
@@ -1250,14 +1298,14 @@
/* */
/* format :: This field indicates the format of the image */
/* contained in the glyph slot. Typically */
- /* ft_glyph_format_bitmap, */
- /* ft_glyph_format_outline, and */
- /* ft_glyph_format_composite, but others are */
+ /* FT_GLYPH_FORMAT_BITMAP, */
+ /* FT_GLYPH_FORMAT_OUTLINE, and */
+ /* FT_GLYPH_FORMAT_COMPOSITE, but others are */
/* possible. */
/* */
/* bitmap :: This field is used as a bitmap descriptor */
/* when the slot format is */
- /* ft_glyph_format_bitmap. Note that the */
+ /* FT_GLYPH_FORMAT_BITMAP. Note that the */
/* address and content of the bitmap buffer can */
/* change between calls of @FT_Load_Glyph and a */
/* few other functions. */
@@ -1265,7 +1313,7 @@
/* bitmap_left :: This is the bitmap's left bearing expressed */
/* in integer pixels. Of course, this is only */
/* valid if the format is */
- /* ft_glyph_format_bitmap. */
+ /* FT_GLYPH_FORMAT_BITMAP. */
/* */
/* bitmap_top :: This is the bitmap's top bearing expressed in */
/* integer pixels. Remember that this is the */
@@ -1316,7 +1364,7 @@
/* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */
/* to specify the position of the bitmap relative to the current pen */
/* position (e.g. coordinates [0,0] on the baseline). Of course, */
- /* `slot->format' is also changed to `ft_glyph_format_bitmap' . */
+ /* `slot->format' is also changed to `FT_GLYPH_FORMAT_BITMAP' . */
/* */
typedef struct FT_GlyphSlotRec_
{
@@ -1445,31 +1493,36 @@
/* `flags' field of the @FT_Open_Args structure. */
/* */
/* <Fields> */
- /* ft_open_memory :: This is a memory-based stream. */
+ /* FT_OPEN_MEMORY :: This is a memory-based stream. */
/* */
- /* ft_open_stream :: Copy the stream from the `stream' field. */
+ /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */
/* */
- /* ft_open_pathname :: Create a new input stream from a C */
+ /* FT_OPEN_PATHNAME :: Create a new input stream from a C */
/* path name. */
/* */
- /* ft_open_driver :: Use the `driver' field. */
+ /* FT_OPEN_DRIVER :: Use the `driver' field. */
/* */
- /* ft_open_params :: Use the `num_params' & `params' field. */
+ /* FT_OPEN_PARAMS :: Use the `num_params' & `params' field. */
/* */
/* <Note> */
- /* The `ft_open_memory', `ft_open_stream', and `ft_open_pathname' */
+ /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */
/* flags are mutually exclusive. */
/* */
typedef enum
{
- ft_open_memory = 1,
- ft_open_stream = 2,
- ft_open_pathname = 4,
- ft_open_driver = 8,
- ft_open_params = 16
+ FT_OPEN_MEMORY = 1,
+ FT_OPEN_STREAM = 2,
+ FT_OPEN_PATHNAME = 4,
+ FT_OPEN_DRIVER = 8,
+ FT_OPEN_PARAMS = 16
} FT_Open_Flags;
+#define FT_OPEN_MEMORY FT_OPEN_MEMORY
+#define FT_OPEN_STREAM FT_OPEN_STREAM
+#define FT_OPEN_PATHNAME FT_OPEN_PATHNAME
+#define FT_OPEN_DRIVER FT_OPEN_DRIVER
+#define FT_OPEN_PARAMS FT_OPEN_PARAMS
/*************************************************************************/
/* */
@@ -1532,19 +1585,19 @@
/* The stream type is determined by the contents of `flags' which */
/* are tested in the following order by @FT_Open_Face: */
/* */
- /* If the `ft_open_memory' bit is set, assume that this is a */
+ /* If the `FT_OPEN_MEMORY' bit is set, assume that this is a */
/* memory file of `memory_size' bytes,located at `memory_address'. */
/* */
- /* Otherwise, if the `ft_open_stream' bit is set, assume that a */
+ /* Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a */
/* custom input stream `stream' is used. */
/* */
- /* Otherwise, if the `ft_open_pathname' bit is set, assume that this */
+ /* Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this */
/* is a normal file and use `pathname' to open it. */
/* */
- /* If the `ft_open_driver' bit is set, @FT_Open_Face will only try to */
+ /* If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face will only try to */
/* open the file with the driver whose handler is in `driver'. */
/* */
- /* If the `ft_open_params' bit is set, the parameters given by */
+ /* If the `FT_OPEN_PARAMS' bit is set, the parameters given by */
/* `num_params' and `params' will be used. They are ignored */
/* otherwise. */
/* */
@@ -2103,7 +2156,7 @@
/* the glyph loader should not load composite glyph recursively. */
/* Rather, when a composite glyph is encountered, it should set */
/* the values of `num_subglyphs' and `subglyphs', as well as set */
- /* `face->glyph.format' to ft_glyph_format_composite. */
+ /* `face->glyph.format' to FT_GLYPH_FORMAT_COMPOSITE. */
/* */
/* This is for use by the auto-hinter and possibly other tools. */
/* For nearly all applications, this flags should be left unset */
@@ -2135,7 +2188,7 @@
/* <Description> */
/* Only used with FT_LOAD_RENDER set, it indicates that the returned */
/* glyph image should be 1-bit monochrome. This really tells the */
- /* glyph loader to use `ft_render_mode_mono' when calling */
+ /* glyph loader to use `FT_RENDER_MODE_MONO' when calling */
/* @FT_Render_Glyph. */
/* */
#define FT_LOAD_MONOCHROME 0x1000
@@ -2181,7 +2234,15 @@
/* */
#define FT_LOAD_NO_AUTOHINT 0x8000U
+ /* */
+#define FT_LOAD_TARGET_(x) ( (FT_Int32)((x) & 7) << 16 )
+#define FT_LOAD_TARGET_MODE(x) ((FT_Render_Mode)( ((x) >> 16) & 7 ))
+#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_(FT_RENDER_MODE_NORMAL)
+#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_(FT_RENDER_MODE_MONO)
+#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_(FT_RENDER_MODE_LCD)
+#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_(FT_RENDER_MODE_LCD_V)
+
/*************************************************************************/
/* */
/* <Constant> */
@@ -2233,37 +2294,67 @@
/* FT_Render_Mode */
/* */
/* <Description> */
- /* An enumeration type that lists the render modes supported by the */
- /* FreeType 2 renderer(s). A renderer is in charge of converting a */
- /* glyph image into a bitmap. */
+ /* An enumeration type that lists the render modes supported by */
+ /* FreeType 2. Each mode corresponds to a specific type of scanline */
+ /* conversion performed on the outline, as well as specific */
+ /* hinting optimizations. */
/* */
/* <Fields> */
- /* ft_render_mode_normal :: This is the default render mode; it */
- /* corresponds to 8-bit anti-aliased */
- /* bitmaps, using 256 levels of gray. */
+ /* FT_RENDER_MODE_NORMAL :: */
+ /* this is the default render mode; it corresponds to 8-bit */
+ /* anti-aliased bitmaps, using 256 levels of opacity */
/* */
- /* ft_render_mode_mono :: This render mode is used to produce 1-bit */
- /* monochrome bitmaps. */
+ /* FT_RENDER_MODE_MONO :: */
+ /* this mode corresponds to 1-bit bitmaps */
/* */
- /* <Note> */
- /* There is no render mode to produce 8-bit `monochrome' bitmaps -- */
- /* you have to make the conversion yourself if you need such things */
- /* (besides, FreeType is not a graphics library). */
+ /* FT_RENDER_MODE_LCD :: */
+ /* this mode corresponds to horizontal RGB/BGR sub-pixel displays, */
+ /* like LCD-screens. It produces 8-bit bitmaps that are 3 times the */
+ /* width of the original glyph outline in pixels, and which use the */
+ /* @FT_PIXEL_MODE_LCD mode */
/* */
- /* More modes might appear later for specific display modes (e.g. TV, */
- /* LCDs, etc.). They will be supported through the simple addition */
- /* of a renderer module, with no changes to the rest of the engine. */
+ /* FT_RENDER_MODE_LCD_V :: */
+ /* this mode corresponds to vertical RGB/BGR sub-pixel displays */
+ /* (like PDA screens, rotated LCD displays, etc..). It produces */
+ /* 8-bit bitmaps that are 3 times the height of the original */
+ /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode */
/* */
+ /* <Note> */
+ /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph are */
+ /* _not_ _filtered_ to reduce color-fringes. It's up to the caller to */
+ /* perform this pass */
+ /* */
typedef enum FT_Render_Mode_
{
- ft_render_mode_normal = 0,
- ft_render_mode_mono = 1
+ FT_RENDER_MODE_NORMAL = 0,
+ FT_RENDER_MODE_MONO,
+ FT_RENDER_MODE_LCD,
+ FT_RENDER_MODE_LCD_V,
+ FT_RENDER_MODE_MAX
+
} FT_Render_Mode;
/*************************************************************************/
/* */
+ /* <Enum> */
+ /* ft_render_mode_xxx */
+ /* */
+ /* <Description> */
+ /* these constats are deprecated. Use the corresponding */
+ /* @FT_Render_Mode values instead */
+ /* */
+ /* <Values> */
+ /* ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL */
+ /* ft_render_mode_mono :: see @FT_RENDER_MODE_MONO */
+ /* */
+#define ft_render_mode_normal FT_RENDER_MODE_NORMAL
+#define ft_render_mode_mono FT_RENDER_MODE_MONO
+
+
+ /*************************************************************************/
+ /* */
/* <Function> */
/* FT_Render_Glyph */
/* */
@@ -2299,22 +2390,55 @@
/* @FT_Get_Kerning. */
/* */
/* <Fields> */
- /* ft_kerning_default :: Return scaled and grid-fitted kerning */
+ /* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */
/* distances (value is 0). */
/* */
- /* ft_kerning_unfitted :: Return scaled but un-grid-fitted kerning */
+ /* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */
/* distances. */
/* */
- /* ft_kerning_unscaled :: Return the kerning vector in original font */
+ /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */
/* units. */
/* */
typedef enum FT_Kerning_Mode_
{
- ft_kerning_default = 0,
- ft_kerning_unfitted,
- ft_kerning_unscaled
+ FT_KERNING_DEFAULT = 0,
+ FT_KERNING_UNFITTED,
+ FT_KERNING_UNSCALED
} FT_Kerning_Mode;
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* ft_kerning_default */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_KERNING_DEFAULT */
+ /* instead. */
+ /* */
+#define ft_kerning_default FT_KERNING_DEFAULT
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* ft_kerning_unfitted */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_KERNING_UNFITTED */
+ /* instead. */
+ /* */
+#define ft_kerning_unfitted FT_KERNING_UNFITTED
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* ft_kerning_unscaled */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_KERNING_UNSCALED */
+ /* instead. */
+ /* */
+#define ft_kerning_unscaled FT_KERNING_UNSCALED
/*************************************************************************/
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -145,7 +145,7 @@
/* */
/* <Note> */
/* You can typecast FT_Glyph to FT_BitmapGlyph if you have */
- /* glyph->format == ft_glyph_format_bitmap. This lets you access */
+ /* glyph->format == FT_GLYPH_FORMAT_BITMAP. This lets you access */
/* the bitmap's contents easily. */
/* */
/* The corresponding pixel buffer is always owned by the BitmapGlyph */
@@ -189,7 +189,7 @@
/* */
/* <Note> */
/* You can typecast FT_Glyph to FT_OutlineGlyph if you have */
- /* glyph->format == ft_glyph_format_outline. This lets you access */
+ /* glyph->format == FT_GLYPH_FORMAT_OUTLINE. This lets you access */
/* the outline's content easily. */
/* */
/* As the outline is extracted from a glyph slot, its coordinates are */
@@ -411,7 +411,7 @@
/* error = FT_Get_Glyph( face->glyph, &glyph ); */
/* */
/* // convert to a bitmap (default render mode + destroy old) */
- /* if ( glyph->format != ft_glyph_format_bitmap ) */
+ /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */
/* { */
/* error = FT_Glyph_To_Bitmap( &glyph, ft_render_mode_default, */
/* 0, 1 ); */
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -115,53 +115,51 @@
/* future. */
/* */
/* <Fields> */
- /* ft_pixel_mode_mono :: A monochrome bitmap (1 bit/pixel). */
+ /* FT_PIXEL_MODE_MONO :: */
+ /* A monochrome bitmap, using 1 bit per pixel. Note that pixels */
+ /* are stored in most-significant order (MSB), which means that */
+ /* the left-most pixel in a byte has value 128 */
/* */
- /* ft_pixel_mode_grays :: An 8-bit gray-levels bitmap. Note that the */
- /* total number of gray levels is given in the */
- /* `num_grays' field of the FT_Bitmap */
- /* structure. */
+ /* FT_PIXEL_MODE_GRAY :: */
+ /* An 8-bit bitmap, generally used to represent anti-aliased glyph */
+ /* images. Each pixel is stored in one byte. Note that the number */
+ /* of value "gray" levels is stored in the 'num_bytes' field of */
+ /* the @FT_Bitmap structure (it generally is 256) */
/* */
- /* ft_pixel_mode_pal2 :: A 2-bit paletted bitmap. */
- /* Currently unused by FreeType. */
+ /* FT_PIXEL_MODE_GRAY2 :: */
+ /* A 2-bit/pixel bitmap, used to represent embedded anti-aliased */
+ /* bitmaps in font files according to the OpenType specification. */
+ /* We haven't found a single font using this format however */
/* */
- /* ft_pixel_mode_pal4 :: A 4-bit paletted bitmap. */
- /* Currently unused by FreeType. */
+ /* FT_PIXEL_MODE_GRAY4 :: */
+ /* A 4-bit/pixel bitmap, used to represent embedded anti-aliased */
+ /* bitmaps in font files according to the OpenType specification. */
+ /* We haven't found a single font using this format however */
/* */
- /* ft_pixel_mode_pal8 :: An 8-bit paletted bitmap. */
- /* Currently unused by FreeType. */
/* */
- /* ft_pixel_mode_rgb15 :: A 15-bit RGB bitmap. Uses 5:5:5 encoding. */
- /* Currently unused by FreeType. */
+ /* FT_PIXEL_MODE_LCD :: */
+ /* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */
+ /* images used for display on LCD displays; the bitmap's width is */
+ /* three times wider than the original glyph image. See also */
+ /* @FT_RENDER_MODE_LCD */
/* */
- /* ft_pixel_mode_rgb16 :: A 16-bit RGB bitmap. Uses 5:6:5 encoding. */
- /* Currently unused by FreeType. */
+ /* FT_PIXEL_MODE_LCD_V :: */
+ /* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */
+ /* images used for display on rotated LCD displays; the bitmap's */
+ /* height is three times taller than the original glyph image. */
+ /* See also @FT_RENDER_MODE_LCD_V */
/* */
- /* ft_pixel_mode_rgb24 :: A 24-bit RGB bitmap. */
- /* Currently unused by FreeType. */
- /* */
- /* ft_pixel_mode_rgb32 :: A 32-bit RGB bitmap. */
- /* Currently unused by FreeType. */
- /* */
- /* <Note> */
- /* Some anti-aliased bitmaps might be embedded in TrueType fonts */
- /* using formats pal2 or pal4, though no fonts presenting those have */
- /* been found to date. */
- /* */
typedef enum FT_Pixel_Mode_
{
- ft_pixel_mode_none = 0,
- ft_pixel_mode_mono,
- ft_pixel_mode_grays,
- ft_pixel_mode_pal2,
- ft_pixel_mode_pal4,
- ft_pixel_mode_pal8,
- ft_pixel_mode_rgb15,
- ft_pixel_mode_rgb16,
- ft_pixel_mode_rgb24,
- ft_pixel_mode_rgb32,
+ FT_PIXEL_MODE_NONE = 0,
+ FT_PIXEL_MODE_MONO,
+ FT_PIXEL_MODE_GRAY,
+ FT_PIXEL_MODE_GRAY2,
+ FT_PIXEL_MODE_GRAY4,
+ FT_PIXEL_MODE_LCD,
+ FT_PIXEL_MODE_LCD_V,
- ft_pixel_mode_max /* do not remove */
+ FT_PIXEL_MODE_MAX /* do not remove */
} FT_Pixel_Mode;
@@ -169,9 +167,35 @@
/*************************************************************************/
/* */
/* <Enum> */
+ /* ft_pixel_mode_xxx */
+ /* */
+ /* <Description> */
+ /* a list of deprecated constants. Use the corresponding */
+ /* @FT_Pixel_Mode values instead */
+ /* */
+ /* <Values> */
+ /* ft_pixel_mode_none :: see @FT_PIXEL_MODE_NONE */
+ /* ft_pixel_mode_mono :: see @FT_PIXEL_MODE_MONO */
+ /* ft_pixel_mode_grays :: see @FT_PIXEL_MODE_GRAY */
+ /* ft_pixel_mode_pal2 :: see @FT_PIXEL_MODE_GRAY2 */
+ /* ft_pixel_mode_pal4 :: see @FT_PIXEL_MODE_GRAY4 */
+ /* */
+#define ft_pixel_mode_none FT_PIXEL_MODE_NONE
+#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
+#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY
+#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
+#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
+
+ /* */
+#if 0
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
/* FT_Palette_Mode */
/* */
/* <Description> */
+ /* THIS TYPE IS DEPRECATED. DO NOT USE IT !! */
+ /* */
/* An enumeration type used to describe the format of a bitmap */
/* palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
/* */
@@ -195,6 +219,8 @@
} FT_Palette_Mode;
+ /* */
+#endif
/*************************************************************************/
/* */
@@ -223,7 +249,7 @@
/* most cases. */
/* */
/* num_grays :: This field is only used with */
- /* `ft_pixel_mode_grays'; it gives the number of gray */
+ /* `FT_PIXEL_MODE_GRAY'; it gives the number of gray */
/* levels used in the bitmap. */
/* */
/* pixel_mode :: The pixel_mode, i.e., how pixel bits are stored. */
@@ -329,7 +355,7 @@
/* `outline_flags' field. */
/* */
/* <Fields> */
- /* ft_outline_owner :: If set, this flag indicates that the */
+ /* FT_OUTLINE_OWNER :: If set, this flag indicates that the */
/* outline's field arrays (i.e. */
/* `points', `flags' & `contours') are */
/* `owned' by the outline object, and */
@@ -336,13 +362,13 @@
/* should thus be freed when it is */
/* destroyed. */
/* */
- /* ft_outline_even_odd_fill :: By default, outlines are filled using */
+ /* FT_OUTLINE_EVEN_ODD_FILL :: By default, outlines are filled using */
/* the non-zero winding rule. If set to */
/* 1, the outline will be filled using */
/* the even-odd fill rule (only works */
/* with the smooth raster). */
/* */
- /* ft_outline_reverse_fill :: By default, outside contours of an */
+ /* FT_OUTLINE_REVERSE_FILL :: By default, outside contours of an */
/* outline are oriented in clock-wise */
/* direction, as defined in the TrueType */
/* specification. This flag is set if */
@@ -352,7 +378,7 @@
/* scan-converter. However, it is very */
/* important for the auto-hinter. */
/* */
- /* ft_outline_ignore_dropouts :: By default, the scan converter will */
+ /* FT_OUTLINE_IGNORE_DROPOUTS :: By default, the scan converter will */
/* try to detect drop-outs in an outline */
/* and correct the glyph bitmap to */
/* ensure consistent shape continuity. */
@@ -359,7 +385,7 @@
/* If set, this flag hints the scan-line */
/* converter to ignore such cases. */
/* */
- /* ft_outline_high_precision :: This flag indicates that the */
+ /* FT_OUTLINE_HIGH_PRECISION :: This flag indicates that the */
/* scan-line converter should try to */
/* convert this outline to bitmaps with */
/* the highest possible quality. It is */
@@ -368,7 +394,7 @@
/* hint, that might be completely */
/* ignored by a given scan-converter. */
/* */
- /* ft_outline_single_pass :: This flag is set to force a given */
+ /* FT_OUTLINE_SINGLE_PASS :: This flag is set to force a given */
/* scan-converter to only use a single */
/* pass over the outline to render a */
/* bitmap glyph image. Normally, it is */
@@ -379,35 +405,117 @@
/* */
typedef enum FT_Outline_Flags_
{
- ft_outline_none = 0,
- ft_outline_owner = 1,
- ft_outline_even_odd_fill = 2,
- ft_outline_reverse_fill = 4,
- ft_outline_ignore_dropouts = 8,
- ft_outline_high_precision = 256,
- ft_outline_single_pass = 512
+ FT_OUTLINE_NONE = 0,
+ FT_OUTLINE_OWNER = 1,
+ FT_OUTLINE_EVEN_ODD_FILL = 2,
+ FT_OUTLINE_REVERSE_FILL = 4,
+ FT_OUTLINE_IGNORE_DROPOUTS = 8,
+ FT_OUTLINE_HIGH_PRECISION = 256,
+ FT_OUTLINE_SINGLE_PASS = 512
} FT_Outline_Flags;
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_NONE */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_NONE */
+ /* instead. */
+ /* */
+#define zft_outline_none FT_OUTLINE_NONE
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_OWNER */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_OWNER */
+ /* instead. */
+ /* */
+#define zft_outline_owner FT_OUTLINE_OWNER
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* ft_outline_even_odd_fill */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_EVEN_ODD_FILL */
+ /* instead. */
+ /* */
+#define zft_outline_even_off_fill FT_OUTLINE_EVEN_ODD_FILL
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_REVERSE_FILL */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_REVERSE_FILL */
+ /* instead. */
+ /* */
+#define zft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_IGNORE_DROPOUTS */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_IGNORE_DROPOUTS */
+ /* instead. */
+ /* */
+#define zft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_HIGH_PRECISION */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_HIGH_PRECISION */
+ /* instead. */
+ /* */
+#define zft_outline_high_precision FT_OUTLINE_HIGH_PRECISION
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_SINGLE_PASS */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_SINGLE_PASS */
+ /* instead. */
+ /* */
+#define zft_outline_single_pass FT_OUTLINE_SINGLE_PASS
+
/* */
#define FT_CURVE_TAG( flag ) ( flag & 3 )
-#define FT_Curve_Tag_On 1
-#define FT_Curve_Tag_Conic 0
-#define FT_Curve_Tag_Cubic 2
+#define FT_CURVE_TAG_ON 1
+#define FT_CURVE_TAG_CONIC 0
+#define FT_CURVE_TAG_CUBIC 2
-#define FT_Curve_Tag_Touch_X 8 /* reserved for the TrueType hinter */
-#define FT_Curve_Tag_Touch_Y 16 /* reserved for the TrueType hinter */
+#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */
+#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */
-#define FT_Curve_Tag_Touch_Both ( FT_Curve_Tag_Touch_X | \
- FT_Curve_Tag_Touch_Y )
+#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \
+ FT_CURVE_TAG_TOUCH_Y )
+#define FT_Curve_Tag_On FT_CURVE_TAG_ON
+#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC
+#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC
+#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X
+#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Outline_MoveTo_Func */
+ /* FT_Outline_MoveToFunc */
/* */
/* <Description> */
/* A function pointer type used to describe the signature of a `move */
@@ -425,14 +533,15 @@
/* Error code. 0 means success. */
/* */
typedef int
- (*FT_Outline_MoveTo_Func)( FT_Vector* to,
- void* user );
+ (*FT_Outline_MoveToFunc)( FT_Vector* to,
+ void* user );
+#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Outline_LineTo_Func */
+ /* FT_Outline_LineToFunc */
/* */
/* <Description> */
/* A function pointer type used to describe the signature of a `line */
@@ -450,14 +559,15 @@
/* Error code. 0 means success. */
/* */
typedef int
- (*FT_Outline_LineTo_Func)( FT_Vector* to,
- void* user );
+ (*FT_Outline_LineToFunc)( FT_Vector* to,
+ void* user );
+#define FT_Outline_LineTo_Func FT_Outline_LineToFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Outline_ConicTo_Func */
+ /* FT_Outline_ConicToFunc */
/* */
/* <Description> */
/* A function pointer type use to describe the signature of a `conic */
@@ -479,15 +589,16 @@
/* Error code. 0 means success. */
/* */
typedef int
- (*FT_Outline_ConicTo_Func)( FT_Vector* control,
- FT_Vector* to,
- void* user );
+ (*FT_Outline_ConicToFunc)( FT_Vector* control,
+ FT_Vector* to,
+ void* user );
+#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Outline_CubicTo_Func */
+ /* FT_Outline_CubicToFunc */
/* */
/* <Description> */
/* A function pointer type used to describe the signature of a `cubic */
@@ -509,12 +620,14 @@
/* Error code. 0 means success. */
/* */
typedef int
- (*FT_Outline_CubicTo_Func)( FT_Vector* control1,
- FT_Vector* control2,
- FT_Vector* to,
- void* user );
+ (*FT_Outline_CubicToFunc)( FT_Vector* control1,
+ FT_Vector* control2,
+ FT_Vector* to,
+ void* user );
+#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -553,13 +666,13 @@
/* */
typedef struct FT_Outline_Funcs_
{
- FT_Outline_MoveTo_Func move_to;
- FT_Outline_LineTo_Func line_to;
- FT_Outline_ConicTo_Func conic_to;
- FT_Outline_CubicTo_Func cubic_to;
+ FT_Outline_MoveToFunc move_to;
+ FT_Outline_LineToFunc line_to;
+ FT_Outline_ConicToFunc conic_to;
+ FT_Outline_CubicToFunc cubic_to;
- int shift;
- FT_Pos delta;
+ int shift;
+ FT_Pos delta;
} FT_Outline_Funcs;
@@ -609,36 +722,65 @@
/* formats, even though future font drivers will be able to register */
/* their own format. */
/* */
- /* <Fields> */
- /* ft_glyph_format_composite :: The glyph image is a composite of */
- /* several other images. This glyph */
- /* format is _only_ used with the */
- /* FT_LOAD_FLAG_NO_RECURSE flag (XXX: */
- /* Which is currently unimplemented). */
+ /* <Values> */
+ /* FT_GLYPH_FORMAT_NONE :: */
+ /* the value 0 is reserved and does describe a glyph format */
/* */
- /* ft_glyph_format_bitmap :: The glyph image is a bitmap, and can */
- /* be described as a FT_Bitmap. */
+ /* FT_GLYPH_FORMAT_COMPOSITE :: */
+ /* the glyph image is a composite of several other images. This */
+ /* format is _only_ used with @FT_LOAD_FLAG_NO_RECURSE, and is */
+ /* used to report compound glyphs (like accented characters) */
/* */
- /* ft_glyph_format_outline :: The glyph image is a vectorial image */
- /* made of bezier control points, and */
- /* can be described as a FT_Outline. */
+ /* FT_GLYPH_FORMAT_BITMAP :: */
+ /* the glyph image is a bitmap, and can be described as a */
+ /* @FT_Bitmap. You'll generally need to access the 'bitmap' field */
+ /* of the @FT_GlyphSlotRec structure to read it. */
/* */
- /* ft_glyph_format_plotter :: The glyph image is a vectorial image */
- /* made of plotter lines (some T1 fonts */
- /* like Hershey contain glyph in this */
- /* format). */
+ /* FT_GLYPH_FORMAT_OUTLINE :: The glyph image is a vectorial image */
+ /* the glyph image is a vertorial outline made of line segments */
+ /* and bezier arcs; it can be described as a @FT_Outline and you'll */
+ /* generally want to access the 'outline' field of the */
+ /* @FT_GlyphSlotRec structure to read it. */
/* */
+ /* FT_GLYPH_FORMAT_PLOTTER :: */
+ /* the glyph image is a vectorial path with no inside/outside */
+ /* contours. Some Type 1 fonts, like those in the Hershy family, */
+ /* contain glyphs in this format. These are described as */
+ /* @FT_Outline, but FreeType isn't currently capable of rendering */
+ /* them correctly. */
+ /* */
typedef enum FT_Glyph_Format_
{
- FT_IMAGE_TAG( ft_glyph_format_none, 0, 0, 0, 0 ),
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
- FT_IMAGE_TAG( ft_glyph_format_composite, 'c', 'o', 'm', 'p' ),
- FT_IMAGE_TAG( ft_glyph_format_bitmap, 'b', 'i', 't', 's' ),
- FT_IMAGE_TAG( ft_glyph_format_outline, 'o', 'u', 't', 'l' ),
- FT_IMAGE_TAG( ft_glyph_format_plotter, 'p', 'l', 'o', 't' )
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ),
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ),
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' )
} FT_Glyph_Format;
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* ft_glyph_format_xxx */
+ /* */
+ /* <Description> */
+ /* A list of decprecated constants. Use the corresponding */
+ /* @FT_Glyph_Format values instead. */
+ /* */
+ /* <Values> */
+ /* ft_glyph_format_none :: see @FT_GLYPH_FORMAT_NONE */
+ /* ft_glyph_format_composite :: see @FT_GLYPH_FORMAT_COMPOSITE */
+ /* ft_glyph_format_bitmap :: see @FT_GLYPH_FORMAT_BITMAP */
+ /* ft_glyph_format_outline :: see @FT_GLYPH_FORMAT_OUTLINE */
+ /* ft_glyph_format_plotter :: see @FT_GLYPH_FORMAT_PLOTTER */
+ /* */
+#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
+#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
+#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP
+#define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE
+#define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER
/*************************************************************************/
/*************************************************************************/
@@ -712,7 +854,7 @@
/* */
/* <Note> */
/* This structure is used by the span drawing callback type named */
- /* FT_Raster_Span_Func(), which takes the y-coordinate of the span as */
+ /* FT_SpanFunc which takes the y-coordinate of the span as */
/* a parameter. */
/* */
/* The coverage value is always between 0 and 255, even if the number */
@@ -730,7 +872,7 @@
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Span_Func */
+ /* FT_SpanFunc */
/* */
/* <Description> */
/* A function used as a call-back by the anti-aliased renderer in */
@@ -764,11 +906,12 @@
/* only for those scanlines that do have `gray' pixels on them. */
/* */
typedef void
- (*FT_Raster_Span_Func)( int y,
- int count,
- FT_Span* spans,
- void* user );
+ (*FT_SpanFunc)( int y,
+ int count,
+ FT_Span* spans,
+ void* user );
+#define FT_Raster_Span_Func FT_SpanFunc
/*************************************************************************/
/* */
@@ -776,6 +919,8 @@
/* FT_Raster_BitTest_Func */
/* */
/* <Description> */
+ /* THIS TYPE IS DEPRECATED. DO NOT USE IT */
+ /* */
/* A function used as a call-back by the monochrome scan-converter */
/* to test whether a given target pixel is already set to the drawing */
/* `color'. These tests are crucial to implement drop-out control */
@@ -803,6 +948,8 @@
/* FT_Raster_BitSet_Func */
/* */
/* <Description> */
+ /* THIS TYPE IS DEPRECATED. DO NOT USE IT */
+ /* */
/* A function used as a call-back by the monochrome scan-converter */
/* to set an individual target pixel. This is crucial to implement */
/* drop-out control according to the TrueType specification. */
@@ -822,7 +969,6 @@
int x,
void* user );
-
/*************************************************************************/
/* */
/* <Enum> */
@@ -833,14 +979,14 @@
/* of a FT_Raster_Params structure. */
/* */
/* <Fields> */
- /* ft_raster_flag_default :: This value is 0. */
+ /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */
/* */
- /* ft_raster_flag_aa :: This flag is set to indicate that an */
+ /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */
/* anti-aliased glyph image should be */
/* generated. Otherwise, it will be */
/* monochrome (1-bit) */
/* */
- /* ft_raster_flag_direct :: This flag is set to indicate direct */
+ /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */
/* rendering. In this mode, client */
/* applications must provide their own span */
/* callback. This lets them directly */
@@ -852,7 +998,7 @@
/* Note that for now, direct rendering is */
/* only possible with anti-aliased glyphs. */
/* */
- /* ft_raster_flag_clip :: This flag is only used in direct */
+ /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
/* rendering mode. If set, the output will */
/* be clipped to a box specified in the */
/* "clip_box" field of the FT_Raster_Params */
@@ -865,14 +1011,19 @@
/* */
typedef enum
{
- ft_raster_flag_default = 0,
- ft_raster_flag_aa = 1,
- ft_raster_flag_direct = 2,
- ft_raster_flag_clip = 4
+ FT_RASTER_FLAG_DEFAULT = 0,
+ FT_RASTER_FLAG_AA = 1,
+ FT_RASTER_FLAG_DIRECT = 2,
+ FT_RASTER_FLAG_CLIP = 4
} FT_Raster_Flag;
+#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT
+#define ft_raster_flag_aa FT_RASTER_FLAG_AA
+#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
+#define ft_raster_flag_clip FT_RASTER_FLAG_CLIP
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -894,9 +1045,9 @@
/* */
/* black_spans :: The black span drawing callback. */
/* */
- /* bit_test :: The bit test callback. */
+ /* bit_test :: The bit test callback. UNIMPLEMENTED !! */
/* */
- /* bit_set :: The bit set callback. */
+ /* bit_set :: The bit set callback. UNIMPLEMENTED !! */
/* */
/* user :: User-supplied data that is passed to each drawing */
/* callback. */
@@ -907,11 +1058,11 @@
/* 26.6 fixed-point units). */
/* */
/* <Note> */
- /* An anti-aliased glyph bitmap is drawn if the ft_raster_flag_aa bit */
+ /* An anti-aliased glyph bitmap is drawn if the FT_RASTER_FLAG_AA bit */
/* flag is set in the `flags' field, otherwise a monochrome bitmap */
/* will be generated. */
/* */
- /* If the ft_raster_flag_direct bit flag is set in `flags', the */
+ /* If the FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
/* raster will call the `gray_spans' callback to draw gray pixel */
/* spans, in the case of an aa glyph bitmap, it will call */
/* `black_spans', and `bit_test' and `bit_set' in the case of a */
@@ -928,10 +1079,10 @@
FT_Bitmap* target;
void* source;
int flags;
- FT_Raster_Span_Func gray_spans;
- FT_Raster_Span_Func black_spans;
- FT_Raster_BitTest_Func bit_test;
- FT_Raster_BitSet_Func bit_set;
+ FT_SpanFunc gray_spans;
+ FT_SpanFunc black_spans;
+ FT_Raster_BitTest_Func bit_test; /* doesn't work !! */
+ FT_Raster_BitSet_Func bit_set; /* doesn't work !! */
void* user;
FT_BBox clip_box;
@@ -941,7 +1092,7 @@
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_New_Func */
+ /* FT_Raster_NewFunc */
/* */
/* <Description> */
/* A function used to create a new raster object. */
@@ -963,14 +1114,15 @@
/* ignored by a given raster implementation. */
/* */
typedef int
- (*FT_Raster_New_Func)( void* memory,
- FT_Raster* raster );
+ (*FT_Raster_NewFunc)( void* memory,
+ FT_Raster* raster );
+#define FT_Raster_New_Func FT_Raster_NewFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Done_Func */
+ /* FT_Raster_DoneFunc */
/* */
/* <Description> */
/* A function used to destroy a given raster object. */
@@ -979,13 +1131,14 @@
/* raster :: A handle to the raster object. */
/* */
typedef void
- (*FT_Raster_Done_Func)( FT_Raster raster );
+ (*FT_Raster_DoneFunc)( FT_Raster raster );
+#define FT_Raster_Done_Func FT_Raster_DoneFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Reset_Func */
+ /* FT_Raster_ResetFunc */
/* */
/* <Description> */
/* FreeType provides an area of memory called the `render pool', */
@@ -1010,15 +1163,16 @@
/* recommended for efficiency purposes. */
/* */
typedef void
- (*FT_Raster_Reset_Func)( FT_Raster raster,
- unsigned char* pool_base,
- unsigned long pool_size );
+ (*FT_Raster_ResetFunc)( FT_Raster raster,
+ unsigned char* pool_base,
+ unsigned long pool_size );
+#define FT_Raster_Reset_Func FT_Raster_ResetFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Set_Mode_Func */
+ /* FT_Raster_SetModeFunc */
/* */
/* <Description> */
/* This function is a generic facility to change modes or attributes */
@@ -1034,15 +1188,16 @@
/* args :: A pointer to the new mode/property to use. */
/* */
typedef int
- (*FT_Raster_Set_Mode_Func)( FT_Raster raster,
- unsigned long mode,
- void* args );
+ (*FT_Raster_SetModeFunc)( FT_Raster raster,
+ unsigned long mode,
+ void* args );
+#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Render_Func */
+ /* FT_Raster_RenderFunc */
/* */
/* <Description> */
/* Invokes a given raster to scan-convert a given glyph image into a */
@@ -1074,9 +1229,10 @@
/* composition). */
/* */
typedef int
- (*FT_Raster_Render_Func)( FT_Raster raster,
- FT_Raster_Params* params );
+ (*FT_Raster_RenderFunc)( FT_Raster raster,
+ FT_Raster_Params* params );
+#define FT_Raster_Render_Func FT_Raster_RenderFunc
/*************************************************************************/
/* */
@@ -1099,12 +1255,12 @@
/* */
typedef struct FT_Raster_Funcs_
{
- FT_Glyph_Format glyph_format;
- FT_Raster_New_Func raster_new;
- FT_Raster_Reset_Func raster_reset;
- FT_Raster_Set_Mode_Func raster_set_mode;
- FT_Raster_Render_Func raster_render;
- FT_Raster_Done_Func raster_done;
+ FT_Glyph_Format glyph_format;
+ FT_Raster_NewFunc raster_new;
+ FT_Raster_ResetFunc raster_reset;
+ FT_Raster_SetModeFunc raster_set_mode;
+ FT_Raster_RenderFunc raster_render;
+ FT_Raster_DoneFunc raster_done;
} FT_Raster_Funcs;
--- a/include/freetype/ftincrem.h
+++ b/include/freetype/ftincrem.h
@@ -245,8 +245,8 @@
* parameter.data = &inc_int;
*
* // set up FT_Open_Args structure
- * open_args.flags = (FT_Open_Flags)( ft_open_pathname |
- * ft_open_params );
+ * open_args.flags = (FT_Open_Flags)( FT_OPEN_PATHNAME |
+ * FT_OPEN_PARAMS );
* open_args.pathname = my_font_pathname;
* open_args.num_params = 1;
* open_args.params = ¶meter; // we use one optional argument
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -310,7 +310,7 @@
/* outline :: A pointer to the target outline descriptor. */
/* */
/* <Note> */
- /* This functions toggles the bit flag `ft_outline_reverse_fill' in */
+ /* This functions toggles the bit flag `FT_OUTLINE_REVERSE_FILL' in */
/* the outline's `flags' field. */
/* */
/* It shouldn't be used by a normal client application, unless it */
--- a/include/freetype/ftrender.h
+++ b/include/freetype/ftrender.h
@@ -38,67 +38,83 @@
/* create a new glyph object */
typedef FT_Error
- (*FT_Glyph_Init_Func)( FT_Glyph glyph,
- FT_GlyphSlot slot );
+ (*FT_Glyph_InitFunc)( FT_Glyph glyph,
+ FT_GlyphSlot slot );
/* destroys a given glyph object */
typedef void
- (*FT_Glyph_Done_Func)( FT_Glyph glyph );
+ (*FT_Glyph_DoneFunc)( FT_Glyph glyph );
typedef void
- (*FT_Glyph_Transform_Func)( FT_Glyph glyph,
- FT_Matrix* matrix,
- FT_Vector* delta );
+ (*FT_Glyph_TransformFunc)( FT_Glyph glyph,
+ FT_Matrix* matrix,
+ FT_Vector* delta );
typedef void
- (*FT_Glyph_BBox_Func)( FT_Glyph glyph,
- FT_BBox* abbox );
+ (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph,
+ FT_BBox* abbox );
typedef FT_Error
- (*FT_Glyph_Copy_Func)( FT_Glyph source,
- FT_Glyph target );
+ (*FT_Glyph_CopyFunc)( FT_Glyph source,
+ FT_Glyph target );
typedef FT_Error
- (*FT_Glyph_Prepare_Func)( FT_Glyph glyph,
- FT_GlyphSlot slot );
+ (*FT_Glyph_PrepareFunc)( FT_Glyph glyph,
+ FT_GlyphSlot slot );
+/* deprecated */
+#define FT_Glyph_Init_Func FT_Glyph_InitFunc
+#define FT_Glyph_Done_Func FT_Glyph_DoneFunc
+#define FT_Glyph_Transform_Func FT_Glyph_TransformFunc
+#define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc
+#define FT_Glyph_Copy_Func FT_Glyph_CopyFunc
+#define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc
struct FT_Glyph_Class_
{
- FT_UInt glyph_size;
- FT_Glyph_Format glyph_format;
- FT_Glyph_Init_Func glyph_init;
- FT_Glyph_Done_Func glyph_done;
- FT_Glyph_Copy_Func glyph_copy;
- FT_Glyph_Transform_Func glyph_transform;
- FT_Glyph_BBox_Func glyph_bbox;
- FT_Glyph_Prepare_Func glyph_prepare;
+ FT_UInt glyph_size;
+ FT_Glyph_Format glyph_format;
+ FT_Glyph_InitFunc glyph_init;
+ FT_Glyph_DoneFunc glyph_done;
+ FT_Glyph_CopyFunc glyph_copy;
+ FT_Glyph_TransformFunc glyph_transform;
+ FT_Glyph_GetBBoxFunc glyph_bbox;
+ FT_Glyph_PrepareFunc glyph_prepare;
};
typedef FT_Error
- (*FTRenderer_render)( FT_Renderer renderer,
- FT_GlyphSlot slot,
- FT_UInt mode,
- FT_Vector* origin );
+ (*FT_Renderer_RenderFunc)( FT_Renderer renderer,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin );
typedef FT_Error
- (*FTRenderer_transform)( FT_Renderer renderer,
- FT_GlyphSlot slot,
- FT_Matrix* matrix,
- FT_Vector* delta );
+ (*FT_Renderer_TransformFunc)( FT_Renderer renderer,
+ FT_GlyphSlot slot,
+ FT_Matrix* matrix,
+ FT_Vector* delta );
+
typedef void
- (*FTRenderer_getCBox)( FT_Renderer renderer,
- FT_GlyphSlot slot,
- FT_BBox* cbox );
+ (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer,
+ FT_GlyphSlot slot,
+ FT_BBox* cbox );
+
typedef FT_Error
- (*FTRenderer_setMode)( FT_Renderer renderer,
- FT_ULong mode_tag,
- FT_Pointer mode_ptr );
+ (*FT_Renderer_SetModeFunc)( FT_Renderer renderer,
+ FT_ULong mode_tag,
+ FT_Pointer mode_ptr );
+/* deprecated identifiers */
+#define FTRenderer_render FT_Renderer_RenderFunc
+#define FTRenderer_transform FT_Renderer_TransformFunc
+#define FTRenderer_getCBox FT_Renderer_GetCBoxFunc
+#define FTRenderer_setMode FT_Renderer_SetModeFunc
+
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -117,10 +133,10 @@
/* */
/* set_mode :: A method used to pass additional parameters. */
/* */
- /* raster_class :: For `ft_glyph_format_outline' renderers only, this */
+ /* raster_class :: For `FT_GLYPH_FORMAT_OUTLINE' renderers only, this */
/* is a pointer to its raster's class. */
/* */
- /* raster :: For `ft_glyph_format_outline' renderers only. this */
+ /* raster :: For `FT_GLYPH_FORMAT_OUTLINE' renderers only. this */
/* is a pointer to the corresponding raster object, */
/* if any. */
/* */
@@ -130,12 +146,12 @@
FT_Glyph_Format glyph_format;
- FTRenderer_render render_glyph;
- FTRenderer_transform transform_glyph;
- FTRenderer_getCBox get_glyph_cbox;
- FTRenderer_setMode set_mode;
+ FT_Renderer_RenderFunc render_glyph;
+ FT_Renderer_TransformFunc transform_glyph;
+ FT_Renderer_GetCBoxFunc get_glyph_cbox;
+ FT_Renderer_SetModeFunc set_mode;
- FT_Raster_Funcs* raster_class;
+ FT_Raster_Funcs* raster_class;
} FT_Renderer_Class;
--- a/include/freetype/ftsysio.h
+++ b/include/freetype/ftsysio.h
@@ -93,6 +93,7 @@
typedef FT_Error (*FT_Stream_SeekFunc)( FT_Stream stream,
FT_ULong pos );
+
/********************************************************************
*
* @struct: FT_Stream_ClassRec
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -563,7 +563,7 @@
FT_Raster raster;
FT_Raster_Render_Func raster_render;
- FTRenderer_render render;
+ FT_Renderer_RenderFunc render;
} FT_RendererRec;
@@ -678,7 +678,7 @@
/* shortcut used to avoid parsing the list on */
/* each call to FT_Outline_Render(). It is a */
/* handle to the current renderer for the */
- /* ft_glyph_format_outline format. */
+ /* FT_GLYPH_FORMAT_OUTLINE format. */
/* */
/* auto_hinter :: XXX */
/* */
--- a/include/freetype/ttnameid.h
+++ b/include/freetype/ttnameid.h
@@ -31,34 +31,124 @@
/* Possible values for the `platform' identifier code in the name */
/* records of the TTF `name' table. */
/* */
+
+/***********************************************************************
+ *
+ * @enum:
+ * TT_PLATFORM_XXX
+ *
+ * @description:
+ * a list of valie values for the 'platform_d' identifier code in
+ * @FT_CharmapRec and @FT_SfntName structures
+ *
+ * @values:
+ * TT_PLATFORM_APPLE_UNICODE ::
+ * used by Apple to indicate a Unicode character map and/or name entry.
+ * see @TT_APPLE_ID_XXX for corresponding 'encoding_id' values. Note that
+ * name entries in this format are coded as big-endian UCS-2 character
+ * codes _only_ .
+ *
+ * TT_PLATFORM_MACINTOSH ::
+ * used by Apple to indicate a MacOS-specific charmap and/or name entry.
+ * see @TT_MAC_ID_XXX for corresponding 'encoding_id' values. Note that
+ * most TrueType fonts contain an Apple roman charmap to be usable on
+ * MacOS systems (even when they contain a Microsoft charmap as well)
+ *
+ * TT_PLATFORM_ISO ::
+ * this value was used to specify Unicode charmaps. It is however
+ * now deprecated. See @TT_ISO_ID_XXX for a list of
+ * corresponding 'encoding_id' values
+ *
+ * TT_PLATFORM_MICROSOFT ::
+ * used by Microsoft to indicate Windows-specific charmaps. See
+ * @TT_MS_ID_XXX for a list of corresponding 'encoding_id' values.
+ * note that most fonts contain a Unicode charmap using
+ * ( @@TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS )
+ *
+ * TT_PLATFORM_CUSTOM ::
+ * used to indicate application-specific charmaps.
+ *
+ * TT_PLATFORM_ADOBE ::
+ * this value isn't part of any font format specification, but is used
+ * by FreeType to report Adobe-specific charmaps in a @FT_CharMapRec
+ * structure. See @TT_ADOBE_ID_XXX
+ */
#define TT_PLATFORM_APPLE_UNICODE 0
#define TT_PLATFORM_MACINTOSH 1
#define TT_PLATFORM_ISO 2 /* deprecated */
#define TT_PLATFORM_MICROSOFT 3
#define TT_PLATFORM_CUSTOM 4
+#define TT_PLATFORM_ADOBE 7 /* artificial */
- /* artificial values defined ad-hoc by FreeType */
-#define TT_PLATFORM_ADOBE 7
-
- /*************************************************************************/
- /* */
- /* Possible values of the platform specific encoding identifier field in */
- /* the name records of the TTF `name' table if the `platform' identifier */
- /* code is TT_PLATFORM_APPLE_UNICODE. */
- /* */
+/***********************************************************************
+ *
+ * @enum:
+ * TT_APPLE_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries
+ *
+ * @values:
+ * TT_APPLE_ID_DEFAULT :: Unicode 1.0
+ * TT_APPLE_ID_UNICODE_1_1 :: Unicode 1.1, specifies Hangul at U+34xx
+ * TT_APPLE_ID_ISO_10646 :: deprecated
+ * TT_APPLE_ID_UNICODE_2_0 :: Unicode 2.0 and beyond (UTF-16 BMP only)
+ * TT_APPLE_ID_UNICODE_32 :: UTF-32 (Adobe proposal for OpenType)
+ */
#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */
#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */
#define TT_APPLE_ID_ISO_10646 2 /* deprecated */
#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */
+#define TT_APPLE_ID_UNICODE_32 4 /* Adobe proposal */
- /*************************************************************************/
- /* */
- /* Possible values of the platform specific encoding identifier field in */
- /* the name records of the TTF `name' table if the `platform' identifier */
- /* code is TT_PLATFORM_MACINTOSH. */
- /* */
+/***********************************************************************
+ *
+ * @enum:
+ * TT_MAC_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_MACINTOSH charmaps and name entries
+ *
+ * @values:
+ * TT_MAC_ID_ROMAN ::
+ * TT_MAC_ID_JAPANESE ::
+ * TT_MAC_ID_TRADITIONAL_CHINESE ::
+ * TT_MAC_ID_KOREAN ::
+ * TT_MAC_ID_ARABIC ::
+ * TT_MAC_ID_HEBREW ::
+ * TT_MAC_ID_GREEK ::
+ * TT_MAC_ID_RUSSIAN ::
+ * TT_MAC_ID_RSYMBOL ::
+ * TT_MAC_ID_DEVANAGARI ::
+ * TT_MAC_ID_GURMUKHI ::
+ * TT_MAC_ID_GUJARATI ::
+ * TT_MAC_ID_ORIYA ::
+ * TT_MAC_ID_BENGALI ::
+ * TT_MAC_ID_TAMIL ::
+ * TT_MAC_ID_TELUGU ::
+ * TT_MAC_ID_KANNADA ::
+ * TT_MAC_ID_MALAYALAM ::
+ * TT_MAC_ID_SINHALESE ::
+ * TT_MAC_ID_BURMESE ::
+ * TT_MAC_ID_KHMER ::
+ * TT_MAC_ID_THAI ::
+ * TT_MAC_ID_LAOTIAN ::
+ * TT_MAC_ID_GEORGIAN ::
+ * TT_MAC_ID_ARMENIAN ::
+ * TT_MAC_ID_MALDIVIAN ::
+ * TT_MAC_ID_SIMPLIFIED_CHINESE ::
+ * TT_MAC_ID_TIBETAN ::
+ * TT_MAC_ID_MONGOLIAN ::
+ * TT_MAC_ID_GEEZ ::
+ * TT_MAC_ID_SLAVIC ::
+ * TT_MAC_ID_VIETNAMESE ::
+ * TT_MAC_ID_SINDHI ::
+ * TT_MAC_ID_UNINTERP ::
+ */
#define TT_MAC_ID_ROMAN 0
#define TT_MAC_ID_JAPANESE 1
#define TT_MAC_ID_TRADITIONAL_CHINESE 2
@@ -95,25 +185,67 @@
#define TT_MAC_ID_UNINTERP 32
- /*************************************************************************/
- /* */
- /* Possible values of the platform specific encoding identifier field in */
- /* the name records of the TTF `name' table if the `platform' identifier */
- /* code is TT_PLATFORM_ISO. */
- /* */
- /* This use is now deprecated. */
- /* */
+/***********************************************************************
+ *
+ * @enum:
+ * TT_ISO_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_ISO charmaps and name entries
+ *
+ * their use is now deprecated
+ *
+ * @values:
+ * TT_ISO_ID_7BIT_ASCII :: ASCII
+ * TT_ISO_ID_10646 :: ISO/10646
+ * TT_ISO_ID_8859_1 :: a.k.a. Latin-1
+ */
#define TT_ISO_ID_7BIT_ASCII 0
#define TT_ISO_ID_10646 1
#define TT_ISO_ID_8859_1 2
- /*************************************************************************/
- /* */
- /* possible values of the platform specific encoding identifier field in */
- /* the name records of the TTF `name' table if the `platform' identifier */
- /* code is TT_PLATFORM_MICROSOFT. */
- /* */
+/***********************************************************************
+ *
+ * @enum:
+ * TT_MS_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_MICROSOFT charmaps and name entries
+ *
+ * @values:
+ * TT_MS_ID_SYMBOLS_CS ::
+ * correspond to symbol encodings. see @FT_ENCODING_MS_SYMBOL
+ *
+ * TT_MS_ID_UNICODE_CS ::
+ * correspond to a Microsoft WGL4 charmap, matching Unicode. See
+ * @FT_ENCODING_UNICODE
+ *
+ * TT_MS_ID_SJIS ::
+ * corresponds to Microsoft S-JIS Japanese encoding.
+ * See @FT_ENCODING_MS_SJIS
+ *
+ * TT_MS_ID_GB2312 ::
+ * corresponds to Microsoft Simplified Chinese as used in China. See
+ * @FT_ENCODING_MS_GB2312
+ *
+ * TT_MS_ID_BIG_5 ::
+ * corresponds to Microsoft Simplified Chinese as used in Taiwan and
+ * Hong Kong. See @FT_ENCODING_MS_BIG5
+ *
+ * TT_MS_ID_WANSUNG ::
+ * corresponds to Microsoft Korean Wansung encoding. See
+ * @FT_ENCODING_MS_WANSUNG
+ *
+ * TT_MS_ID_JOHAB ::
+ * corresponds to Microsoft Johab encoding. See @FT_ENCODING_MS_JOHAB
+ *
+ * TT_MS_ID_UCS_4 ::
+ * corresponds to UCS-4 or UTF-32 charmaps. This is a recent Adobe proposal
+ * for OpenType.
+ */
#define TT_MS_ID_SYMBOL_CS 0
#define TT_MS_ID_UNICODE_CS 1
#define TT_MS_ID_SJIS 2
@@ -132,6 +264,20 @@
/* */
/* These are artificial values defined ad-hoc by FreeType. */
/* */
+/***********************************************************************
+ *
+ * @enum:
+ * TT_ADOBE_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific list !!
+ *
+ * @values:
+ * TT_ADOBE_ID_STANDARD :: Adobe standard encoding
+ * TT_ADOBE_ID_EXPERT :: Adobe expert encoding
+ * TT_ADOBE_ID_CUSTOM :: Adobe custom encoding
+ */
#define TT_ADOBE_ID_STANDARD 0
#define TT_ADOBE_ID_EXPERT 1
#define TT_ADOBE_ID_CUSTOM 2
@@ -545,7 +691,7 @@
/* sublanguage > 0x1F. */
#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40a
#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40c
-
+
#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c
#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c
#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845
--- a/src/autohint/ahglobal.c
+++ b/src/autohint/ahglobal.c
@@ -28,7 +28,7 @@
#define MAX_TEST_CHARACTERS 12
static
- const char* blue_chars[ah_blue_max] =
+ const char* blue_chars[AH_BLUE_MAX] =
{
"THEZOCQS",
"HEZLOCUS",
@@ -62,10 +62,10 @@
static FT_Error
- ah_hinter_compute_blues( AH_Hinter* hinter )
+ ah_hinter_compute_blues( AH_Hinter hinter )
{
AH_Blue blue;
- AH_Globals* globals = &hinter->globals->design;
+ AH_Globals globals = &hinter->globals->design;
FT_Pos flats [MAX_TEST_CHARACTERS];
FT_Pos rounds[MAX_TEST_CHARACTERS];
FT_Int num_flats;
@@ -84,7 +84,7 @@
charmap = face->charmap;
/* do we have a Unicode charmap in there? */
- error = FT_Select_Charmap( face, ft_encoding_unicode );
+ error = FT_Select_Charmap( face, FT_ENCODING_UNICODE );
if ( error )
goto Exit;
@@ -95,7 +95,7 @@
AH_LOG(( "blue zones computation\n" ));
AH_LOG(( "------------------------------------------------\n" ));
- for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )
+ for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
{
const char* p = blue_chars[blue];
const char* limit = p + MAX_TEST_CHARACTERS;
@@ -216,8 +216,8 @@
/* now, set the `round' flag depending on the segment's kind */
round = FT_BOOL(
- FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_Curve_Tag_On ||
- FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_Curve_Tag_On );
+ FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_CURVE_TAG_ON ||
+ FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_CURVE_TAG_ON );
AH_LOG(( "%c ", round ? 'r' : 'f' ));
}
@@ -286,13 +286,13 @@
static FT_Error
- ah_hinter_compute_widths( AH_Hinter* hinter )
+ ah_hinter_compute_widths( AH_Hinter hinter )
{
/* scan the array of segments in each direction */
- AH_Outline* outline = hinter->glyph;
- AH_Segment* segments;
- AH_Segment* limit;
- AH_Globals* globals = &hinter->globals->design;
+ AH_Outline outline = hinter->glyph;
+ AH_Segment segments;
+ AH_Segment limit;
+ AH_Globals globals = &hinter->globals->design;
FT_Pos* widths;
FT_Int dimension;
FT_Int* p_num_widths;
@@ -334,8 +334,8 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Segment* seg = segments;
- AH_Segment* link;
+ AH_Segment seg = segments;
+ AH_Segment link;
FT_Int num_widths = 0;
@@ -384,7 +384,7 @@
FT_LOCAL_DEF( FT_Error )
- ah_hinter_compute_globals( AH_Hinter* hinter )
+ ah_hinter_compute_globals( AH_Hinter hinter )
{
return ah_hinter_compute_widths( hinter ) ||
ah_hinter_compute_blues ( hinter );
--- a/src/autohint/ahglobal.h
+++ b/src/autohint/ahglobal.h
@@ -32,13 +32,13 @@
FT_BEGIN_HEADER
-#define AH_IS_TOP_BLUE( b ) ( (b) == ah_blue_capital_top || \
- (b) == ah_blue_small_top )
+#define AH_IS_TOP_BLUE( b ) ( (b) == AH_BLUE_CAPITAL_TOP || \
+ (b) == AH_BLUE_SMALL_TOP )
/* compute global metrics automatically */
FT_LOCAL( FT_Error )
- ah_hinter_compute_globals( AH_Hinter* hinter );
+ ah_hinter_compute_globals( AH_Hinter hinter );
FT_END_HEADER
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -32,11 +32,11 @@
#include <stdio.h>
void
- ah_dump_edges( AH_Outline* outline )
+ ah_dump_edges( AH_Outline outline )
{
- AH_Edge* edges;
- AH_Edge* edge_limit;
- AH_Segment* segments;
+ AH_Edge edges;
+ AH_Edge edge_limit;
+ AH_Segment segments;
FT_Int dimension;
@@ -46,7 +46,7 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Edge* edge;
+ AH_Edge edge;
printf ( "Table of %s edges:\n",
@@ -59,13 +59,13 @@
printf ( " [ %5d | %4d | %5s | %4d | %5d | %c | %5.2f | %5.2f ]\n",
edge - edges,
(int)edge->fpos,
- edge->dir == ah_dir_up
+ edge->dir == AH_DIR_UP
? "up"
- : ( edge->dir == ah_dir_down
+ : ( edge->dir == AH_DIR_DOWN
? "down"
- : ( edge->dir == ah_dir_left
+ : ( edge->dir == AH_DIR_LEFT
? "left"
- : ( edge->dir == ah_dir_right
+ : ( edge->dir == AH_DIR_RIGHT
? "right"
: "none" ) ) ),
edge->link ? ( edge->link - edges ) : -1,
@@ -84,11 +84,11 @@
/* A function used to dump the array of linked segments */
void
- ah_dump_segments( AH_Outline* outline )
+ ah_dump_segments( AH_Outline outline )
{
- AH_Segment* segments;
- AH_Segment* segment_limit;
- AH_Point* points;
+ AH_Segment segments;
+ AH_Segment segment_limit;
+ AH_Point points;
FT_Int dimension;
@@ -98,7 +98,7 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Segment* seg;
+ AH_Segment seg;
printf ( "Table of %s segments:\n",
@@ -111,13 +111,13 @@
printf ( " [ %5d | %4d | %5s | %4d | %5d | %4d | %5d | %5d ]\n",
seg - segments,
(int)seg->pos,
- seg->dir == ah_dir_up
+ seg->dir == AH_DIR_UP
? "up"
- : ( seg->dir == ah_dir_down
+ : ( seg->dir == AH_DIR_DOWN
? "down"
- : ( seg->dir == ah_dir_left
+ : ( seg->dir == AH_DIR_LEFT
? "left"
- : ( seg->dir == ah_dir_right
+ : ( seg->dir == AH_DIR_RIGHT
? "right"
: "none" ) ) ),
seg->link ? (seg->link-segments) : -1,
@@ -145,17 +145,17 @@
FT_Pos ay = ABS( dy );
- dir = ah_dir_none;
+ dir = AH_DIR_NONE;
/* test for vertical direction */
if ( ax * 12 < ay )
{
- dir = dy > 0 ? ah_dir_up : ah_dir_down;
+ dir = dy > 0 ? AH_DIR_UP : AH_DIR_DOWN;
}
/* test for horizontal direction */
else if ( ay * 12 < ax )
{
- dir = dx > 0 ? ah_dir_right : ah_dir_left;
+ dir = dx > 0 ? AH_DIR_RIGHT : AH_DIR_LEFT;
}
return dir;
@@ -209,7 +209,7 @@
/* Compute the orientation of path filling. It differs between TrueType */
- /* and Type1 formats. We could use the `ft_outline_reverse_fill' flag, */
+ /* and Type1 formats. We could use the `FT_OUTLINE_REVERSE_FILL' flag, */
/* but it is better to re-compute it directly (it seems that this flag */
/* isn't correctly set for some weird composite glyphs currently). */
/* */
@@ -298,14 +298,14 @@
/* ah_outline_new */
/* */
/* <Description> */
- /* Creates a new and empty AH_Outline object. */
+ /* Creates a new and empty AH_OutlineRec object. */
/* */
FT_LOCAL_DEF( FT_Error )
ah_outline_new( FT_Memory memory,
- AH_Outline** aoutline )
+ AH_Outline * aoutline )
{
FT_Error error;
- AH_Outline* outline;
+ AH_Outline outline;
if ( !FT_NEW( outline ) )
@@ -324,10 +324,10 @@
/* ah_outline_done */
/* */
/* <Description> */
- /* Destroys a given AH_Outline object. */
+ /* Destroys a given AH_OutlineRec object. */
/* */
FT_LOCAL_DEF( void )
- ah_outline_done( AH_Outline* outline )
+ ah_outline_done( AH_Outline outline )
{
FT_Memory memory = outline->memory;
@@ -347,15 +347,15 @@
/* ah_outline_save */
/* */
/* <Description> */
- /* Saves the content of a given AH_Outline object into a face's glyph */
+ /* Saves the content of a given AH_OutlineRec object into a face's glyph */
/* slot. */
/* */
FT_LOCAL_DEF( void )
- ah_outline_save( AH_Outline* outline,
+ ah_outline_save( AH_Outline outline,
AH_Loader gloader )
{
- AH_Point* point = outline->points;
- AH_Point* point_limit = point + outline->num_points;
+ AH_Point point = outline->points;
+ AH_Point point_limit = point + outline->num_points;
FT_Vector* vec = gloader->current.outline.points;
char* tag = gloader->current.outline.tags;
@@ -366,12 +366,12 @@
vec->x = point->x;
vec->y = point->y;
- if ( point->flags & ah_flag_conic )
- tag[0] = FT_Curve_Tag_Conic;
- else if ( point->flags & ah_flag_cubic )
- tag[0] = FT_Curve_Tag_Cubic;
+ if ( point->flags & AH_FLAG_CONIC )
+ tag[0] = FT_CURVE_TAG_CONIC;
+ else if ( point->flags & AH_FLAG_CUBIC )
+ tag[0] = FT_CURVE_TAG_CUBIC;
else
- tag[0] = FT_Curve_Tag_On;
+ tag[0] = FT_CURVE_TAG_ON;
}
}
@@ -382,11 +382,11 @@
/* ah_outline_load */
/* */
/* <Description> */
- /* Loads an unscaled outline from a glyph slot into an AH_Outline */
+ /* Loads an unscaled outline from a glyph slot into an AH_OutlineRec */
/* object. */
/* */
FT_LOCAL_DEF( FT_Error )
- ah_outline_load( AH_Outline* outline,
+ ah_outline_load( AH_Outline outline,
FT_Face face )
{
FT_Memory memory = outline->memory;
@@ -394,13 +394,13 @@
FT_Outline* source = &face->glyph->outline;
FT_Int num_points = source->n_points;
FT_Int num_contours = source->n_contours;
- AH_Point* points;
+ AH_Point points;
/* check arguments */
if ( !face ||
!face->size ||
- face->glyph->format != ft_glyph_format_outline )
+ face->glyph->format != FT_GLYPH_FORMAT_OUTLINE )
return AH_Err_Invalid_Argument;
/* first of all, reallocate the contours array if necessary */
@@ -450,13 +450,13 @@
/* direction used for a glyph, given that some fonts are broken (e.g. */
/* the Arphic ones). We thus recompute it each time we need to. */
/* */
- outline->vert_major_dir = ah_dir_up;
- outline->horz_major_dir = ah_dir_left;
+ outline->vert_major_dir = AH_DIR_UP;
+ outline->horz_major_dir = AH_DIR_LEFT;
if ( ah_get_orientation( source ) > 1 )
{
- outline->vert_major_dir = ah_dir_down;
- outline->horz_major_dir = ah_dir_right;
+ outline->vert_major_dir = AH_DIR_DOWN;
+ outline->horz_major_dir = AH_DIR_RIGHT;
}
outline->x_scale = face->size->metrics.x_scale;
@@ -469,8 +469,8 @@
{
/* do one thing at a time -- it is easier to understand, and */
/* the code is clearer */
- AH_Point* point;
- AH_Point* point_limit = points + outline->num_points;
+ AH_Point point;
+ AH_Point point_limit = points + outline->num_points;
/* compute coordinates */
@@ -500,10 +500,10 @@
{
switch ( FT_CURVE_TAG( *tag ) )
{
- case FT_Curve_Tag_Conic:
- point->flags = ah_flag_conic; break;
- case FT_Curve_Tag_Cubic:
- point->flags = ah_flag_cubic; break;
+ case FT_CURVE_TAG_CONIC:
+ point->flags = AH_FLAG_CONIC; break;
+ case FT_CURVE_TAG_CUBIC:
+ point->flags = AH_FLAG_CUBIC; break;
default:
;
}
@@ -513,9 +513,9 @@
/* compute `next' and `prev' */
{
FT_Int contour_index;
- AH_Point* prev;
- AH_Point* first;
- AH_Point* end;
+ AH_Point prev;
+ AH_Point first;
+ AH_Point end;
contour_index = 0;
@@ -548,8 +548,8 @@
/* set-up the contours array */
{
- AH_Point** contour = outline->contours;
- AH_Point** contour_limit = contour + outline->num_contours;
+ AH_Point * contour = outline->contours;
+ AH_Point * contour_limit = contour + outline->num_contours;
short* end = source->contours;
short idx = 0;
@@ -565,8 +565,8 @@
{
for ( point = points; point < point_limit; point++ )
{
- AH_Point* prev;
- AH_Point* next;
+ AH_Point prev;
+ AH_Point next;
FT_Vector ivec, ovec;
@@ -583,10 +583,10 @@
point->out_dir = ah_compute_direction( ovec.x, ovec.y );
#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
- if ( point->flags & (ah_flag_conic | ah_flag_cubic) )
+ if ( point->flags & (AH_FLAG_CONIC | AH_FLAG_CUBIC) )
{
Is_Weak_Point:
- point->flags |= ah_flag_weak_interpolation;
+ point->flags |= AH_FLAG_WEAK_INTERPOLATION;
}
else if ( point->out_dir == point->in_dir )
{
@@ -593,7 +593,7 @@
AH_Angle angle_in, angle_out, delta;
- if ( point->out_dir != ah_dir_none )
+ if ( point->out_dir != AH_DIR_NONE )
goto Is_Weak_Point;
angle_in = ah_angle( &ivec );
@@ -622,11 +622,11 @@
FT_LOCAL_DEF( void )
- ah_setup_uv( AH_Outline* outline,
+ ah_setup_uv( AH_Outline outline,
AH_UV source )
{
- AH_Point* point = outline->points;
- AH_Point* point_limit = point + outline->num_points;
+ AH_Point point = outline->points;
+ AH_Point point_limit = point + outline->num_points;
for ( ; point < point_limit; point++ )
@@ -636,31 +636,31 @@
switch ( source )
{
- case ah_uv_fxy:
+ case AH_UV_FXY:
u = point->fx;
v = point->fy;
break;
- case ah_uv_fyx:
+ case AH_UV_FYX:
u = point->fy;
v = point->fx;
break;
- case ah_uv_oxy:
+ case AH_UV_OXY:
u = point->ox;
v = point->oy;
break;
- case ah_uv_oyx:
+ case AH_UV_OYX:
u = point->oy;
v = point->ox;
break;
- case ah_uv_yx:
+ case AH_UV_YX:
u = point->y;
v = point->x;
break;
- case ah_uv_ox:
+ case AH_UV_OX:
u = point->x;
v = point->ox;
break;
- case ah_uv_oy:
+ case AH_UV_OY:
u = point->y;
v = point->oy;
break;
@@ -677,25 +677,25 @@
/* compute all inflex points in a given glyph */
static void
- ah_outline_compute_inflections( AH_Outline* outline )
+ ah_outline_compute_inflections( AH_Outline outline )
{
- AH_Point** contour = outline->contours;
- AH_Point** contour_limit = contour + outline->num_contours;
+ AH_Point * contour = outline->contours;
+ AH_Point * contour_limit = contour + outline->num_contours;
/* load original coordinates in (u,v) */
- ah_setup_uv( outline, ah_uv_fxy );
+ ah_setup_uv( outline, AH_UV_FXY );
/* do each contour separately */
for ( ; contour < contour_limit; contour++ )
{
FT_Vector vec;
- AH_Point* point = contour[0];
- AH_Point* first = point;
- AH_Point* start = point;
- AH_Point* end = point;
- AH_Point* before;
- AH_Point* after;
+ AH_Point point = contour[0];
+ AH_Point first = point;
+ AH_Point start = point;
+ AH_Point end = point;
+ AH_Point before;
+ AH_Point after;
AH_Angle angle_in, angle_seg, angle_out;
AH_Angle diff_in, diff_out;
FT_Int finished = 0;
@@ -770,12 +770,12 @@
do
{
- start->flags |= ah_flag_inflection;
+ start->flags |= AH_FLAG_INFLECTION;
start = start->next;
} while ( start != end );
- start->flags |= ah_flag_inflection;
+ start->flags |= AH_FLAG_INFLECTION;
}
start = end;
@@ -792,10 +792,10 @@
FT_LOCAL_DEF( void )
- ah_outline_compute_segments( AH_Outline* outline )
+ ah_outline_compute_segments( AH_Outline outline )
{
int dimension;
- AH_Segment* segments;
+ AH_Segment segments;
FT_Int* p_num_segments;
AH_Direction segment_dir;
AH_Direction major_dir;
@@ -803,22 +803,22 @@
segments = outline->horz_segments;
p_num_segments = &outline->num_hsegments;
- major_dir = ah_dir_right; /* This value must be positive! */
+ major_dir = AH_DIR_RIGHT; /* This value must be positive! */
segment_dir = major_dir;
/* set up (u,v) in each point */
- ah_setup_uv( outline, ah_uv_fyx );
+ ah_setup_uv( outline, AH_UV_FYX );
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Point** contour = outline->contours;
- AH_Point** contour_limit = contour + outline->num_contours;
- AH_Segment* segment = segments;
+ AH_Point * contour = outline->contours;
+ AH_Point * contour_limit = contour + outline->num_contours;
+ AH_Segment segment = segments;
FT_Int num_segments = 0;
#ifdef AH_HINT_METRICS
- AH_Point* min_point = 0;
- AH_Point* max_point = 0;
+ AH_Point min_point = 0;
+ AH_Point max_point = 0;
FT_Pos min_coord = 32000;
FT_Pos max_coord = -32000;
#endif
@@ -827,8 +827,8 @@
/* do each contour separately */
for ( ; contour < contour_limit; contour++ )
{
- AH_Point* point = contour[0];
- AH_Point* last = point->prev;
+ AH_Point point = contour[0];
+ AH_Point last = point->prev;
int on_edge = 0;
FT_Pos min_pos = +32000; /* minimum segment pos != min_coord */
FT_Pos max_pos = -32000; /* maximum segment pos != max_coord */
@@ -895,8 +895,8 @@
/* a segment is round if either its first or last point */
/* is a control point */
if ( ( segment->first->flags | point->flags ) &
- ah_flag_control )
- segment->flags |= ah_edge_round;
+ AH_FLAG_CONTROL )
+ segment->flags |= AH_EDGE_ROUND;
/* compute segment size */
min_pos = max_pos = point->v;
@@ -934,7 +934,7 @@
FT_ZERO( segment );
segment->dir = segment_dir;
- segment->flags = ah_edge_normal;
+ segment->flags = AH_EDGE_NORMAL;
min_pos = max_pos = point->u;
segment->first = point;
segment->last = point;
@@ -961,8 +961,8 @@
/* we do this by inserting fake segments when needed */
if ( dimension == 0 )
{
- AH_Point* point = outline->points;
- AH_Point* point_limit = point + outline->num_points;
+ AH_Point point = outline->points;
+ AH_Point point_limit = point + outline->num_points;
FT_Pos min_pos = 32000;
FT_Pos max_pos = -32000;
@@ -996,7 +996,7 @@
FT_ZERO( segment );
segment->dir = segment_dir;
- segment->flags = ah_edge_normal;
+ segment->flags = AH_EDGE_NORMAL;
segment->first = min_point;
segment->last = min_point;
segment->pos = min_pos;
@@ -1012,7 +1012,7 @@
FT_ZERO( segment );
segment->dir = segment_dir;
- segment->flags = ah_edge_normal;
+ segment->flags = AH_EDGE_NORMAL;
segment->first = max_point;
segment->last = max_point;
segment->pos = max_pos;
@@ -1026,22 +1026,22 @@
*p_num_segments = num_segments;
segments = outline->vert_segments;
- major_dir = ah_dir_up;
+ major_dir = AH_DIR_UP;
p_num_segments = &outline->num_vsegments;
- ah_setup_uv( outline, ah_uv_fxy );
+ ah_setup_uv( outline, AH_UV_FXY );
}
}
FT_LOCAL_DEF( void )
- ah_outline_link_segments( AH_Outline* outline )
+ ah_outline_link_segments( AH_Outline outline )
{
- AH_Segment* segments;
- AH_Segment* segment_limit;
+ AH_Segment segments;
+ AH_Segment segment_limit;
int dimension;
- ah_setup_uv( outline, ah_uv_fyx );
+ ah_setup_uv( outline, AH_UV_FYX );
segments = outline->horz_segments;
segment_limit = segments + outline->num_hsegments;
@@ -1048,14 +1048,14 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Segment* seg1;
- AH_Segment* seg2;
+ AH_Segment seg1;
+ AH_Segment seg2;
/* now compare each segment to the others */
for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{
FT_Pos best_score;
- AH_Segment* best_segment;
+ AH_Segment best_segment;
/* the fake segments are introduced to hint the metrics -- */
/* we must never link them to anything */
@@ -1105,9 +1105,9 @@
dist = seg2->pos - seg1->pos;
if ( dist < 0 )
dist = -dist;
-
+
score = dist + 3000 / len;
-
+
if ( score < best_score )
{
best_score = score;
@@ -1139,7 +1139,7 @@
}
}
- ah_setup_uv( outline, ah_uv_fxy );
+ ah_setup_uv( outline, AH_UV_FXY );
segments = outline->vert_segments;
segment_limit = segments + outline->num_vsegments;
@@ -1148,11 +1148,11 @@
static void
- ah_outline_compute_edges( AH_Outline* outline )
+ ah_outline_compute_edges( AH_Outline outline )
{
- AH_Edge* edges;
- AH_Segment* segments;
- AH_Segment* segment_limit;
+ AH_Edge edges;
+ AH_Segment segments;
+ AH_Segment segment_limit;
AH_Direction up_dir;
FT_Int* p_num_edges;
FT_Int dimension;
@@ -1164,14 +1164,14 @@
segments = outline->horz_segments;
segment_limit = segments + outline->num_hsegments;
p_num_edges = &outline->num_hedges;
- up_dir = ah_dir_right;
+ up_dir = AH_DIR_RIGHT;
scale = outline->y_scale;
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Edge* edge;
- AH_Edge* edge_limit; /* really == edge + num_edges */
- AH_Segment* seg;
+ AH_Edge edge;
+ AH_Edge edge_limit; /* really == edge + num_edges */
+ AH_Segment seg;
/*********************************************************************/
@@ -1198,7 +1198,7 @@
edge_limit = edges;
for ( seg = segments; seg < segment_limit; seg++ )
{
- AH_Edge* found = 0;
+ AH_Edge found = 0;
/* look for an edge corresponding to the segment */
@@ -1296,7 +1296,7 @@
/* check for roundness of segment */
- if ( seg->flags & ah_edge_round )
+ if ( seg->flags & AH_EDGE_ROUND )
is_round++;
else
is_straight++;
@@ -1313,8 +1313,8 @@
if ( seg->link || is_serif )
{
- AH_Edge* edge2;
- AH_Segment* seg2;
+ AH_Edge edge2;
+ AH_Segment seg2;
edge2 = edge->link;
@@ -1357,13 +1357,13 @@
} while ( seg != edge->first );
/* set the round/straight flags */
- edge->flags = ah_edge_normal;
+ edge->flags = AH_EDGE_NORMAL;
if ( is_round > 0 && is_round >= is_straight )
- edge->flags |= ah_edge_round;
+ edge->flags |= AH_EDGE_ROUND;
/* set the edge's main direction */
- edge->dir = ah_dir_none;
+ edge->dir = AH_DIR_NONE;
if ( ups > downs )
edge->dir = up_dir;
@@ -1386,7 +1386,7 @@
segments = outline->vert_segments;
segment_limit = segments + outline->num_vsegments;
p_num_edges = &outline->num_vedges;
- up_dir = ah_dir_up;
+ up_dir = AH_DIR_UP;
scale = outline->x_scale;
}
}
@@ -1398,10 +1398,10 @@
/* ah_outline_detect_features */
/* */
/* <Description> */
- /* Performs feature detection on a given AH_Outline object. */
+ /* Performs feature detection on a given AH_OutlineRec object. */
/* */
FT_LOCAL_DEF( void )
- ah_outline_detect_features( AH_Outline* outline )
+ ah_outline_detect_features( AH_Outline outline )
{
ah_outline_compute_segments ( outline );
ah_outline_link_segments ( outline );
@@ -1420,15 +1420,15 @@
/* be snapped to a blue zone edge (top or bottom). */
/* */
FT_LOCAL_DEF( void )
- ah_outline_compute_blue_edges( AH_Outline* outline,
- AH_Face_Globals* face_globals )
+ ah_outline_compute_blue_edges( AH_Outline outline,
+ AH_Face_Globals face_globals )
{
- AH_Edge* edge = outline->horz_edges;
- AH_Edge* edge_limit = edge + outline->num_hedges;
- AH_Globals* globals = &face_globals->design;
+ AH_Edge edge = outline->horz_edges;
+ AH_Edge edge_limit = edge + outline->num_hedges;
+ AH_Globals globals = &face_globals->design;
FT_Fixed y_scale = outline->y_scale;
- FT_Bool blue_active[ah_blue_max];
+ FT_Bool blue_active[AH_BLUE_MAX];
/* compute which blue zones are active, i.e. have their scaled */
@@ -1438,7 +1438,7 @@
FT_Bool check = 0;
- for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )
+ for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
{
FT_Pos ref, shoot, dist;
@@ -1476,7 +1476,7 @@
if ( best_dist > 64 / 4 )
best_dist = 64 / 4;
- for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )
+ for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
{
/* if it is a top zone, check for right edges -- if it is a bottom */
/* zone, check for left edges */
@@ -1514,7 +1514,7 @@
/* now, compare it to the overshoot position if the edge is */
/* rounded, and if the edge is over the reference position of a */
/* top zone, or under the reference position of a bottom zone */
- if ( edge->flags & ah_edge_round && dist != 0 )
+ if ( edge->flags & AH_EDGE_ROUND && dist != 0 )
{
FT_Bool is_under_ref = FT_BOOL( edge->fpos < *blue_pos );
@@ -1554,11 +1554,11 @@
/* edge' pointer from `design units' to `scaled ones'). */
/* */
FT_LOCAL_DEF( void )
- ah_outline_scale_blue_edges( AH_Outline* outline,
- AH_Face_Globals* globals )
+ ah_outline_scale_blue_edges( AH_Outline outline,
+ AH_Face_Globals globals )
{
- AH_Edge* edge = outline->horz_edges;
- AH_Edge* edge_limit = edge + outline->num_hedges;
+ AH_Edge edge = outline->horz_edges;
+ AH_Edge edge_limit = edge + outline->num_hedges;
FT_Int delta;
--- a/src/autohint/ahglyph.h
+++ b/src/autohint/ahglyph.h
@@ -33,56 +33,56 @@
typedef enum AH_UV_
{
- ah_uv_fxy,
- ah_uv_fyx,
- ah_uv_oxy,
- ah_uv_oyx,
- ah_uv_ox,
- ah_uv_oy,
- ah_uv_yx,
- ah_uv_xy /* should always be last! */
+ AH_UV_FXY,
+ AH_UV_FYX,
+ AH_UV_OXY,
+ AH_UV_OYX,
+ AH_UV_OX,
+ AH_UV_OY,
+ AH_UV_YX,
+ AH_UV_XY /* should always be last! */
} AH_UV;
FT_LOCAL( void )
- ah_setup_uv( AH_Outline* outline,
+ ah_setup_uv( AH_Outline outline,
AH_UV source );
- /* AH_Outline functions - they should be typically called in this order */
+ /* AH_OutlineRec functions - they should be typically called in this order */
FT_LOCAL( FT_Error )
ah_outline_new( FT_Memory memory,
- AH_Outline** aoutline );
+ AH_Outline * aoutline );
FT_LOCAL( FT_Error )
- ah_outline_load( AH_Outline* outline,
+ ah_outline_load( AH_Outline outline,
FT_Face face );
FT_LOCAL( void )
- ah_outline_compute_segments( AH_Outline* outline );
+ ah_outline_compute_segments( AH_Outline outline );
FT_LOCAL( void )
- ah_outline_link_segments( AH_Outline* outline );
+ ah_outline_link_segments( AH_Outline outline );
FT_LOCAL( void )
- ah_outline_detect_features( AH_Outline* outline );
+ ah_outline_detect_features( AH_Outline outline );
FT_LOCAL( void )
- ah_outline_compute_blue_edges( AH_Outline* outline,
- AH_Face_Globals* globals );
+ ah_outline_compute_blue_edges( AH_Outline outline,
+ AH_Face_Globals globals );
FT_LOCAL( void )
- ah_outline_scale_blue_edges( AH_Outline* outline,
- AH_Face_Globals* globals );
+ ah_outline_scale_blue_edges( AH_Outline outline,
+ AH_Face_Globals globals );
FT_LOCAL( void )
- ah_outline_save( AH_Outline* outline,
+ ah_outline_save( AH_Outline outline,
AH_Loader loader );
FT_LOCAL( void )
- ah_outline_done( AH_Outline* outline );
+ ah_outline_done( AH_Outline outline );
FT_END_HEADER
--- a/src/autohint/ahhint.c
+++ b/src/autohint/ahhint.c
@@ -27,7 +27,7 @@
#include FT_OUTLINE_H
-#define FACE_GLOBALS( face ) ((AH_Face_Globals*)(face)->autohint.data)
+#define FACE_GLOBALS( face ) ((AH_Face_Globals )(face)->autohint.data)
#define AH_USE_IUP
#define OPTIM_STEM_SNAP
@@ -90,11 +90,11 @@
/* compute the snapped width of a given stem */
static FT_Pos
- ah_compute_stem_width( AH_Hinter* hinter,
+ ah_compute_stem_width( AH_Hinter hinter,
int vertical,
FT_Pos width )
{
- AH_Globals* globals = &hinter->globals->scaled;
+ AH_Globals globals = &hinter->globals->scaled;
FT_Pos dist = width;
FT_Int sign = 0;
@@ -159,7 +159,7 @@
{
dist = ah_snap_width( globals->widths, globals->num_widths, dist );
- if ( hinter->flags & ah_hinter_monochrome )
+ if ( hinter->flags & AH_HINTER_MONOCHROME )
{
/* monochrome horizontal hinting: snap widths to integer pixels */
/* with a different threshold */
@@ -194,9 +194,9 @@
/* align one stem edge relative to the previous stem edge */
static void
- ah_align_linked_edge( AH_Hinter* hinter,
- AH_Edge* base_edge,
- AH_Edge* stem_edge,
+ ah_align_linked_edge( AH_Hinter hinter,
+ AH_Edge base_edge,
+ AH_Edge stem_edge,
int vertical )
{
FT_Pos dist = stem_edge->opos - base_edge->opos;
@@ -208,9 +208,9 @@
static void
- ah_align_serif_edge( AH_Hinter* hinter,
- AH_Edge* base,
- AH_Edge* serif,
+ ah_align_serif_edge( AH_Hinter hinter,
+ AH_Edge base,
+ AH_Edge serif,
int vertical )
{
FT_Pos dist;
@@ -231,7 +231,7 @@
dist = 32;
#else
/* do not strengthen serifs */
- if ( base->flags & ah_edge_done )
+ if ( base->flags & AH_EDGE_DONE )
{
if ( dist >= 64 )
dist = (dist+8) & -64;
@@ -260,11 +260,11 @@
/* Another alternative edge hinting algorithm */
static void
- ah_hint_edges_3( AH_Hinter* hinter )
+ ah_hint_edges_3( AH_Hinter hinter )
{
- AH_Edge* edges;
- AH_Edge* edge_limit;
- AH_Outline* outline = hinter->glyph;
+ AH_Edge edges;
+ AH_Edge edge_limit;
+ AH_Outline outline = hinter->glyph;
FT_Int dimension;
@@ -273,8 +273,8 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Edge* edge;
- AH_Edge* anchor = 0;
+ AH_Edge edge;
+ AH_Edge anchor = 0;
int has_serifs = 0;
@@ -291,10 +291,10 @@
for ( edge = edges; edge < edge_limit; edge++ )
{
FT_Pos* blue;
- AH_Edge *edge1, *edge2;
+ AH_EdgeRec *edge1, *edge2;
- if ( edge->flags & ah_edge_done )
+ if ( edge->flags & AH_EDGE_DONE )
continue;
blue = edge->blue_edge;
@@ -316,12 +316,12 @@
continue;
edge1->pos = blue[0];
- edge1->flags |= ah_edge_done;
+ edge1->flags |= AH_EDGE_DONE;
if ( edge2 && !edge2->blue_edge )
{
ah_align_linked_edge( hinter, edge1, edge2, dimension );
- edge2->flags |= ah_edge_done;
+ edge2->flags |= AH_EDGE_DONE;
}
if ( !anchor )
@@ -333,10 +333,10 @@
/* relative order of stems in the glyph.. */
for ( edge = edges; edge < edge_limit; edge++ )
{
- AH_Edge *edge2;
+ AH_EdgeRec *edge2;
- if ( edge->flags & ah_edge_done )
+ if ( edge->flags & AH_EDGE_DONE )
continue;
/* skip all non-stem edges */
@@ -359,7 +359,7 @@
#endif
ah_align_linked_edge( hinter, edge2, edge, dimension );
- edge->flags |= ah_edge_done;
+ edge->flags |= AH_EDGE_DONE;
continue;
}
@@ -374,7 +374,7 @@
edge->pos = ( edge->opos + 32 ) & -64;
anchor = edge;
- edge->flags |= ah_edge_done;
+ edge->flags |= AH_EDGE_DONE;
ah_align_linked_edge( hinter, edge, edge2, dimension );
}
@@ -403,8 +403,8 @@
edge->pos = ( delta1 <= delta2 ) ? cur_pos1 : cur_pos2;
edge2->pos = edge->pos + cur_len;
- edge->flags |= ah_edge_done;
- edge2->flags |= ah_edge_done;
+ edge->flags |= AH_EDGE_DONE;
+ edge2->flags |= AH_EDGE_DONE;
if ( edge > edges && edge->pos < edge[-1].pos )
edge->pos = edge[-1].pos;
@@ -412,7 +412,7 @@
#if 0
delta = 0;
if ( edge2 + 1 < edge_limit &&
- edge2[1].flags & ah_edge_done )
+ edge2[1].flags & AH_EDGE_DONE )
delta = edge2[1].pos - edge2->pos;
if ( delta < 0 )
@@ -421,7 +421,7 @@
if ( !min )
edge->pos += delta;
}
- edge2->flags |= ah_edge_done;
+ edge2->flags |= AH_EDGE_DONE;
#endif
}
}
@@ -434,7 +434,7 @@
/* to complete our processing */
for ( edge = edges; edge < edge_limit; edge++ )
{
- if ( edge->flags & ah_edge_done )
+ if ( edge->flags & AH_EDGE_DONE )
continue;
if ( edge->serif )
@@ -448,13 +448,13 @@
edge->pos = anchor->pos +
( ( edge->opos-anchor->opos + 32 ) & -64 );
- edge->flags |= ah_edge_done;
+ edge->flags |= AH_EDGE_DONE;
if ( edge > edges && edge->pos < edge[-1].pos )
edge->pos = edge[-1].pos;
if ( edge + 1 < edge_limit &&
- edge[1].flags & ah_edge_done &&
+ edge[1].flags & AH_EDGE_DONE &&
edge->pos > edge[1].pos )
edge->pos = edge[1].pos;
}
@@ -467,7 +467,7 @@
FT_LOCAL_DEF( void )
- ah_hinter_hint_edges( AH_Hinter* hinter,
+ ah_hinter_hint_edges( AH_Hinter hinter,
FT_Bool no_horz_edges,
FT_Bool no_vert_edges )
{
@@ -486,7 +486,7 @@
#if 0
/* outline optimizer removed temporarily */
- if ( hinter->flags & ah_hinter_optimize )
+ if ( hinter->flags & AH_HINTER_OPTIMIZE )
{
AH_Optimizer opt;
@@ -514,11 +514,11 @@
/*************************************************************************/
static void
- ah_hinter_align_edge_points( AH_Hinter* hinter )
+ ah_hinter_align_edge_points( AH_Hinter hinter )
{
- AH_Outline* outline = hinter->glyph;
- AH_Edge* edges;
- AH_Edge* edge_limit;
+ AH_Outline outline = hinter->glyph;
+ AH_Edge edges;
+ AH_Edge edge_limit;
FT_Int dimension;
@@ -527,7 +527,7 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Edge* edge;
+ AH_Edge edge;
edge = edges;
@@ -535,12 +535,12 @@
{
/* move the points of each segment */
/* in each edge to the edge's position */
- AH_Segment* seg = edge->first;
+ AH_Segment seg = edge->first;
do
{
- AH_Point* point = seg->first;
+ AH_Point point = seg->first;
for (;;)
@@ -548,12 +548,12 @@
if ( dimension )
{
point->y = edge->pos;
- point->flags |= ah_flag_touch_y;
+ point->flags |= AH_FLAG_TOUCH_Y;
}
else
{
point->x = edge->pos;
- point->flags |= ah_flag_touch_x;
+ point->flags |= AH_FLAG_TOUCH_X;
}
if ( point == seg->last )
@@ -575,14 +575,14 @@
/* hint the strong points -- this is equivalent to the TrueType `IP' */
static void
- ah_hinter_align_strong_points( AH_Hinter* hinter )
+ ah_hinter_align_strong_points( AH_Hinter hinter )
{
- AH_Outline* outline = hinter->glyph;
+ AH_Outline outline = hinter->glyph;
FT_Int dimension;
- AH_Edge* edges;
- AH_Edge* edge_limit;
- AH_Point* points;
- AH_Point* point_limit;
+ AH_Edge edges;
+ AH_Edge edge_limit;
+ AH_Point points;
+ AH_Point point_limit;
AH_Flags touch_flag;
@@ -591,12 +591,12 @@
edges = outline->horz_edges;
edge_limit = edges + outline->num_hedges;
- touch_flag = ah_flag_touch_y;
+ touch_flag = AH_FLAG_TOUCH_Y;
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Point* point;
- AH_Edge* edge;
+ AH_Point point;
+ AH_Edge edge;
if ( edges < edge_limit )
@@ -612,8 +612,8 @@
#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
/* if this point is candidate to weak interpolation, we will */
/* interpolate it after all strong points have been processed */
- if ( ( point->flags & ah_flag_weak_interpolation ) &&
- !( point->flags & ah_flag_inflection ) )
+ if ( ( point->flags & AH_FLAG_WEAK_INTERPOLATION ) &&
+ !( point->flags & AH_FLAG_INFLECTION ) )
continue;
#endif
@@ -650,8 +650,8 @@
/* otherwise, interpolate the point in between */
{
- AH_Edge* before = 0;
- AH_Edge* after = 0;
+ AH_Edge before = 0;
+ AH_Edge after = 0;
for ( edge = edges; edge < edge_limit; edge++ )
@@ -697,7 +697,7 @@
edges = outline->vert_edges;
edge_limit = edges + outline->num_vedges;
- touch_flag = ah_flag_touch_x;
+ touch_flag = AH_FLAG_TOUCH_X;
}
}
@@ -705,11 +705,11 @@
#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
static void
- ah_iup_shift( AH_Point* p1,
- AH_Point* p2,
- AH_Point* ref )
+ ah_iup_shift( AH_Point p1,
+ AH_Point p2,
+ AH_Point ref )
{
- AH_Point* p;
+ AH_Point p;
FT_Pos delta = ref->u - ref->v;
@@ -722,12 +722,12 @@
static void
- ah_iup_interp( AH_Point* p1,
- AH_Point* p2,
- AH_Point* ref1,
- AH_Point* ref2 )
+ ah_iup_interp( AH_Point p1,
+ AH_Point p2,
+ AH_Point ref1,
+ AH_Point ref2 )
{
- AH_Point* p;
+ AH_Point p;
FT_Pos u;
FT_Pos v1 = ref1->v;
FT_Pos v2 = ref2->v;
@@ -791,13 +791,13 @@
/* interpolate weak points -- this is equivalent to the TrueType `IUP' */
static void
- ah_hinter_align_weak_points( AH_Hinter* hinter )
+ ah_hinter_align_weak_points( AH_Hinter hinter )
{
- AH_Outline* outline = hinter->glyph;
+ AH_Outline outline = hinter->glyph;
FT_Int dimension;
- AH_Point* points;
- AH_Point* point_limit;
- AH_Point** contour_limit;
+ AH_Point points;
+ AH_Point point_limit;
+ AH_Point * contour_limit;
AH_Flags touch_flag;
@@ -806,18 +806,18 @@
/* PASS 1: Move segment points to edge positions */
- touch_flag = ah_flag_touch_y;
+ touch_flag = AH_FLAG_TOUCH_Y;
contour_limit = outline->contours + outline->num_contours;
- ah_setup_uv( outline, ah_uv_oy );
+ ah_setup_uv( outline, AH_UV_OY );
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Point* point;
- AH_Point* end_point;
- AH_Point* first_point;
- AH_Point** contour;
+ AH_Point point;
+ AH_Point end_point;
+ AH_Point first_point;
+ AH_Point * contour;
point = points;
@@ -834,8 +834,8 @@
if ( point <= end_point )
{
- AH_Point* first_touched = point;
- AH_Point* cur_touched = point;
+ AH_Point first_touched = point;
+ AH_Point cur_touched = point;
point++;
@@ -880,8 +880,8 @@
for ( point = points; point < point_limit; point++ )
point->y = point->u;
- touch_flag = ah_flag_touch_x;
- ah_setup_uv( outline, ah_uv_ox );
+ touch_flag = AH_FLAG_TOUCH_X;
+ ah_setup_uv( outline, AH_UV_OX );
}
else
{
@@ -897,7 +897,7 @@
FT_LOCAL_DEF( void )
- ah_hinter_align_points( AH_Hinter* hinter )
+ ah_hinter_align_points( AH_Hinter hinter )
{
ah_hinter_align_edge_points( hinter );
@@ -924,14 +924,14 @@
/* scale and fit the global metrics */
static void
- ah_hinter_scale_globals( AH_Hinter* hinter,
+ ah_hinter_scale_globals( AH_Hinter hinter,
FT_Fixed x_scale,
FT_Fixed y_scale )
{
FT_Int n;
- AH_Face_Globals* globals = hinter->globals;
- AH_Globals* design = &globals->design;
- AH_Globals* scaled = &globals->scaled;
+ AH_Face_Globals globals = hinter->globals;
+ AH_Globals design = &globals->design;
+ AH_Globals scaled = &globals->scaled;
/* copy content */
@@ -948,7 +948,7 @@
scaled->stds[1] = ( design->num_heights > 0 ) ? scaled->heights[0] : 32000;
/* scale the blue zones */
- for ( n = 0; n < ah_blue_max; n++ )
+ for ( n = 0; n < AH_BLUE_MAX; n++ )
{
FT_Pos delta, delta2;
@@ -980,7 +980,7 @@
static void
- ah_hinter_align( AH_Hinter* hinter )
+ ah_hinter_align( AH_Hinter hinter )
{
ah_hinter_align_edge_points( hinter );
ah_hinter_align_points( hinter );
@@ -989,7 +989,7 @@
/* finalize a hinter object */
FT_LOCAL_DEF( void )
- ah_hinter_done( AH_Hinter* hinter )
+ ah_hinter_done( AH_Hinter hinter )
{
if ( hinter )
{
@@ -1013,9 +1013,9 @@
/* create a new empty hinter object */
FT_LOCAL_DEF( FT_Error )
ah_hinter_new( FT_Library library,
- AH_Hinter** ahinter )
+ AH_Hinter* ahinter )
{
- AH_Hinter* hinter = 0;
+ AH_Hinter hinter = 0;
FT_Memory memory = library->memory;
FT_Error error;
@@ -1048,13 +1048,13 @@
/* create a face's autohint globals */
FT_LOCAL_DEF( FT_Error )
- ah_hinter_new_face_globals( AH_Hinter* hinter,
+ ah_hinter_new_face_globals( AH_Hinter hinter,
FT_Face face,
- AH_Globals* globals )
+ AH_Globals globals )
{
FT_Error error;
FT_Memory memory = hinter->memory;
- AH_Face_Globals* face_globals;
+ AH_Face_Globals face_globals;
if ( FT_NEW( face_globals ) )
@@ -1080,7 +1080,7 @@
/* discard a face's autohint globals */
FT_LOCAL_DEF( void )
- ah_hinter_done_face_globals( AH_Face_Globals* globals )
+ ah_hinter_done_face_globals( AH_Face_Globals globals )
{
FT_Face face = globals->face;
FT_Memory memory = face->memory;
@@ -1091,7 +1091,7 @@
static FT_Error
- ah_hinter_load( AH_Hinter* hinter,
+ ah_hinter_load( AH_Hinter hinter,
FT_UInt glyph_index,
FT_UInt load_flags,
FT_UInt depth )
@@ -1102,7 +1102,7 @@
FT_Fixed x_scale = face->size->metrics.x_scale;
FT_Fixed y_scale = face->size->metrics.y_scale;
FT_Error error;
- AH_Outline* outline = hinter->glyph;
+ AH_Outline outline = hinter->glyph;
AH_Loader gloader = hinter->loader;
FT_Bool no_horz_hints = FT_BOOL(
( load_flags & AH_HINT_NO_HORZ_EDGES ) != 0 );
@@ -1137,7 +1137,7 @@
switch ( slot->format )
{
- case ft_glyph_format_outline:
+ case FT_GLYPH_FORMAT_OUTLINE:
/* translate glyph outline if we need to */
if ( hinter->transformed )
@@ -1208,8 +1208,8 @@
/* width/positioning that occured during the hinting process */
{
FT_Pos old_advance, old_rsb, old_lsb, new_lsb;
- AH_Edge* edge1 = outline->vert_edges; /* leftmost edge */
- AH_Edge* edge2 = edge1 +
+ AH_Edge edge1 = outline->vert_edges; /* leftmost edge */
+ AH_Edge edge2 = edge1 +
outline->num_vedges - 1; /* rightmost edge */
@@ -1230,7 +1230,7 @@
ah_loader_add( gloader );
break;
- case ft_glyph_format_composite:
+ case FT_GLYPH_FORMAT_COMPOSITE:
{
FT_UInt nn, num_subglyphs = slot->num_subglyphs;
FT_UInt num_base_subgs, start_point;
@@ -1407,7 +1407,7 @@
goto Exit;
slot->outline = slot->internal->loader->base.outline;
- slot->format = ft_glyph_format_outline;
+ slot->format = FT_GLYPH_FORMAT_OUTLINE;
}
#ifdef DEBUG_HINTER
@@ -1421,7 +1421,7 @@
/* load and hint a given glyph */
FT_LOCAL_DEF( FT_Error )
- ah_hinter_load_glyph( AH_Hinter* hinter,
+ ah_hinter_load_glyph( AH_Hinter hinter,
FT_GlyphSlot slot,
FT_Size size,
FT_UInt glyph_index,
@@ -1431,7 +1431,7 @@
FT_Error error;
FT_Fixed x_scale = size->metrics.x_scale;
FT_Fixed y_scale = size->metrics.y_scale;
- AH_Face_Globals* face_globals = FACE_GLOBALS( face );
+ AH_Face_Globals face_globals = FACE_GLOBALS( face );
/* first of all, we need to check that we're using the correct face and */
@@ -1475,12 +1475,12 @@
/* retrieve a face's autohint globals for client applications */
FT_LOCAL_DEF( void )
- ah_hinter_get_global_hints( AH_Hinter* hinter,
+ ah_hinter_get_global_hints( AH_Hinter hinter,
FT_Face face,
void** global_hints,
long* global_len )
{
- AH_Globals* globals = 0;
+ AH_Globals globals = 0;
FT_Memory memory = hinter->memory;
FT_Error error;
@@ -1512,7 +1512,7 @@
FT_LOCAL_DEF( void )
- ah_hinter_done_global_hints( AH_Hinter* hinter,
+ ah_hinter_done_global_hints( AH_Hinter hinter,
void* global_hints )
{
FT_Memory memory = hinter->memory;
--- a/src/autohint/ahhint.h
+++ b/src/autohint/ahhint.h
@@ -39,11 +39,11 @@
/* create a new empty hinter object */
FT_LOCAL( FT_Error )
ah_hinter_new( FT_Library library,
- AH_Hinter** ahinter );
+ AH_Hinter* ahinter );
/* Load a hinted glyph in the hinter */
FT_LOCAL( FT_Error )
- ah_hinter_load_glyph( AH_Hinter* hinter,
+ ah_hinter_load_glyph( AH_Hinter hinter,
FT_GlyphSlot slot,
FT_Size size,
FT_UInt glyph_index,
@@ -51,20 +51,20 @@
/* finalize a hinter object */
FT_LOCAL( void )
- ah_hinter_done( AH_Hinter* hinter );
+ ah_hinter_done( AH_Hinter hinter );
FT_LOCAL( void )
- ah_hinter_done_face_globals( AH_Face_Globals* globals );
+ ah_hinter_done_face_globals( AH_Face_Globals globals );
FT_LOCAL( void )
- ah_hinter_get_global_hints( AH_Hinter* hinter,
+ ah_hinter_get_global_hints( AH_Hinter hinter,
FT_Face face,
void** global_hints,
long* global_len );
FT_LOCAL( void )
- ah_hinter_done_global_hints( AH_Hinter* hinter,
- void* global_hints );
+ ah_hinter_done_global_hints( AH_Hinter hinter,
+ void* global_hints );
FT_END_HEADER
--- a/src/autohint/ahmodule.c
+++ b/src/autohint/ahmodule.c
@@ -25,7 +25,7 @@
#ifdef DEBUG_HINTER
- AH_Hinter* ah_debug_hinter = NULL;
+ AH_Hinter ah_debug_hinter = NULL;
FT_Bool ah_debug_disable_horz = 0;
FT_Bool ah_debug_disable_vert = 0;
#endif
@@ -33,7 +33,7 @@
typedef struct FT_AutoHinterRec_
{
FT_ModuleRec root;
- AH_Hinter* hinter;
+ AH_Hinter hinter;
} FT_AutoHinterRec;
@@ -83,7 +83,7 @@
FT_UNUSED( module );
if ( face->autohint.data )
- ah_hinter_done_face_globals( (AH_Face_Globals*)(face->autohint.data) );
+ ah_hinter_done_face_globals( (AH_Face_Globals )(face->autohint.data) );
}
--- a/src/autohint/ahoptim.c
+++ b/src/autohint/ahoptim.c
@@ -157,8 +157,8 @@
static int
- valid_stem_segments( AH_Segment* seg1,
- AH_Segment* seg2 )
+ valid_stem_segments( AH_Segment seg1,
+ AH_Segment seg2 )
{
return seg1->serif == 0 &&
seg2 &&
@@ -173,13 +173,13 @@
static int
optim_compute_stems( AH_Optimizer* optimizer )
{
- AH_Outline* outline = optimizer->outline;
+ AH_Outline outline = optimizer->outline;
FT_Fixed scale;
FT_Memory memory = optimizer->memory;
FT_Error error = 0;
FT_Int dimension;
- AH_Edge* edges;
- AH_Edge* edge_limit;
+ AH_Edge edges;
+ AH_Edge edge_limit;
AH_Stem** p_stems;
FT_Int* p_num_stems;
@@ -195,13 +195,13 @@
{
AH_Stem* stems = 0;
FT_Int num_stems = 0;
- AH_Edge* edge;
+ AH_Edge edge;
/* first of all, count the number of stems in this direction */
for ( edge = edges; edge < edge_limit; edge++ )
{
- AH_Segment* seg = edge->first;
+ AH_Segment seg = edge->first;
do
@@ -226,8 +226,8 @@
stem = stems;
for ( edge = edges; edge < edge_limit; edge++ )
{
- AH_Segment* seg = edge->first;
- AH_Segment* seg2;
+ AH_Segment seg = edge->first;
+ AH_Segment seg2;
do
@@ -235,8 +235,8 @@
seg2 = seg->link;
if ( valid_stem_segments( seg, seg2 ) )
{
- AH_Edge* edge1 = seg->edge;
- AH_Edge* edge2 = seg2->edge;
+ AH_Edge edge1 = seg->edge;
+ AH_Edge edge2 = seg2->edge;
stem->edge1 = edge1;
@@ -721,8 +721,8 @@
stem->edge1->pos = pos;
stem->edge2->pos = pos + stem->width;
- stem->edge1->flags |= ah_edge_done;
- stem->edge2->flags |= ah_edge_done;
+ stem->edge1->flags |= AH_EDGE_DONE;
+ stem->edge2->flags |= AH_EDGE_DONE;
}
}
@@ -768,8 +768,8 @@
stem->edge1->pos = pos;
stem->edge2->pos = pos + stem->width;
- stem->edge1->flags |= ah_edge_done;
- stem->edge2->flags |= ah_edge_done;
+ stem->edge1->flags |= AH_EDGE_DONE;
+ stem->edge2->flags |= AH_EDGE_DONE;
}
}
@@ -808,7 +808,7 @@
/* loads the outline into the optimizer */
int
AH_Optimizer_Init( AH_Optimizer* optimizer,
- AH_Outline* outline,
+ AH_Outline outline,
FT_Memory memory )
{
FT_Error error;
--- a/src/autohint/ahoptim.h
+++ b/src/autohint/ahoptim.h
@@ -45,8 +45,8 @@
FT_Pos min_pos; /* minimum grid position */
FT_Pos max_pos; /* maximum grid position */
- AH_Edge* edge1; /* left/bottom edge */
- AH_Edge* edge2; /* right/top edge */
+ AH_Edge edge1; /* left/bottom edge */
+ AH_Edge edge2; /* right/top edge */
FT_Pos opos; /* original position */
FT_Pos owidth; /* original width */
@@ -81,7 +81,7 @@
typedef struct AH_Optimizer_
{
FT_Memory memory;
- AH_Outline* outline;
+ AH_Outline outline;
FT_Int num_hstems;
AH_Stem* horz_stems;
@@ -115,7 +115,7 @@
/* loads the outline into the optimizer */
int
AH_Optimizer_Init( AH_Optimizer* optimizer,
- AH_Outline* outline,
+ AH_Outline outline,
FT_Memory memory );
--- a/src/autohint/ahtypes.h
+++ b/src/autohint/ahtypes.h
@@ -126,37 +126,37 @@
/* hint flags */
-#define ah_flag_none 0
+#define AH_FLAG_NONE 0
/* bezier control points flags */
-#define ah_flag_conic 1
-#define ah_flag_cubic 2
-#define ah_flag_control ( ah_flag_conic | ah_flag_cubic )
+#define AH_FLAG_CONIC 1
+#define AH_FLAG_CUBIC 2
+#define AH_FLAG_CONTROL ( AH_FLAG_CONIC | AH_FLAG_CUBIC )
/* extrema flags */
-#define ah_flag_extrema_x 4
-#define ah_flag_extrema_y 8
+#define AH_FLAG_EXTREMA_X 4
+#define AH_FLAG_EXTREMA_Y 8
/* roundness */
-#define ah_flag_round_x 16
-#define ah_flag_round_y 32
+#define AH_FLAG_ROUND_X 16
+#define AH_FLAG_ROUND_Y 32
/* touched */
-#define ah_flag_touch_x 64
-#define ah_flag_touch_y 128
+#define AH_FLAG_TOUCH_X 64
+#define AH_FLAG_TOUCH_Y 128
/* weak interpolation */
-#define ah_flag_weak_interpolation 256
-#define ah_flag_inflection 512
+#define AH_FLAG_WEAK_INTERPOLATION 256
+#define AH_FLAG_INFLECTION 512
typedef FT_Int AH_Flags;
/* edge hint flags */
-#define ah_edge_normal 0
-#define ah_edge_round 1
-#define ah_edge_serif 2
-#define ah_edge_done 4
+#define AH_EDGE_NORMAL 0
+#define AH_EDGE_ROUND 1
+#define AH_EDGE_SERIF 2
+#define AH_EDGE_DONE 4
typedef FT_Int AH_Edge_Flags;
@@ -163,27 +163,27 @@
/* hint directions -- the values are computed so that two vectors are */
/* in opposite directions iff `dir1+dir2 == 0' */
-#define ah_dir_none 4
-#define ah_dir_right 1
-#define ah_dir_left -1
-#define ah_dir_up 2
-#define ah_dir_down -2
+#define AH_DIR_NONE 4
+#define AH_DIR_RIGHT 1
+#define AH_DIR_LEFT -1
+#define AH_DIR_UP 2
+#define AH_DIR_DOWN -2
typedef FT_Int AH_Direction;
- typedef struct AH_Point AH_Point;
- typedef struct AH_Segment AH_Segment;
- typedef struct AH_Edge AH_Edge;
+ typedef struct AH_PointRec_* AH_Point;
+ typedef struct AH_SegmentRec_* AH_Segment;
+ typedef struct AH_EdgeRec_* AH_Edge;
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Point */
+ /* AH_PointRec */
/* */
/* <Description> */
- /* A structure used to model an outline point to the AH_Outline type. */
+ /* A structure used to model an outline point to the AH_OutlineRec type. */
/* */
/* <Fields> */
/* flags :: The current point hint flags. */
@@ -208,7 +208,7 @@
/* */
/* prev :: The previous point in same contour. */
/* */
- struct AH_Point
+ typedef struct AH_PointRec_
{
AH_Flags flags; /* point flags used by hinter */
FT_Pos ox, oy;
@@ -222,15 +222,16 @@
AH_Angle in_angle;
AH_Angle out_angle;
- AH_Point* next; /* next point in contour */
- AH_Point* prev; /* previous point in contour */
- };
+ AH_Point next; /* next point in contour */
+ AH_Point prev; /* previous point in contour */
+ } AH_PointRec;
+
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Segment */
+ /* AH_SegmentRec */
/* */
/* <Description> */
/* A structure used to describe an edge segment to the auto-hinter. */
@@ -265,33 +266,34 @@
/* */
/* score :: Used to score the segment when selecting them. */
/* */
- struct AH_Segment
+ typedef struct AH_SegmentRec_
{
AH_Edge_Flags flags;
AH_Direction dir;
- AH_Point* first; /* first point in edge segment */
- AH_Point* last; /* last point in edge segment */
- AH_Point** contour; /* ptr to first point of segment's contour */
+ AH_Point first; /* first point in edge segment */
+ AH_Point last; /* last point in edge segment */
+ AH_Point * contour; /* ptr to first point of segment's contour */
FT_Pos pos; /* position of segment */
FT_Pos min_coord; /* minimum coordinate of segment */
FT_Pos max_coord; /* maximum coordinate of segment */
- AH_Edge* edge;
- AH_Segment* edge_next;
+ AH_Edge edge;
+ AH_Segment edge_next;
- AH_Segment* link; /* link segment */
- AH_Segment* serif; /* primary segment for serifs */
+ AH_Segment link; /* link segment */
+ AH_Segment serif; /* primary segment for serifs */
FT_Pos num_linked; /* number of linked segments */
FT_Int score;
- };
+ } AH_SegmentRec;
+
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Edge */
+ /* AH_EdgeRec */
/* */
/* <Description> */
/* A structure used to describe an edge, which really is a horizontal */
@@ -325,29 +327,30 @@
/* Only set for some of the horizontal edges in a Latin */
/* font. */
/* */
- struct AH_Edge
+ typedef struct AH_EdgeRec_
{
AH_Edge_Flags flags;
AH_Direction dir;
- AH_Segment* first;
- AH_Segment* last;
+ AH_Segment first;
+ AH_Segment last;
FT_Pos fpos;
FT_Pos opos;
FT_Pos pos;
- AH_Edge* link;
- AH_Edge* serif;
+ AH_Edge link;
+ AH_Edge serif;
FT_Int num_linked;
FT_Int score;
FT_Pos* blue_edge;
- };
+ } AH_EdgeRec;
+
/* an outline as seen by the hinter */
- typedef struct AH_Outline_
+ typedef struct AH_OutlineRec_
{
FT_Memory memory;
@@ -360,39 +363,39 @@
FT_Int max_points;
FT_Int num_points;
- AH_Point* points;
+ AH_Point points;
FT_Int max_contours;
FT_Int num_contours;
- AH_Point** contours;
+ AH_Point * contours;
FT_Int num_hedges;
- AH_Edge* horz_edges;
+ AH_Edge horz_edges;
FT_Int num_vedges;
- AH_Edge* vert_edges;
+ AH_Edge vert_edges;
FT_Int num_hsegments;
- AH_Segment* horz_segments;
+ AH_Segment horz_segments;
FT_Int num_vsegments;
- AH_Segment* vert_segments;
+ AH_Segment vert_segments;
- } AH_Outline;
+ } AH_OutlineRec, *AH_Outline;
-#define ah_blue_capital_top 0 /* THEZOCQS */
-#define ah_blue_capital_bottom ( ah_blue_capital_top + 1 ) /* HEZLOCUS */
-#define ah_blue_small_top ( ah_blue_capital_bottom + 1 ) /* xzroesc */
-#define ah_blue_small_bottom ( ah_blue_small_top + 1 ) /* xzroesc */
-#define ah_blue_small_minor ( ah_blue_small_bottom + 1 ) /* pqgjy */
-#define ah_blue_max ( ah_blue_small_minor + 1 )
+#define AH_BLUE_CAPITAL_TOP 0 /* THEZOCQS */
+#define AH_BLUE_CAPITAL_BOTTOM ( AH_BLUE_CAPITAL_TOP + 1 ) /* HEZLOCUS */
+#define AH_BLUE_SMALL_TOP ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* xzroesc */
+#define AH_BLUE_SMALL_BOTTOM ( AH_BLUE_SMALL_TOP + 1 ) /* xzroesc */
+#define AH_BLUE_SMALL_MINOR ( AH_BLUE_SMALL_BOTTOM + 1 ) /* pqgjy */
+#define AH_BLUE_MAX ( AH_BLUE_SMALL_MINOR + 1 )
typedef FT_Int AH_Blue;
-#define ah_hinter_monochrome 1
-#define ah_hinter_optimize 2
+#define AH_HINTER_MONOCHROME 1
+#define AH_HINTER_OPTIMIZE 2
typedef FT_Int AH_Hinter_Flags;
@@ -400,7 +403,7 @@
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Globals */
+ /* AH_GlobalsRec */
/* */
/* <Description> */
/* Holds the global metrics for a given font face (be it in design */
@@ -419,7 +422,7 @@
/* */
/* blue_shoots :: The overshoot positions of blue zones. */
/* */
- typedef struct AH_Globals_
+ typedef struct AH_GlobalsRec_
{
FT_Int num_widths;
FT_Int num_heights;
@@ -429,16 +432,16 @@
FT_Pos widths [AH_MAX_WIDTHS];
FT_Pos heights[AH_MAX_HEIGHTS];
- FT_Pos blue_refs [ah_blue_max];
- FT_Pos blue_shoots[ah_blue_max];
+ FT_Pos blue_refs [AH_BLUE_MAX];
+ FT_Pos blue_shoots[AH_BLUE_MAX];
- } AH_Globals;
+ } AH_GlobalsRec, *AH_Globals;
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Face_Globals */
+ /* AH_Face_GlobalsRec */
/* */
/* <Description> */
/* Holds the complete global metrics for a given font face (i.e., the */
@@ -456,19 +459,19 @@
/* */
/* y_scale :: The current vertical scale. */
/* */
- typedef struct AH_Face_Globals_
+ typedef struct AH_Face_GlobalsRec_
{
FT_Face face;
- AH_Globals design;
- AH_Globals scaled;
+ AH_GlobalsRec design;
+ AH_GlobalsRec scaled;
FT_Fixed x_scale;
FT_Fixed y_scale;
FT_Bool control_overshoot;
- } AH_Face_Globals;
+ } AH_Face_GlobalsRec, *AH_Face_Globals;
- typedef struct AH_Hinter
+ typedef struct AH_HinterRec
{
FT_Memory memory;
AH_Hinter_Flags flags;
@@ -476,9 +479,9 @@
FT_Int algorithm;
FT_Face face;
- AH_Face_Globals* globals;
+ AH_Face_Globals globals;
- AH_Outline* glyph;
+ AH_Outline glyph;
AH_Loader loader;
FT_Vector pp1;
@@ -488,11 +491,11 @@
FT_Vector trans_delta;
FT_Matrix trans_matrix;
- } AH_Hinter;
+ } AH_HinterRec, *AH_Hinter;
#ifdef DEBUG_HINTER
- extern AH_Hinter* ah_debug_hinter;
+ extern AH_Hinter ah_debug_hinter;
extern FT_Bool ah_debug_disable_horz;
extern FT_Bool ah_debug_disable_vert;
#else
--- a/src/base/ftbbox.c
+++ b/src/base/ftbbox.c
@@ -602,7 +602,7 @@
if ( y < cbox.yMin ) cbox.yMin = y;
if ( y > cbox.yMax ) cbox.yMax = y;
- if ( FT_CURVE_TAG( outline->tags[n] ) == FT_Curve_Tag_On )
+ if ( FT_CURVE_TAG( outline->tags[n] ) == FT_CURVE_TAG_ON )
{
/* update bbox for `on' points only */
if ( x < bbox.xMin ) bbox.xMin = x;
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -147,7 +147,7 @@
FT_Memory memory = library->memory;
- if ( slot->format != ft_glyph_format_bitmap )
+ if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
{
error = FT_Err_Invalid_Glyph_Format;
goto Exit;
@@ -209,14 +209,14 @@
const FT_Glyph_Class ft_bitmap_glyph_class =
{
sizeof( FT_BitmapGlyphRec ),
- ft_glyph_format_bitmap,
+ FT_GLYPH_FORMAT_BITMAP,
- (FT_Glyph_Init_Func) ft_bitmap_glyph_init,
- (FT_Glyph_Done_Func) ft_bitmap_glyph_done,
- (FT_Glyph_Copy_Func) ft_bitmap_glyph_copy,
- (FT_Glyph_Transform_Func)0,
- (FT_Glyph_BBox_Func) ft_bitmap_glyph_bbox,
- (FT_Glyph_Prepare_Func) 0
+ (FT_Glyph_InitFunc) ft_bitmap_glyph_init,
+ (FT_Glyph_DoneFunc) ft_bitmap_glyph_done,
+ (FT_Glyph_CopyFunc) ft_bitmap_glyph_copy,
+ (FT_Glyph_TransformFunc)0,
+ (FT_Glyph_GetBBoxFunc) ft_bitmap_glyph_bbox,
+ (FT_Glyph_PrepareFunc) 0
};
@@ -240,7 +240,7 @@
/* check format in glyph slot */
- if ( slot->format != ft_glyph_format_outline )
+ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
{
error = FT_Err_Invalid_Glyph_Format;
goto Exit;
@@ -262,8 +262,8 @@
FT_MEM_COPY( target->contours, source->contours,
source->n_contours * sizeof ( FT_Short ) );
- /* copy all flags, except the `ft_outline_owner' one */
- target->flags = source->flags | ft_outline_owner;
+ /* copy all flags, except the `FT_OUTLINE_OWNER' one */
+ target->flags = source->flags | FT_OUTLINE_OWNER;
Exit:
return error;
@@ -319,9 +319,9 @@
ft_outline_glyph_prepare( FT_OutlineGlyph glyph,
FT_GlyphSlot slot )
{
- slot->format = ft_glyph_format_outline;
+ slot->format = FT_GLYPH_FORMAT_OUTLINE;
slot->outline = glyph->outline;
- slot->outline.flags &= ~ft_outline_owner;
+ slot->outline.flags &= ~FT_OUTLINE_OWNER;
return FT_Err_Ok;
}
@@ -330,14 +330,14 @@
const FT_Glyph_Class ft_outline_glyph_class =
{
sizeof( FT_OutlineGlyphRec ),
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
- (FT_Glyph_Init_Func) ft_outline_glyph_init,
- (FT_Glyph_Done_Func) ft_outline_glyph_done,
- (FT_Glyph_Copy_Func) ft_outline_glyph_copy,
- (FT_Glyph_Transform_Func)ft_outline_glyph_transform,
- (FT_Glyph_BBox_Func) ft_outline_glyph_bbox,
- (FT_Glyph_Prepare_Func) ft_outline_glyph_prepare
+ (FT_Glyph_InitFunc) ft_outline_glyph_init,
+ (FT_Glyph_DoneFunc) ft_outline_glyph_done,
+ (FT_Glyph_CopyFunc) ft_outline_glyph_copy,
+ (FT_Glyph_TransformFunc)ft_outline_glyph_transform,
+ (FT_Glyph_GetBBoxFunc) ft_outline_glyph_bbox,
+ (FT_Glyph_PrepareFunc) ft_outline_glyph_prepare
};
@@ -435,11 +435,11 @@
return FT_Err_Invalid_Argument;
/* if it is a bitmap, that's easy :-) */
- if ( slot->format == ft_glyph_format_bitmap )
+ if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
clazz = &ft_bitmap_glyph_class;
/* it it is an outline too */
- else if ( slot->format == ft_glyph_format_outline )
+ else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
clazz = &ft_outline_glyph_class;
else
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -530,11 +530,11 @@
return error;
}
- args.flags = ft_open_stream;
+ args.flags = FT_OPEN_STREAM;
args.stream = stream;
if ( driver_name )
{
- args.flags = args.flags | ft_open_driver;
+ args.flags = args.flags | FT_OPEN_DRIVER;
args.driver = FT_Get_Module( library, driver_name );
}
@@ -910,7 +910,7 @@
#endif
/* let it fall through to normal loader (.ttf, .otf, etc.) */
- args.flags = ft_open_pathname;
+ args.flags = FT_OPEN_PATHNAME;
args.pathname = (char*)pathname;
return FT_Open_Face( library, &args, face_index, aface );
}
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -98,7 +98,7 @@
stream->memory = memory;
- if ( args->flags & ft_open_memory )
+ if ( args->flags & FT_OPEN_MEMORY )
{
/* create a memory-based stream */
FT_Stream_OpenMemory( stream,
@@ -105,13 +105,13 @@
(const FT_Byte*)args->memory_base,
args->memory_size );
}
- else if ( args->flags & ft_open_pathname )
+ else if ( args->flags & FT_OPEN_PATHNAME )
{
/* create a normal system stream */
error = FT_Stream_Open( stream, args->pathname );
stream->pathname.pointer = args->pathname;
}
- else if ( ( args->flags & ft_open_stream ) && args->stream )
+ else if ( ( args->flags & FT_OPEN_STREAM ) && args->stream )
{
/* use an existing, user-provided stream */
@@ -222,7 +222,7 @@
slot->control_data = 0;
slot->control_len = 0;
slot->other = 0;
- slot->format = ft_glyph_format_none;
+ slot->format = FT_GLYPH_FORMAT_NONE;
slot->linearHoriAdvance = 0;
slot->linearVertAdvance = 0;
@@ -472,7 +472,7 @@
glyph_index,
load_flags | FT_LOAD_SBITS_ONLY );
- if ( !error && slot->format == ft_glyph_format_bitmap )
+ if ( !error && slot->format == FT_GLYPH_FORMAT_BITMAP )
goto Load_Ok;
}
@@ -549,14 +549,14 @@
/* do we need to render the image now? */
if ( !error &&
- slot->format != ft_glyph_format_bitmap &&
- slot->format != ft_glyph_format_composite &&
+ slot->format != FT_GLYPH_FORMAT_BITMAP &&
+ slot->format != FT_GLYPH_FORMAT_COMPOSITE &&
load_flags & FT_LOAD_RENDER )
{
error = FT_Render_Glyph( slot,
( load_flags & FT_LOAD_MONOCHROME )
- ? ft_render_mode_mono
- : ft_render_mode_normal );
+ ? FT_RENDER_MODE_MONO
+ : FT_RENDER_MODE_NORMAL );
}
Exit:
@@ -758,7 +758,7 @@
{
cmap = face->charmaps[nn];
- if ( cmap->encoding == ft_encoding_unicode )
+ if ( cmap->encoding == FT_ENCODING_UNICODE )
{
unicmap = cmap;
break;
@@ -804,7 +804,7 @@
if ( !pathname )
return FT_Err_Invalid_Argument;
- args.flags = ft_open_pathname;
+ args.flags = FT_OPEN_PATHNAME;
args.pathname = (char*)pathname;
return FT_Open_Face( library, &args, face_index, aface );
@@ -829,7 +829,7 @@
if ( !file_base )
return FT_Err_Invalid_Argument;
- args.flags = ft_open_memory;
+ args.flags = FT_OPEN_MEMORY;
args.memory_base = file_base;
args.memory_size = file_size;
@@ -862,7 +862,7 @@
*aface = 0;
- external_stream = FT_BOOL( ( args->flags & ft_open_stream ) &&
+ external_stream = FT_BOOL( ( args->flags & FT_OPEN_STREAM ) &&
args->stream );
/* create input stream */
@@ -874,7 +874,7 @@
/* If the font driver is specified in the `args' structure, use */
/* it. Otherwise, we scan the list of registered drivers. */
- if ( ( args->flags & ft_open_driver ) && args->driver )
+ if ( ( args->flags & FT_OPEN_DRIVER ) && args->driver )
{
driver = FT_DRIVER( args->driver );
@@ -885,7 +885,7 @@
FT_Parameter* params = 0;
- if ( args->flags & ft_open_params )
+ if ( args->flags & FT_OPEN_PARAMS )
{
num_params = args->num_params;
params = args->params;
@@ -920,7 +920,7 @@
driver = FT_DRIVER( cur[0] );
- if ( args->flags & ft_open_params )
+ if ( args->flags & FT_OPEN_PARAMS )
{
num_params = args->num_params;
params = args->params;
@@ -1029,7 +1029,7 @@
if ( !filepathname )
return FT_Err_Invalid_Argument;
- open.flags = ft_open_pathname;
+ open.flags = FT_OPEN_PATHNAME;
open.pathname = (char*)filepathname;
return FT_Attach_Stream( face, &open );
@@ -1073,7 +1073,7 @@
/* close the attached stream */
ft_input_stream_free( stream,
(FT_Bool)( parameters->stream &&
- ( parameters->flags & ft_open_stream ) ) );
+ ( parameters->flags & FT_OPEN_STREAM ) ) );
Exit:
return error;
@@ -1399,12 +1399,12 @@
akerning );
if ( !error )
{
- if ( kern_mode != ft_kerning_unscaled )
+ if ( kern_mode != FT_KERNING_UNSCALED )
{
akerning->x = FT_MulFix( akerning->x, face->size->metrics.x_scale );
akerning->y = FT_MulFix( akerning->y, face->size->metrics.y_scale );
- if ( kern_mode != ft_kerning_unfitted )
+ if ( kern_mode != FT_KERNING_UNFITTED )
{
akerning->x = ( akerning->x + 32 ) & -64;
akerning->y = ( akerning->y + 32 ) & -64;
@@ -1853,7 +1853,7 @@
FT_Renderer renderer;
- renderer = FT_Lookup_Renderer( library, ft_glyph_format_outline, 0 );
+ renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE, 0 );
library->cur_renderer = renderer;
}
@@ -1879,7 +1879,7 @@
render->glyph_format = clazz->glyph_format;
/* allocate raster object if needed */
- if ( clazz->glyph_format == ft_glyph_format_outline &&
+ if ( clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
clazz->raster_class->raster_new )
{
error = clazz->raster_class->raster_new( memory, &render->raster );
@@ -1972,12 +1972,12 @@
FT_List_Up( &library->renderers, node );
- if ( renderer->glyph_format == ft_glyph_format_outline )
+ if ( renderer->glyph_format == FT_GLYPH_FORMAT_OUTLINE )
library->cur_renderer = renderer;
if ( num_params > 0 )
{
- FTRenderer_setMode set_mode = renderer->clazz->set_mode;
+ FT_Renderer_SetModeFunc set_mode = renderer->clazz->set_mode;
for ( ; num_params > 0; num_params-- )
@@ -2005,7 +2005,7 @@
/* if it is already a bitmap, no need to do anything */
switch ( slot->format )
{
- case ft_glyph_format_bitmap: /* already a bitmap, don't do anything */
+ case FT_GLYPH_FORMAT_BITMAP: /* already a bitmap, don't do anything */
break;
default:
@@ -2015,7 +2015,7 @@
/* small shortcut for the very common case */
- if ( slot->format == ft_glyph_format_outline )
+ if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
{
renderer = library->cur_renderer;
node = library->renderers.head;
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -98,14 +98,14 @@
tag = FT_CURVE_TAG( tags[0] );
/* A contour cannot start with a cubic control point! */
- if ( tag == FT_Curve_Tag_Cubic )
+ if ( tag == FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
/* check first point to determine origin */
- if ( tag == FT_Curve_Tag_Conic )
+ if ( tag == FT_CURVE_TAG_CONIC )
{
/* first point is conic control. Yes, this happens. */
- if ( FT_CURVE_TAG( outline->tags[last] ) == FT_Curve_Tag_On )
+ if ( FT_CURVE_TAG( outline->tags[last] ) == FT_CURVE_TAG_ON )
{
/* start at last point if it is on the curve */
v_start = v_last;
@@ -137,7 +137,7 @@
tag = FT_CURVE_TAG( tags[0] );
switch ( tag )
{
- case FT_Curve_Tag_On: /* emit a single line_to */
+ case FT_CURVE_TAG_ON: /* emit a single line_to */
{
FT_Vector vec;
@@ -151,7 +151,7 @@
continue;
}
- case FT_Curve_Tag_Conic: /* consume conic arcs */
+ case FT_CURVE_TAG_CONIC: /* consume conic arcs */
v_control.x = SCALED( point->x );
v_control.y = SCALED( point->y );
@@ -169,7 +169,7 @@
vec.x = SCALED( point->x );
vec.y = SCALED( point->y );
- if ( tag == FT_Curve_Tag_On )
+ if ( tag == FT_CURVE_TAG_ON )
{
error = func_interface->conic_to( &v_control, &vec, user );
if ( error )
@@ -177,7 +177,7 @@
continue;
}
- if ( tag != FT_Curve_Tag_Conic )
+ if ( tag != FT_CURVE_TAG_CONIC )
goto Invalid_Outline;
v_middle.x = ( v_control.x + vec.x ) / 2;
@@ -194,13 +194,13 @@
error = func_interface->conic_to( &v_control, &v_start, user );
goto Close;
- default: /* FT_Curve_Tag_Cubic */
+ default: /* FT_CURVE_TAG_CUBIC */
{
FT_Vector vec1, vec2;
if ( point + 1 > limit ||
- FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
+ FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
point += 2;
@@ -270,12 +270,12 @@
anoutline->n_points = (FT_UShort)numPoints;
anoutline->n_contours = (FT_Short)numContours;
- anoutline->flags |= ft_outline_owner;
+ anoutline->flags |= FT_OUTLINE_OWNER;
return FT_Err_Ok;
Fail:
- anoutline->flags |= ft_outline_owner;
+ anoutline->flags |= FT_OUTLINE_OWNER;
FT_Outline_Done_Internal( memory, anoutline );
return error;
@@ -366,11 +366,11 @@
FT_MEM_COPY( target->contours, source->contours,
source->n_contours * sizeof ( FT_Short ) );
- /* copy all flags, except the `ft_outline_owner' one */
- is_owner = target->flags & ft_outline_owner;
+ /* copy all flags, except the `FT_OUTLINE_OWNER' one */
+ is_owner = target->flags & FT_OUTLINE_OWNER;
target->flags = source->flags;
- target->flags &= ~ft_outline_owner;
+ target->flags &= ~FT_OUTLINE_OWNER;
target->flags |= is_owner;
return FT_Err_Ok;
@@ -383,7 +383,7 @@
{
if ( outline )
{
- if ( outline->flags & ft_outline_owner )
+ if ( outline->flags & FT_OUTLINE_OWNER )
{
FT_FREE( outline->points );
FT_FREE( outline->tags );
@@ -535,7 +535,7 @@
first = last + 1;
}
- outline->flags ^= ft_outline_reverse_fill;
+ outline->flags ^= FT_OUTLINE_REVERSE_FILL;
}
@@ -576,7 +576,7 @@
/* now, look for another renderer that supports the same */
/* format */
- renderer = FT_Lookup_Renderer( library, ft_glyph_format_outline,
+ renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE,
&node );
update = 1;
}
@@ -608,8 +608,10 @@
params.target = abitmap;
params.flags = 0;
- if ( abitmap->pixel_mode == ft_pixel_mode_grays )
- params.flags |= ft_raster_flag_aa;
+ if ( abitmap->pixel_mode == FT_PIXEL_MODE_GRAY ||
+ abitmap->pixel_mode == FT_PIXEL_MODE_LCD ||
+ abitmap->pixel_mode == FT_PIXEL_MODE_LCD_V )
+ params.flags |= FT_RASTER_FLAG_AA;
return FT_Outline_Render( library, outline, ¶ms );
}
--- a/src/base/ftstroker.c
+++ b/src/base/ftstroker.c
@@ -79,7 +79,7 @@
}
theta = ft_pos_abs( FT_Angle_Diff( *angle_in, *angle_out ) );
-
+
return FT_BOOL( theta < FT_SMALL_CONIC_THRESHOLD );
}
@@ -523,11 +523,11 @@
for ( ; count > 0; count--, read++, write++ )
{
if ( *read & FT_STROKE_TAG_ON )
- *write = FT_Curve_Tag_On;
+ *write = FT_CURVE_TAG_ON;
else if ( *read & FT_STROKE_TAG_CUBIC )
- *write = FT_Curve_Tag_Cubic;
+ *write = FT_CURVE_TAG_CUBIC;
else
- *write = FT_Curve_Tag_Conic;
+ *write = FT_CURVE_TAG_CONIC;
}
}
@@ -1008,9 +1008,9 @@
while ( arc >= bez_stack )
{
FT_Angle angle_in, angle_out;
-
+
angle_in = angle_out = 0; /* remove compiler warnings */
-
+
if ( arc < limit &&
!ft_conic_is_small_enough( arc, &angle_in, &angle_out ) )
{
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -43,7 +43,7 @@
/* only oblique outline glyphs */
- if ( slot->format != ft_glyph_format_outline )
+ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
return;
/* we don't touch the advance width */
@@ -116,7 +116,7 @@
/* Compute the orientation of path filling. It differs between TrueType */
- /* and Type1 formats. We could use the `ft_outline_reverse_fill' flag, */
+ /* and Type1 formats. We could use the `FT_OUTLINE_REVERSE_FILL' flag, */
/* but it is better to re-compute it directly (it seems that this flag */
/* isn't correctly set for some weird composite glyphs currently). */
/* */
@@ -212,7 +212,7 @@
/* only embolden outline glyph images */
- if ( slot->format != ft_glyph_format_outline )
+ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
return;
/* compute control distance */
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -398,13 +398,13 @@
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_none;
+ charmap.encoding = FT_ENCODING_NONE;
charmap.platform_id = 0;
charmap.encoding_id = 0;
if ( unicode_charmap )
{
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
charmap.platform_id = 3;
charmap.encoding_id = 1;
}
@@ -429,7 +429,7 @@
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_adobe_standard;
+ charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
charmap.platform_id = 7;
charmap.encoding_id = 0;
@@ -510,7 +510,7 @@
if ( bpp == 1 )
{
- bitmap->pixel_mode = ft_pixel_mode_mono;
+ bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
bitmap->pitch = glyph.bpr;
if ( FT_NEW_ARRAY( bitmap->buffer, glyph.bytes ) )
@@ -520,7 +520,7 @@
else
{
/* blow up pixmap to have 8 bits per pixel */
- bitmap->pixel_mode = ft_pixel_mode_grays;
+ bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
bitmap->pitch = bitmap->width;
if ( FT_NEW_ARRAY( bitmap->buffer, bitmap->rows * bitmap->pitch ) )
@@ -623,7 +623,7 @@
slot->metrics.height = bitmap->rows << 6;
slot->linearHoriAdvance = (FT_Fixed)glyph.dwidth << 16;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
slot->flags = FT_GLYPH_OWN_BITMAP;
Exit:
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -143,8 +143,8 @@
error = FT_Load_Glyph( face, gindex, load_flags );
if ( !error )
{
- if ( face->glyph->format == ft_glyph_format_bitmap ||
- face->glyph->format == ft_glyph_format_outline )
+ if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP ||
+ face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
{
/* ok, copy it */
FT_Glyph glyph;
@@ -179,7 +179,7 @@
switch ( glyph->format )
{
- case ft_glyph_format_bitmap:
+ case FT_GLYPH_FORMAT_BITMAP:
{
FT_BitmapGlyph bitg;
@@ -190,7 +190,7 @@
}
break;
- case ft_glyph_format_outline:
+ case FT_GLYPH_FORMAT_OUTLINE:
{
FT_OutlineGlyph outg;
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -423,7 +423,7 @@
point->x = x >> 16;
point->y = y >> 16;
- *control = (FT_Byte)( flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic );
+ *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
builder->last = *point;
}
@@ -525,7 +525,7 @@
/* `delete' last point only if it coincides with the first */
/* point and if it is not a control point (which can happen). */
if ( p1->x == p2->x && p1->y == p2->y )
- if ( *control == FT_Curve_Tag_On )
+ if ( *control == FT_CURVE_TAG_ON )
outline->n_points--;
}
@@ -692,7 +692,7 @@
/* set up remaining glyph fields */
glyph->num_subglyphs = 2;
glyph->subglyphs = loader->base.subglyphs;
- glyph->format = ft_glyph_format_composite;
+ glyph->format = FT_GLYPH_FORMAT_COMPOSITE;
loader->current.num_subglyphs = 2;
}
@@ -2291,7 +2291,7 @@
hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
( load_flags & FT_LOAD_NO_HINTING ) == 0 );
- glyph->root.format = ft_glyph_format_outline; /* by default */
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE; /* by default */
{
FT_Byte* charstring;
@@ -2381,13 +2381,13 @@
glyph->root.linearVertAdvance = 0;
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
glyph->root.outline.flags = 0;
if ( size && size->metrics.y_ppem < 24 )
- glyph->root.outline.flags |= ft_outline_high_precision;
+ glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
- glyph->root.outline.flags |= ft_outline_reverse_fill;
+ glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
/* apply the font matrix */
FT_Outline_Transform( &glyph->root.outline, &font_matrix );
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -480,7 +480,7 @@
cmaprec.face = root;
cmaprec.platform_id = 3;
cmaprec.encoding_id = 1;
- cmaprec.encoding = ft_encoding_unicode;
+ cmaprec.encoding = FT_ENCODING_UNICODE;
nn = (FT_UInt) root->num_charmaps;
@@ -503,19 +503,19 @@
{
case 0:
cmaprec.encoding_id = 0;
- cmaprec.encoding = ft_encoding_adobe_standard;
+ cmaprec.encoding = FT_ENCODING_ADOBE_STANDARD;
clazz = &cff_cmap_encoding_class_rec;
break;
case 1:
cmaprec.encoding_id = 1;
- cmaprec.encoding = ft_encoding_adobe_expert;
+ cmaprec.encoding = FT_ENCODING_ADOBE_EXPERT;
clazz = &cff_cmap_encoding_class_rec;
break;
default:
cmaprec.encoding_id = 3;
- cmaprec.encoding = ft_encoding_adobe_custom;
+ cmaprec.encoding = FT_ENCODING_ADOBE_CUSTOM;
clazz = &cff_cmap_encoding_class_rec;
}
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -206,8 +206,8 @@
FT_LOCAL_DEF( FT_Error )
- CID_Compute_Max_Advance( CID_Face face,
- FT_Int* max_advance )
+ cid_face_compute_max_advance( CID_Face face,
+ FT_Int* max_advance )
{
FT_Error error;
T1_DecoderRec decoder;
@@ -269,10 +269,10 @@
FT_LOCAL_DEF( FT_Error )
- CID_Load_Glyph( CID_GlyphSlot glyph,
- CID_Size size,
- FT_Int glyph_index,
- FT_Int load_flags )
+ cid_slot_load_glyph( CID_GlyphSlot glyph,
+ CID_Size size,
+ FT_Int glyph_index,
+ FT_Int load_flags )
{
FT_Error error;
T1_DecoderRec decoder;
@@ -296,7 +296,7 @@
hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
( load_flags & FT_LOAD_NO_HINTING ) == 0 );
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
{
error = psaux->t1_decoder_funcs->init( &decoder,
@@ -326,8 +326,8 @@
/* bearing the yMax */
if ( !error )
{
- glyph->root.outline.flags &= ft_outline_owner;
- glyph->root.outline.flags |= ft_outline_reverse_fill;
+ glyph->root.outline.flags &= FT_OUTLINE_OWNER;
+ glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
/* for composite glyphs, return only left side bearing and */
/* advance width */
@@ -360,10 +360,10 @@
metrics->vertAdvance = 0;
glyph->root.linearVertAdvance = 0;
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
if ( size && size->root.metrics.y_ppem < 24 )
- glyph->root.outline.flags |= ft_outline_high_precision;
+ glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
/* apply the font matrix */
FT_Outline_Transform( &glyph->root.outline, &font_matrix );
--- a/src/cid/cidgload.h
+++ b/src/cid/cidgload.h
@@ -31,16 +31,16 @@
/* Compute the maximum advance width of a font through quick parsing */
FT_LOCAL( FT_Error )
- CID_Compute_Max_Advance( CID_Face face,
- FT_Int* max_advance );
+ cid_face_compute_max_advance( CID_Face face,
+ FT_Int* max_advance );
#endif /* 0 */
FT_LOCAL( FT_Error )
- CID_Load_Glyph( CID_GlyphSlot glyph,
- CID_Size size,
- FT_Int glyph_index,
- FT_Int load_flags );
+ cid_slot_load_glyph( CID_GlyphSlot glyph,
+ CID_Size size,
+ FT_Int glyph_index,
+ FT_Int load_flags );
FT_END_HEADER
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -146,10 +146,10 @@
/* now, load the keyword data in the object's field(s) */
if ( keyword->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
keyword->type == T1_FIELD_TYPE_FIXED_ARRAY )
- error = CID_Load_Field_Table( &loader->parser, keyword,
+ error = cid_parser_load_field_table( &loader->parser, keyword,
&dummy_object );
else
- error = CID_Load_Field( &loader->parser, keyword, &dummy_object );
+ error = cid_parser_load_field( &loader->parser, keyword, &dummy_object );
Exit:
return error;
}
@@ -163,7 +163,7 @@
FT_BBox* bbox = &face->cid.font_bbox;
- (void)CID_ToFixedArray( parser, 4, temp, 0 );
+ (void)cid_parser_to_fixed_array( parser, 4, temp, 0 );
bbox->xMin = FT_RoundFix( temp[0] );
bbox->yMin = FT_RoundFix( temp[1] );
bbox->xMax = FT_RoundFix( temp[2] );
@@ -192,7 +192,7 @@
matrix = &dict->font_matrix;
offset = &dict->font_offset;
- (void)CID_ToFixedArray( parser, 6, temp, 3 );
+ (void)cid_parser_to_fixed_array( parser, 6, temp, 3 );
temp_scale = ABS( temp[3] );
@@ -238,7 +238,7 @@
FT_Long num_dicts;
- num_dicts = CID_ToInt( parser );
+ num_dicts = cid_parser_to_int( parser );
if ( !cid->font_dicts )
{
@@ -362,7 +362,7 @@
{
/* we found it - run the parsing callback */
parser->root.cursor = cur2;
- CID_Skip_Spaces( parser );
+ cid_parser_skip_spaces( parser );
parser->root.error = cid_load_keyword( face,
loader,
keyword );
@@ -508,12 +508,12 @@
/* finalize parser */
- CID_Done_Parser( parser );
+ cid_parser_done( parser );
}
FT_LOCAL_DEF( FT_Error )
- CID_Open_Face( CID_Face face )
+ cid_face_open( CID_Face face )
{
CID_Loader loader;
CID_Parser* parser;
@@ -523,7 +523,7 @@
t1_init_loader( &loader, face );
parser = &loader.parser;
- error = CID_New_Parser( parser, face->root.stream, face->root.memory,
+ error = cid_parser_new( parser, face->root.stream, face->root.memory,
(PSAux_Service)face->psaux );
if ( error )
goto Exit;
--- a/src/cid/cidload.h
+++ b/src/cid/cidload.h
@@ -46,7 +46,7 @@
FT_UShort seed );
FT_LOCAL( FT_Error )
- CID_Open_Face( CID_Face face );
+ cid_face_open( CID_Face face );
FT_END_HEADER
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -45,7 +45,7 @@
/*************************************************************************/
FT_LOCAL_DEF( void )
- CID_GlyphSlot_Done( CID_GlyphSlot slot )
+ cid_slot_done( CID_GlyphSlot slot )
{
slot->root.internal->glyph_hints = 0;
}
@@ -52,7 +52,7 @@
FT_LOCAL_DEF( FT_Error )
- CID_GlyphSlot_Init( CID_GlyphSlot slot )
+ cid_slot_init( CID_GlyphSlot slot )
{
CID_Face face;
PSHinter_Service pshinter;
@@ -90,7 +90,7 @@
static PSH_Globals_Funcs
- CID_Size_Get_Globals_Funcs( CID_Size size )
+ cid_size_get_globals_funcs( CID_Size size )
{
CID_Face face = (CID_Face)size->root.face;
PSHinter_Service pshinter = (PSHinter_Service)face->pshinter;
@@ -106,7 +106,7 @@
FT_LOCAL_DEF( void )
- CID_Size_Done( CID_Size size )
+ cid_size_done( CID_Size size )
{
if ( size->root.internal )
{
@@ -113,7 +113,7 @@
PSH_Globals_Funcs funcs;
- funcs = CID_Size_Get_Globals_Funcs( size );
+ funcs = cid_size_get_globals_funcs( size );
if ( funcs )
funcs->destroy( (PSH_Globals)size->root.internal );
@@ -126,7 +126,7 @@
CID_Size_Init( CID_Size size )
{
FT_Error error = 0;
- PSH_Globals_Funcs funcs = CID_Size_Get_Globals_Funcs( size );
+ PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
if ( funcs )
@@ -147,9 +147,9 @@
FT_LOCAL_DEF( FT_Error )
- CID_Size_Reset( CID_Size size )
+ cid_size_reset( CID_Size size )
{
- PSH_Globals_Funcs funcs = CID_Size_Get_Globals_Funcs( size );
+ PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
FT_Error error = 0;
@@ -171,7 +171,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CID_Face_Done */
+ /* cid_face_done */
/* */
/* <Description> */
/* Finalizes a given face object. */
@@ -180,7 +180,7 @@
/* face :: A pointer to the face object to destroy. */
/* */
FT_LOCAL_DEF( void )
- CID_Face_Done( CID_Face face )
+ cid_face_done( CID_Face face )
{
FT_Memory memory;
@@ -239,7 +239,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CID_Face_Init */
+ /* cid_face_init */
/* */
/* <Description> */
/* Initializes a given CID face object. */
@@ -260,7 +260,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- CID_Face_Init( FT_Stream stream,
+ cid_face_init( FT_Stream stream,
CID_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -310,7 +310,7 @@
if ( FT_STREAM_SEEK( 0 ) )
goto Exit;
- error = CID_Open_Face( face );
+ error = cid_face_open( face );
if ( error )
goto Exit;
@@ -321,7 +321,7 @@
/* check the face index */
if ( face_index != 0 )
{
- FT_ERROR(( "CID_Face_Init: invalid face index\n" ));
+ FT_ERROR(( "cid_face_init: invalid face index\n" ));
error = CID_Err_Invalid_Argument;
goto Exit;
}
@@ -407,7 +407,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CID_Driver_Init */
+ /* cid_driver_init */
/* */
/* <Description> */
/* Initializes a given CID driver object. */
@@ -419,7 +419,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- CID_Driver_Init( CID_Driver driver )
+ cid_driver_init( CID_Driver driver )
{
FT_UNUSED( driver );
@@ -430,7 +430,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CID_Driver_Done */
+ /* cid_driver_done */
/* */
/* <Description> */
/* Finalizes a given CID driver. */
@@ -439,7 +439,7 @@
/* driver :: A handle to the target CID driver. */
/* */
FT_LOCAL_DEF( void )
- CID_Driver_Done( CID_Driver driver )
+ cid_driver_done( CID_Driver driver )
{
FT_UNUSED( driver );
}
--- a/src/cid/cidobjs.h
+++ b/src/cid/cidobjs.h
@@ -112,14 +112,14 @@
FT_LOCAL( void )
- CID_GlyphSlot_Done( CID_GlyphSlot slot );
+ cid_slot_done( CID_GlyphSlot slot );
FT_LOCAL( FT_Error )
- CID_GlyphSlot_Init( CID_GlyphSlot slot );
+ cid_slot_init( CID_GlyphSlot slot );
FT_LOCAL( void )
- CID_Size_Done( CID_Size size );
+ cid_size_done( CID_Size size );
FT_LOCAL( FT_Error )
@@ -127,11 +127,11 @@
FT_LOCAL( FT_Error )
- CID_Size_Reset( CID_Size size );
+ cid_size_reset( CID_Size size );
FT_LOCAL( FT_Error )
- CID_Face_Init( FT_Stream stream,
+ cid_face_init( FT_Stream stream,
CID_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -139,15 +139,15 @@
FT_LOCAL( void )
- CID_Face_Done( CID_Face face );
+ cid_face_done( CID_Face face );
FT_LOCAL( FT_Error )
- CID_Driver_Init( CID_Driver driver );
+ cid_driver_init( CID_Driver driver );
FT_LOCAL( void )
- CID_Driver_Done( CID_Driver driver );
+ cid_driver_done( CID_Driver driver );
FT_END_HEADER
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -49,7 +49,7 @@
FT_LOCAL_DEF( FT_Error )
- CID_New_Parser( CID_Parser* parser,
+ cid_parser_new( CID_Parser* parser,
FT_Stream stream,
FT_Memory memory,
PSAux_Service psaux )
@@ -138,7 +138,7 @@
FT_LOCAL_DEF( void )
- CID_Done_Parser( CID_Parser* parser )
+ cid_parser_done( CID_Parser* parser )
{
/* always free the private dictionary */
if ( parser->postscript )
--- a/src/cid/cidparse.h
+++ b/src/cid/cidparse.h
@@ -72,13 +72,13 @@
FT_LOCAL( FT_Error )
- CID_New_Parser( CID_Parser* parser,
+ cid_parser_new( CID_Parser* parser,
FT_Stream stream,
FT_Memory memory,
PSAux_Service psaux );
FT_LOCAL( void )
- CID_Done_Parser( CID_Parser* parser );
+ cid_parser_done( CID_Parser* parser );
/*************************************************************************/
@@ -87,24 +87,24 @@
/* */
/*************************************************************************/
-#define CID_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
-#define CID_Skip_Alpha( p ) (p)->root.funcs.skip_alpha ( &(p)->root )
+#define cid_parser_skip_spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
+#define cid_parser_skip_alpha( p ) (p)->root.funcs.skip_alpha ( &(p)->root )
-#define CID_ToInt( p ) (p)->root.funcs.to_int( &(p)->root )
-#define CID_ToFixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
+#define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root )
+#define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
-#define CID_ToCoordArray( p, m, c ) \
+#define cid_parser_to_coord_array( p, m, c ) \
(p)->root.funcs.to_coord_array( &(p)->root, m, c )
-#define CID_ToFixedArray( p, m, f, t ) \
+#define cid_parser_to_fixed_array( p, m, f, t ) \
(p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
-#define CID_ToToken( p, t ) \
+#define cid_parser_to_token( p, t ) \
(p)->root.funcs.to_token( &(p)->root, t )
-#define CID_ToTokenArray( p, t, m, c ) \
+#define cid_parser_to_token_array( p, t, m, c ) \
(p)->root.funcs.to_token_array( &(p)->root, t, m, c )
-#define CID_Load_Field( p, f, o ) \
+#define cid_parser_load_field( p, f, o ) \
(p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
-#define CID_Load_Field_Table( p, f, o ) \
+#define cid_parser_load_field_table( p, f, o ) \
(p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
--- a/src/cid/cidriver.c
+++ b/src/cid/cidriver.c
@@ -50,7 +50,7 @@
static FT_Module_Interface
- CID_Get_Interface( FT_Driver driver,
+ cid_get_interface( FT_Driver driver,
const FT_String* cid_interface )
{
FT_UNUSED( driver );
@@ -80,9 +80,9 @@
0,
- (FT_Module_Constructor)CID_Driver_Init,
- (FT_Module_Destructor) CID_Driver_Done,
- (FT_Module_Requester) CID_Get_Interface
+ (FT_Module_Constructor)cid_driver_init,
+ (FT_Module_Destructor) cid_driver_done,
+ (FT_Module_Requester) cid_get_interface
},
/* then the other font drivers fields */
@@ -90,18 +90,18 @@
sizeof( CID_SizeRec ),
sizeof( CID_GlyphSlotRec ),
- (FT_Face_InitFunc) CID_Face_Init,
- (FT_Face_DoneFunc) CID_Face_Done,
+ (FT_Face_InitFunc) cid_face_init,
+ (FT_Face_DoneFunc) cid_face_done,
(FT_Size_InitFunc) CID_Size_Init,
- (FT_Size_DoneFunc) CID_Size_Done,
- (FT_Slot_InitFunc) CID_GlyphSlot_Init,
- (FT_Slot_DoneFunc) CID_GlyphSlot_Done,
+ (FT_Size_DoneFunc) cid_size_done,
+ (FT_Slot_InitFunc) cid_slot_init,
+ (FT_Slot_DoneFunc) cid_slot_done,
- (FT_Size_ResetPointsFunc)CID_Size_Reset,
- (FT_Size_ResetPixelsFunc)CID_Size_Reset,
+ (FT_Size_ResetPointsFunc)cid_size_reset,
+ (FT_Size_ResetPixelsFunc)cid_size_reset,
- (FT_Slot_LoadFunc) CID_Load_Glyph,
+ (FT_Slot_LoadFunc) cid_slot_load_glyph,
(FT_Face_GetKerningFunc) 0,
(FT_Face_AttachFunc) 0,
--- a/src/pcf/pcfdriver.c
+++ b/src/pcf/pcfdriver.c
@@ -253,13 +253,13 @@
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_none;
+ charmap.encoding = FT_ENCODING_NONE;
charmap.platform_id = 0;
charmap.encoding_id = 0;
if ( unicode_charmap )
{
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
charmap.platform_id = 3;
charmap.encoding_id = 1;
}
@@ -348,7 +348,7 @@
bitmap->rows = metric->ascent + metric->descent;
bitmap->width = metric->rightSideBearing - metric->leftSideBearing;
bitmap->num_grays = 1;
- bitmap->pixel_mode = ft_pixel_mode_mono;
+ bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
FT_TRACE6(( "BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\n",
PCF_BIT_ORDER( face->bitmapsFormat ),
@@ -418,7 +418,7 @@
slot->metrics.height = bitmap->rows << 6;
slot->linearHoriAdvance = (FT_Fixed)bitmap->width << 16;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
slot->flags = FT_GLYPH_OWN_BITMAP;
FT_TRACE4(( " --- ok\n" ));
--- a/src/pfr/pfrgload.c
+++ b/src/pfr/pfrgload.c
@@ -139,7 +139,7 @@
outline->points[n] = *to;
- outline->tags [n] = FT_Curve_Tag_On;
+ outline->tags [n] = FT_CURVE_TAG_ON;
outline->n_points++;
}
@@ -172,9 +172,9 @@
vec[0] = *control1;
vec[1] = *control2;
vec[2] = *to;
- tag[0] = FT_Curve_Tag_Cubic;
- tag[1] = FT_Curve_Tag_Cubic;
- tag[2] = FT_Curve_Tag_On;
+ tag[0] = FT_CURVE_TAG_CUBIC;
+ tag[1] = FT_CURVE_TAG_CUBIC;
+ tag[2] = FT_CURVE_TAG_ON;
outline->n_points = (FT_Short)( outline->n_points + 3 );
}
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -172,7 +172,7 @@
charmap.face = root;
charmap.platform_id = 3;
charmap.encoding_id = 1;
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
@@ -238,7 +238,7 @@
FT_ASSERT( gindex < face->phy_font.num_chars );
gchar = face->phy_font.chars + gindex;
- slot->root.format = ft_glyph_format_outline;
+ slot->root.format = FT_GLYPH_FORMAT_OUTLINE;
outline->n_points = 0;
outline->n_contours = 0;
gps_offset = face->header.gps_section_offset;
@@ -261,11 +261,11 @@
/* copy outline data */
*outline = slot->glyph.loader->base.outline;
- outline->flags &= ~ft_outline_owner;
- outline->flags |= ft_outline_reverse_fill;
+ outline->flags &= ~FT_OUTLINE_OWNER;
+ outline->flags |= FT_OUTLINE_REVERSE_FILL;
if ( size && size->root.metrics.y_ppem < 24 )
- outline->flags |= ft_outline_high_precision;
+ outline->flags |= FT_OUTLINE_HIGH_PRECISION;
/* compute the advance vector */
metrics->horiAdvance = 0;
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -26,10 +26,10 @@
FT_CALLBACK_TABLE_DEF
const PS_Table_FuncsRec ps_table_funcs =
{
- PS_Table_New,
- PS_Table_Done,
- PS_Table_Add,
- PS_Table_Release
+ ps_table_new,
+ ps_table_done,
+ ps_table_add,
+ ps_table_release
};
@@ -36,18 +36,18 @@
FT_CALLBACK_TABLE_DEF
const PS_Parser_FuncsRec ps_parser_funcs =
{
- PS_Parser_Init,
- PS_Parser_Done,
- PS_Parser_SkipSpaces,
- PS_Parser_SkipAlpha,
- PS_Parser_ToInt,
- PS_Parser_ToFixed,
- PS_Parser_ToCoordArray,
- PS_Parser_ToFixedArray,
- PS_Parser_ToToken,
- PS_Parser_ToTokenArray,
- PS_Parser_LoadField,
- PS_Parser_LoadFieldTable
+ ps_parser_init,
+ ps_parser_done,
+ ps_parser_skip_spaces,
+ ps_parser_skip_alpha,
+ ps_parser_to_int,
+ ps_parser_to_fixed,
+ ps_parser_to_coord_array,
+ ps_parser_to_fixed_array,
+ ps_parser_to_token,
+ ps_parser_to_token_array,
+ ps_parser_load_field,
+ ps_parser_load_field_table
};
@@ -54,14 +54,14 @@
FT_CALLBACK_TABLE_DEF
const T1_Builder_FuncsRec t1_builder_funcs =
{
- T1_Builder_Init,
- T1_Builder_Done,
- T1_Builder_Check_Points,
- T1_Builder_Add_Point,
+ t1_builder_init,
+ t1_builder_done,
+ t1_builder_check_points,
+ t1_builder_add_point,
T1_Builder_Add_Point1,
- T1_Builder_Add_Contour,
- T1_Builder_Start_Point,
- T1_Builder_Close_Contour
+ t1_builder_add_contour,
+ t1_builder_start_point,
+ t1_builder_close_contour
};
@@ -68,9 +68,9 @@
FT_CALLBACK_TABLE_DEF
const T1_Decoder_FuncsRec t1_decoder_funcs =
{
- T1_Decoder_Init,
- T1_Decoder_Done,
- T1_Decoder_Parse_Charstrings
+ t1_decoder_init,
+ t1_decoder_done,
+ t1_decoder_parse_charstrings
};
@@ -92,7 +92,7 @@
&t1_builder_funcs,
&t1_decoder_funcs,
- T1_Decrypt,
+ t1_decrypt,
(const T1_CMap_ClassesRec*) &t1_cmap_classes,
};
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -36,7 +36,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* PS_Table_New */
+ /* ps_table_new */
/* */
/* <Description> */
/* Initializes a PS_Table. */
@@ -54,7 +54,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- PS_Table_New( PS_Table table,
+ ps_table_new( PS_Table table,
FT_Int count,
FT_Memory memory )
{
@@ -72,7 +72,7 @@
table->block = 0;
table->capacity = 0;
table->cursor = 0;
-
+
*(PS_Table_FuncsRec*)&table->funcs = ps_table_funcs;
Exit:
@@ -130,7 +130,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* PS_Table_Add */
+ /* ps_table_add */
/* */
/* <Description> */
/* Adds an object to a PS_Table, possibly growing its memory block. */
@@ -150,7 +150,7 @@
/* reallocation fails. */
/* */
FT_LOCAL_DEF( FT_Error )
- PS_Table_Add( PS_Table table,
+ ps_table_add( PS_Table table,
FT_Int idx,
void* object,
FT_Int length )
@@ -157,7 +157,7 @@
{
if ( idx < 0 || idx > table->max_elems )
{
- FT_ERROR(( "PS_Table_Add: invalid index\n" ));
+ FT_ERROR(( "ps_table_add: invalid index\n" ));
return PSaux_Err_Invalid_Argument;
}
@@ -197,7 +197,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* PS_Table_Done */
+ /* ps_table_done */
/* */
/* <Description> */
/* Finalizes a PS_TableRec (i.e., reallocate it to its current */
@@ -211,7 +211,7 @@
/* to the caller to clean it, or reference it in its own structures. */
/* */
FT_LOCAL_DEF( void )
- PS_Table_Done( PS_Table table )
+ ps_table_done( PS_Table table )
{
FT_Memory memory = table->memory;
FT_Error error;
@@ -235,7 +235,7 @@
FT_LOCAL_DEF( void )
- PS_Table_Release( PS_Table table )
+ ps_table_release( PS_Table table )
{
FT_Memory memory = table->memory;
@@ -266,7 +266,7 @@
FT_LOCAL_DEF( void )
- PS_Parser_SkipSpaces( PS_Parser parser )
+ ps_parser_skip_spaces( PS_Parser parser )
{
FT_Byte* cur = parser->cursor;
FT_Byte* limit = parser->limit;
@@ -286,7 +286,7 @@
FT_LOCAL_DEF( void )
- PS_Parser_SkipAlpha( PS_Parser parser )
+ ps_parser_skip_alpha( PS_Parser parser )
{
FT_Byte* cur = parser->cursor;
FT_Byte* limit = parser->limit;
@@ -306,8 +306,8 @@
FT_LOCAL_DEF( void )
- PS_Parser_ToToken( PS_Parser parser,
- T1_Token token )
+ ps_parser_to_token( PS_Parser parser,
+ T1_Token token )
{
FT_Byte* cur;
FT_Byte* limit;
@@ -320,7 +320,7 @@
token->limit = 0;
/* first of all, skip space */
- PS_Parser_SkipSpaces( parser );
+ ps_parser_skip_spaces( parser );
cur = parser->cursor;
limit = parser->limit;
@@ -389,10 +389,10 @@
FT_LOCAL_DEF( void )
- PS_Parser_ToTokenArray( PS_Parser parser,
- T1_Token tokens,
- FT_UInt max_tokens,
- FT_Int* pnum_tokens )
+ ps_parser_to_token_array( PS_Parser parser,
+ T1_Token tokens,
+ FT_UInt max_tokens,
+ FT_Int* pnum_tokens )
{
T1_TokenRec master;
@@ -399,7 +399,7 @@
*pnum_tokens = -1;
- PS_Parser_ToToken( parser, &master );
+ ps_parser_to_token( parser, &master );
if ( master.type == T1_TOKEN_TYPE_ARRAY )
{
FT_Byte* old_cursor = parser->cursor;
@@ -416,7 +416,7 @@
T1_TokenRec token;
- PS_Parser_ToToken( parser, &token );
+ ps_parser_to_token( parser, &token );
if ( !token.type )
break;
@@ -829,11 +829,11 @@
/* Load a simple field (i.e. non-table) into the current list of objects */
FT_LOCAL_DEF( FT_Error )
- PS_Parser_LoadField( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags )
+ ps_parser_load_field( PS_Parser parser,
+ const T1_Field field,
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags )
{
T1_TokenRec token;
FT_Byte* cur;
@@ -843,7 +843,7 @@
FT_Error error;
- PS_Parser_ToToken( parser, &token );
+ ps_parser_to_token( parser, &token );
if ( !token.type )
goto Fail;
@@ -858,15 +858,15 @@
T1_TokenRec token2;
FT_Byte* old_cur = parser->cursor;
FT_Byte* old_limit = parser->limit;
-
+
parser->cursor = token.start;
parser->limit = token.limit;
-
- PS_Parser_ToToken( parser, &token2 );
+
+ ps_parser_to_token( parser, &token2 );
parser->cursor = old_cur;
parser->limit = old_limit;
-
+
if ( token2.type == T1_TOKEN_TYPE_ARRAY )
goto FieldArray;
}
@@ -945,8 +945,8 @@
{
FT_Fixed temp[4];
FT_BBox* bbox = (FT_BBox*)q;
-
+
/* we need the '[' and ']' delimiters */
token.start--;
token.limit++;
@@ -987,11 +987,11 @@
FT_LOCAL_DEF( FT_Error )
- PS_Parser_LoadFieldTable( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags )
+ ps_parser_load_field_table( PS_Parser parser,
+ const T1_Field field,
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags )
{
T1_TokenRec elements[T1_MAX_TABLE_ELEMENTS];
T1_Token token;
@@ -1008,7 +1008,7 @@
fieldrec.type = T1_FIELD_TYPE_FIXED;
#endif
- PS_Parser_ToTokenArray( parser, elements, 32, &num_elements );
+ ps_parser_to_token_array( parser, elements, 32, &num_elements );
if ( num_elements < 0 )
goto Fail;
@@ -1028,7 +1028,7 @@
{
parser->cursor = token->start;
parser->limit = token->limit;
- PS_Parser_LoadField( parser, &fieldrec, objects, max_objects, 0 );
+ ps_parser_load_field( parser, &fieldrec, objects, max_objects, 0 );
fieldrec.offset += fieldrec.size;
}
@@ -1052,7 +1052,7 @@
FT_LOCAL_DEF( FT_Long )
- PS_Parser_ToInt( PS_Parser parser )
+ ps_parser_to_int( PS_Parser parser )
{
return t1_toint( &parser->cursor, parser->limit );
}
@@ -1059,8 +1059,8 @@
FT_LOCAL_DEF( FT_Fixed )
- PS_Parser_ToFixed( PS_Parser parser,
- FT_Int power_ten )
+ ps_parser_to_fixed( PS_Parser parser,
+ FT_Int power_ten )
{
return t1_tofixed( &parser->cursor, parser->limit, power_ten );
}
@@ -1067,9 +1067,9 @@
FT_LOCAL_DEF( FT_Int )
- PS_Parser_ToCoordArray( PS_Parser parser,
- FT_Int max_coords,
- FT_Short* coords )
+ ps_parser_to_coord_array( PS_Parser parser,
+ FT_Int max_coords,
+ FT_Short* coords )
{
return t1_tocoordarray( &parser->cursor, parser->limit,
max_coords, coords );
@@ -1077,10 +1077,10 @@
FT_LOCAL_DEF( FT_Int )
- PS_Parser_ToFixedArray( PS_Parser parser,
- FT_Int max_values,
- FT_Fixed* values,
- FT_Int power_ten )
+ ps_parser_to_fixed_array( PS_Parser parser,
+ FT_Int max_values,
+ FT_Fixed* values,
+ FT_Int power_ten )
{
return t1_tofixedarray( &parser->cursor, parser->limit,
max_values, values, power_ten );
@@ -1106,7 +1106,7 @@
FT_LOCAL_DEF( void )
- PS_Parser_Init( PS_Parser parser,
+ ps_parser_init( PS_Parser parser,
FT_Byte* base,
FT_Byte* limit,
FT_Memory memory )
@@ -1121,7 +1121,7 @@
FT_LOCAL_DEF( void )
- PS_Parser_Done( PS_Parser parser )
+ ps_parser_done( PS_Parser parser )
{
FT_UNUSED( parser );
}
@@ -1138,7 +1138,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* T1_Builder_Init */
+ /* t1_builder_init */
/* */
/* <Description> */
/* Initializes a given glyph builder. */
@@ -1156,7 +1156,7 @@
/* hinting :: Whether hinting should be applied. */
/* */
FT_LOCAL_DEF( void )
- T1_Builder_Init( T1_Builder builder,
+ t1_builder_init( T1_Builder builder,
FT_Face face,
FT_Size size,
FT_GlyphSlot glyph,
@@ -1207,7 +1207,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* T1_Builder_Done */
+ /* t1_builder_done */
/* */
/* <Description> */
/* Finalizes a given glyph builder. Its contents can still be used */
@@ -1218,7 +1218,7 @@
/* builder :: A pointer to the glyph builder to finalize. */
/* */
FT_LOCAL_DEF( void )
- T1_Builder_Done( T1_Builder builder )
+ t1_builder_done( T1_Builder builder )
{
FT_GlyphSlot glyph = builder->glyph;
@@ -1230,7 +1230,7 @@
/* check that there is enough space for `count' more points */
FT_LOCAL_DEF( FT_Error )
- T1_Builder_Check_Points( T1_Builder builder,
+ t1_builder_check_points( T1_Builder builder,
FT_Int count )
{
return FT_GlyphLoader_CheckPoints( builder->loader, count, 0 );
@@ -1239,7 +1239,7 @@
/* add a new point, do not check space */
FT_LOCAL_DEF( void )
- T1_Builder_Add_Point( T1_Builder builder,
+ t1_builder_add_point( T1_Builder builder,
FT_Pos x,
FT_Pos y,
FT_Byte flag )
@@ -1260,7 +1260,7 @@
}
point->x = x;
point->y = y;
- *control = (FT_Byte)( flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic );
+ *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
builder->last = *point;
}
@@ -1277,9 +1277,9 @@
FT_Error error;
- error = T1_Builder_Check_Points( builder, 1 );
+ error = t1_builder_check_points( builder, 1 );
if ( !error )
- T1_Builder_Add_Point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
return error;
}
@@ -1287,7 +1287,7 @@
/* check room for a new contour, then add it */
FT_LOCAL_DEF( FT_Error )
- T1_Builder_Add_Contour( T1_Builder builder )
+ t1_builder_add_contour( T1_Builder builder )
{
FT_Outline* outline = builder->current;
FT_Error error;
@@ -1315,7 +1315,7 @@
/* if a path was begun, add its first on-curve point */
FT_LOCAL_DEF( FT_Error )
- T1_Builder_Start_Point( T1_Builder builder,
+ t1_builder_start_point( T1_Builder builder,
FT_Pos x,
FT_Pos y )
{
@@ -1326,7 +1326,7 @@
if ( !builder->path_begun )
{
builder->path_begun = 1;
- error = T1_Builder_Add_Contour( builder );
+ error = t1_builder_add_contour( builder );
if ( !error )
error = T1_Builder_Add_Point1( builder, x, y );
}
@@ -1336,7 +1336,7 @@
/* close the current contour */
FT_LOCAL_DEF( void )
- T1_Builder_Close_Contour( T1_Builder builder )
+ t1_builder_close_contour( T1_Builder builder )
{
FT_Outline* outline = builder->current;
@@ -1360,7 +1360,7 @@
/* `delete' last point only if it coincides with the first */
/* point and it is not a control point (which can happen). */
if ( p1->x == p2->x && p1->y == p2->y )
- if ( *control == FT_Curve_Tag_On )
+ if ( *control == FT_CURVE_TAG_ON )
outline->n_points--;
}
@@ -1379,7 +1379,7 @@
/*************************************************************************/
FT_LOCAL_DEF( void )
- T1_Decrypt( FT_Byte* buffer,
+ t1_decrypt( FT_Byte* buffer,
FT_Offset length,
FT_UShort seed )
{
--- a/src/psaux/psobjs.h
+++ b/src/psaux/psobjs.h
@@ -47,22 +47,22 @@
FT_LOCAL( FT_Error )
- PS_Table_New( PS_Table table,
+ ps_table_new( PS_Table table,
FT_Int count,
FT_Memory memory );
FT_LOCAL( FT_Error )
- PS_Table_Add( PS_Table table,
+ ps_table_add( PS_Table table,
FT_Int idx,
void* object,
FT_Int length );
FT_LOCAL( void )
- PS_Table_Done( PS_Table table );
+ ps_table_done( PS_Table table );
FT_LOCAL( void )
- PS_Table_Release( PS_Table table );
+ ps_table_release( PS_Table table );
/*************************************************************************/
@@ -75,64 +75,64 @@
FT_LOCAL( void )
- PS_Parser_SkipSpaces( PS_Parser parser );
+ ps_parser_skip_spaces( PS_Parser parser );
FT_LOCAL( void )
- PS_Parser_SkipAlpha( PS_Parser parser );
+ ps_parser_skip_alpha( PS_Parser parser );
FT_LOCAL( void )
- PS_Parser_ToToken( PS_Parser parser,
- T1_Token token );
+ ps_parser_to_token( PS_Parser parser,
+ T1_Token token );
FT_LOCAL( void )
- PS_Parser_ToTokenArray( PS_Parser parser,
- T1_Token tokens,
- FT_UInt max_tokens,
- FT_Int* pnum_tokens );
+ ps_parser_to_token_array( PS_Parser parser,
+ T1_Token tokens,
+ FT_UInt max_tokens,
+ FT_Int* pnum_tokens );
FT_LOCAL( FT_Error )
- PS_Parser_LoadField( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags );
+ ps_parser_load_field( PS_Parser parser,
+ const T1_Field field,
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags );
FT_LOCAL( FT_Error )
- PS_Parser_LoadFieldTable( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags );
+ ps_parser_load_field_table( PS_Parser parser,
+ const T1_Field field,
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags );
FT_LOCAL( FT_Long )
- PS_Parser_ToInt( PS_Parser parser );
+ ps_parser_to_int( PS_Parser parser );
FT_LOCAL( FT_Fixed )
- PS_Parser_ToFixed( PS_Parser parser,
- FT_Int power_ten );
+ ps_parser_to_fixed( PS_Parser parser,
+ FT_Int power_ten );
FT_LOCAL( FT_Int )
- PS_Parser_ToCoordArray( PS_Parser parser,
- FT_Int max_coords,
- FT_Short* coords );
+ ps_parser_to_coord_array( PS_Parser parser,
+ FT_Int max_coords,
+ FT_Short* coords );
FT_LOCAL( FT_Int )
- PS_Parser_ToFixedArray( PS_Parser parser,
- FT_Int max_values,
- FT_Fixed* values,
- FT_Int power_ten );
+ ps_parser_to_fixed_array( PS_Parser parser,
+ FT_Int max_values,
+ FT_Fixed* values,
+ FT_Int power_ten );
FT_LOCAL( void )
- PS_Parser_Init( PS_Parser parser,
+ ps_parser_init( PS_Parser parser,
FT_Byte* base,
FT_Byte* limit,
FT_Memory memory );
FT_LOCAL( void )
- PS_Parser_Done( PS_Parser parser );
+ ps_parser_done( PS_Parser parser );
/*************************************************************************/
@@ -144,7 +144,7 @@
/*************************************************************************/
FT_LOCAL( void )
- T1_Builder_Init( T1_Builder builder,
+ t1_builder_init( T1_Builder builder,
FT_Face face,
FT_Size size,
FT_GlyphSlot glyph,
@@ -151,14 +151,14 @@
FT_Bool hinting );
FT_LOCAL( void )
- T1_Builder_Done( T1_Builder builder );
+ t1_builder_done( T1_Builder builder );
FT_LOCAL( FT_Error )
- T1_Builder_Check_Points( T1_Builder builder,
+ t1_builder_check_points( T1_Builder builder,
FT_Int count );
FT_LOCAL( void )
- T1_Builder_Add_Point( T1_Builder builder,
+ t1_builder_add_point( T1_Builder builder,
FT_Pos x,
FT_Pos y,
FT_Byte flag );
@@ -169,17 +169,17 @@
FT_Pos y );
FT_LOCAL( FT_Error )
- T1_Builder_Add_Contour( T1_Builder builder );
+ t1_builder_add_contour( T1_Builder builder );
FT_LOCAL( FT_Error )
- T1_Builder_Start_Point( T1_Builder builder,
+ t1_builder_start_point( T1_Builder builder,
FT_Pos x,
FT_Pos y );
FT_LOCAL( void )
- T1_Builder_Close_Contour( T1_Builder builder );
+ t1_builder_close_contour( T1_Builder builder );
/*************************************************************************/
@@ -191,7 +191,7 @@
/*************************************************************************/
FT_LOCAL( void )
- T1_Decrypt( FT_Byte* buffer,
+ t1_decrypt( FT_Byte* buffer,
FT_Offset length,
FT_UShort seed );
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -247,7 +247,7 @@
/* set up remaining glyph fields */
glyph->num_subglyphs = 2;
glyph->subglyphs = loader->base.subglyphs;
- glyph->format = ft_glyph_format_composite;
+ glyph->format = FT_GLYPH_FORMAT_COMPOSITE;
loader->current.num_subglyphs = 2;
goto Exit;
@@ -258,7 +258,7 @@
FT_GlyphLoader_Prepare( decoder->builder.loader ); /* prepare loader */
- error = T1_Decoder_Parse_Glyph( decoder, bchar_index );
+ error = t1_decoder_parse_glyph( decoder, bchar_index );
if ( error )
goto Exit;
@@ -280,7 +280,7 @@
/* Now load `achar' on top of */
/* the base outline */
- error = T1_Decoder_Parse_Glyph( decoder, achar_index );
+ error = t1_decoder_parse_glyph( decoder, achar_index );
if ( error )
goto Exit;
@@ -316,7 +316,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* T1_Decoder_Parse_Charstrings */
+ /* t1_decoder_parse_charstrings */
/* */
/* <Description> */
/* Parses a given Type 1 charstrings program. */
@@ -332,7 +332,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- T1_Decoder_Parse_Charstrings( T1_Decoder decoder,
+ t1_decoder_parse_charstrings( T1_Decoder decoder,
FT_Byte* charstring_base,
FT_UInt charstring_len )
{
@@ -347,12 +347,12 @@
/* we don't want to touch the source code -- use macro trick */
-#define start_point T1_Builder_Start_Point
-#define check_points T1_Builder_Check_Points
-#define add_point T1_Builder_Add_Point
+#define start_point t1_builder_start_point
+#define check_points t1_builder_check_points
+#define add_point t1_builder_add_point
#define add_point1 T1_Builder_Add_Point1
-#define add_contour T1_Builder_Add_Contour
-#define close_contour T1_Builder_Close_Contour
+#define add_contour t1_builder_add_contour
+#define close_contour t1_builder_close_contour
/* First of all, initialize the decoder */
decoder->top = decoder->stack;
@@ -453,7 +453,7 @@
case 12:
if ( ip > limit )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid escape (12+EOF)\n" ));
goto Syntax_Error;
}
@@ -489,7 +489,7 @@
break;
default:
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid escape (12+%d)\n",
ip[-1] ));
goto Syntax_Error;
@@ -499,7 +499,7 @@
case 255: /* four bytes integer */
if ( ip + 4 > limit )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"unexpected EOF in integer\n" ));
goto Syntax_Error;
}
@@ -520,7 +520,7 @@
{
if ( ++ip > limit )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "unexpected EOF in integer\n" ));
goto Syntax_Error;
}
@@ -533,7 +533,7 @@
}
else
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid byte (%d)\n", ip[-1] ));
goto Syntax_Error;
}
@@ -548,7 +548,7 @@
{
if ( top - decoder->stack >= T1_MAX_CHARSTRINGS_OPERANDS )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: stack overflow!\n" ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: stack overflow!\n" ));
goto Syntax_Error;
}
@@ -605,7 +605,7 @@
if ( decoder->flex_state == 0 ||
decoder->num_flex_vectors != 7 )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"unexpected flex end\n" ));
goto Syntax_Error;
}
@@ -616,7 +616,7 @@
ip[2] != 12 || ip[3] != 17 || /* pop */
ip[4] != 12 || ip[5] != 33 ) /* setcurpoint */
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid flex charstring\n" ));
goto Syntax_Error;
}
@@ -632,7 +632,7 @@
/* eat the following `pop' */
if ( ip + 2 > limit )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid escape (12+%d)\n", ip[-1] ));
goto Syntax_Error;
}
@@ -639,7 +639,7 @@
if ( ip[0] != 12 || ip[1] != 17 )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "`pop' expected, found (%d %d)\n", ip[0], ip[1] ));
goto Syntax_Error;
}
@@ -670,7 +670,7 @@
if ( !blend )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "unexpected multiple masters operator!\n" ));
goto Syntax_Error;
}
@@ -678,7 +678,7 @@
num_points = top[1] - 13 + ( top[1] == 18 );
if ( top[0] != (FT_Int)( num_points * blend->num_designs ) )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "incorrect number of mm arguments\n" ));
goto Syntax_Error;
}
@@ -720,7 +720,7 @@
default:
Unexpected_OtherSubr:
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid othersubr [%d %d]!\n", top[0], top[1] ));
goto Syntax_Error;
}
@@ -933,7 +933,7 @@
}
else
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: division by 0\n" ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: division by 0\n" ));
goto Syntax_Error;
}
break;
@@ -948,7 +948,7 @@
idx = top[0];
if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid subrs index\n" ));
goto Syntax_Error;
}
@@ -955,7 +955,7 @@
if ( zone - decoder->zones >= T1_MAX_SUBRS_CALLS )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"too many nested subrs\n" ));
goto Syntax_Error;
}
@@ -983,7 +983,7 @@
if ( !zone->base )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invoking empty subrs!\n" ));
goto Syntax_Error;
}
@@ -1006,7 +1006,7 @@
if ( zone <= decoder->zones )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: unexpected return\n" ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: unexpected return\n" ));
goto Syntax_Error;
}
@@ -1073,12 +1073,12 @@
case op_setcurrentpoint:
FT_TRACE4(( " setcurrentpoint" ));
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "unexpected `setcurrentpoint'\n" ));
goto Syntax_Error;
default:
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"unhandled opcode %d\n", op ));
goto Syntax_Error;
}
@@ -1106,7 +1106,7 @@
/* parse a single Type 1 glyph */
FT_LOCAL_DEF( FT_Error )
- T1_Decoder_Parse_Glyph( T1_Decoder decoder,
+ t1_decoder_parse_glyph( T1_Decoder decoder,
FT_UInt glyph )
{
return decoder->parse_callback( decoder, glyph );
@@ -1115,7 +1115,7 @@
/* initialize T1 decoder */
FT_LOCAL_DEF( FT_Error )
- T1_Decoder_Init( T1_Decoder decoder,
+ t1_decoder_init( T1_Decoder decoder,
FT_Face face,
FT_Size size,
FT_GlyphSlot slot,
@@ -1135,7 +1135,7 @@
FT_FACE_LIBRARY(face), "psnames" );
if ( !psnames )
{
- FT_ERROR(( "T1_Decoder_Init: " ));
+ FT_ERROR(( "t1_decoder_init: " ));
FT_ERROR(( "the `psnames' module is not available\n" ));
return PSaux_Err_Unimplemented_Feature;
}
@@ -1143,7 +1143,7 @@
decoder->psnames = psnames;
}
- T1_Builder_Init( &decoder->builder, face, size, slot, hinting );
+ t1_builder_init( &decoder->builder, face, size, slot, hinting );
decoder->num_glyphs = face->num_glyphs;
decoder->glyph_names = glyph_names;
@@ -1159,9 +1159,9 @@
/* finalize T1 decoder */
FT_LOCAL_DEF( void )
- T1_Decoder_Done( T1_Decoder decoder )
+ t1_decoder_done( T1_Decoder decoder )
{
- T1_Builder_Done( &decoder->builder );
+ t1_builder_done( &decoder->builder );
}
--- a/src/psaux/t1decode.h
+++ b/src/psaux/t1decode.h
@@ -34,16 +34,16 @@
FT_LOCAL( FT_Error )
- T1_Decoder_Parse_Glyph( T1_Decoder decoder,
+ t1_decoder_parse_glyph( T1_Decoder decoder,
FT_UInt glyph_index );
FT_LOCAL( FT_Error )
- T1_Decoder_Parse_Charstrings( T1_Decoder decoder,
+ t1_decoder_parse_charstrings( T1_Decoder decoder,
FT_Byte* base,
FT_UInt len );
FT_LOCAL( FT_Error )
- T1_Decoder_Init( T1_Decoder decoder,
+ t1_decoder_init( T1_Decoder decoder,
FT_Face face,
FT_Size size,
FT_GlyphSlot slot,
@@ -53,7 +53,7 @@
T1_Decoder_Callback parse_glyph );
FT_LOCAL( void )
- T1_Decoder_Done( T1_Decoder decoder );
+ t1_decoder_done( T1_Decoder decoder );
FT_END_HEADER
--- a/src/pshinter/pshalgo2.c
+++ b/src/pshinter/pshalgo2.c
@@ -927,7 +927,7 @@
FT_Pos dxi, dyi, dxo, dyo;
- if ( !( outline->tags[n] & FT_Curve_Tag_On ) )
+ if ( !( outline->tags[n] & FT_CURVE_TAG_ON ) )
point->flags = PSH2_POINT_OFF;
dxi = vec[n].x - vec[n_prev].x;
--- a/src/pshinter/pshalgo3.c
+++ b/src/pshinter/pshalgo3.c
@@ -968,7 +968,7 @@
FT_Pos dxi, dyi, dxo, dyo;
- if ( !( outline->tags[n] & FT_Curve_Tag_On ) )
+ if ( !( outline->tags[n] & FT_CURVE_TAG_ON ) )
point->flags = PSH3_POINT_OFF;
dxi = vec[n].x - vec[n_prev].x;
@@ -1374,7 +1374,7 @@
{
FT_Pos delta;
-
+
if ( psh3_point_is_edge_min( point ) )
{
point->cur_u = hint->cur_pos;
@@ -1714,7 +1714,7 @@
{
/* load outline coordinates into glyph */
psh3_glyph_load_points( glyph, dimension );
-
+
/* compute local extrema */
psh3_glyph_compute_extrema( glyph );
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -37,7 +37,7 @@
/* the name, as in `A.swash' or `e.final', etc. */
/* */
static FT_ULong
- PS_Unicode_Value( const char* glyph_name )
+ ps_unicode_value( const char* glyph_name )
{
FT_Int n;
char first = glyph_name[0];
@@ -139,7 +139,7 @@
/* Builds a table that maps Unicode values to glyph indices */
static FT_Error
- PS_Build_Unicode_Table( FT_Memory memory,
+ ps_build_unicode_table( FT_Memory memory,
FT_UInt num_glyphs,
const char** glyph_names,
PS_Unicodes* table )
@@ -168,7 +168,7 @@
if ( gname )
{
- uni_char = PS_Unicode_Value( gname );
+ uni_char = ps_unicode_value( gname );
if ( uni_char != 0 && uni_char != 0xFFFF )
{
@@ -205,7 +205,7 @@
static FT_UInt
- PS_Lookup_Unicode( PS_Unicodes* table,
+ ps_lookup_unicode( PS_Unicodes* table,
FT_ULong unicode )
{
PS_UniMap *min, *max, *mid;
@@ -236,7 +236,7 @@
static FT_ULong
- PS_Next_Unicode( PS_Unicodes* table,
+ ps_next_unicode( PS_Unicodes* table,
FT_ULong unicode )
{
PS_UniMap *min, *max, *mid;
@@ -265,7 +265,7 @@
if ( max < table->maps )
max = table->maps;
-
+
while ( max < table->maps + table->num_maps )
{
if ( unicode < max->unicode )
@@ -281,7 +281,7 @@
static const char*
- PS_Macintosh_Name( FT_UInt name_index )
+ ps_get_macintosh_name( FT_UInt name_index )
{
if ( name_index >= 258 )
name_index = 0;
@@ -291,7 +291,7 @@
static const char*
- PS_Standard_Strings( FT_UInt sid )
+ ps_get_standard_strings( FT_UInt sid )
{
return ( sid < NUM_SID_GLYPHS ? sid_standard_names[sid] : 0 );
}
@@ -302,9 +302,9 @@
{
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
- (PS_Unicode_Value_Func) PS_Unicode_Value,
- (PS_Build_Unicodes_Func) PS_Build_Unicode_Table,
- (PS_Lookup_Unicode_Func) PS_Lookup_Unicode,
+ (PS_Unicode_Value_Func) ps_unicode_value,
+ (PS_Build_Unicodes_Func) ps_build_unicode_table,
+ (PS_Lookup_Unicode_Func) ps_lookup_unicode,
#else
@@ -314,14 +314,14 @@
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
- (PS_Macintosh_Name_Func) PS_Macintosh_Name,
- (PS_Adobe_Std_Strings_Func)PS_Standard_Strings,
+ (PS_Macintosh_Name_Func) ps_get_macintosh_name,
+ (PS_Adobe_Std_Strings_Func) ps_get_standard_strings,
t1_standard_encoding,
t1_expert_encoding,
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
- (PS_Next_Unicode_Func) PS_Next_Unicode
+ (PS_Next_Unicode_Func) ps_next_unicode
#else
0
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -1635,14 +1635,14 @@
tag = FT_CURVE_TAG( tags[0] );
/* A contour cannot start with a cubic control point! */
- if ( tag == FT_Curve_Tag_Cubic )
+ if ( tag == FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
/* check first point to determine origin */
- if ( tag == FT_Curve_Tag_Conic )
+ if ( tag == FT_CURVE_TAG_CONIC )
{
/* first point is conic control. Yes, this happens. */
- if ( FT_CURVE_TAG( ras.outline.tags[last] ) == FT_Curve_Tag_On )
+ if ( FT_CURVE_TAG( ras.outline.tags[last] ) == FT_CURVE_TAG_ON )
{
/* start at last point if it is on the curve */
v_start = v_last;
@@ -1674,7 +1674,7 @@
switch ( tag )
{
- case FT_Curve_Tag_On: /* emit a single line_to */
+ case FT_CURVE_TAG_ON: /* emit a single line_to */
{
Long x, y;
@@ -1689,7 +1689,7 @@
continue;
}
- case FT_Curve_Tag_Conic: /* consume conic arcs */
+ case FT_CURVE_TAG_CONIC: /* consume conic arcs */
v_control.x = SCALED( point[0].x );
v_control.y = SCALED( point[0].y );
@@ -1713,7 +1713,7 @@
if ( flipped )
SWAP_( x, y );
- if ( tag == FT_Curve_Tag_On )
+ if ( tag == FT_CURVE_TAG_ON )
{
if ( Conic_To( RAS_VARS v_control.x, v_control.y, x, y ) )
goto Fail;
@@ -1720,7 +1720,7 @@
continue;
}
- if ( tag != FT_Curve_Tag_Conic )
+ if ( tag != FT_CURVE_TAG_CONIC )
goto Invalid_Outline;
v_middle.x = ( v_control.x + x ) / 2;
@@ -1742,13 +1742,13 @@
goto Close;
- default: /* FT_Curve_Tag_Cubic */
+ default: /* FT_CURVE_TAG_CUBIC */
{
Long x1, y1, x2, y2, x3, y3;
if ( point + 1 > limit ||
- FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
+ FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
point += 2;
@@ -2972,11 +2972,11 @@
Set_High_Precision( RAS_VARS ras.outline.flags &
- ft_outline_high_precision );
+ FT_OUTLINE_HIGH_PRECISION );
ras.scale_shift = ras.precision_shift;
ras.dropOutControl = 2;
ras.second_pass = (FT_Byte)( !( ras.outline.flags &
- ft_outline_single_pass ) );
+ FT_OUTLINE_SINGLE_PASS ) );
/* Vertical Sweep */
ras.Proc_Sweep_Init = Vertical_Sweep_Init;
@@ -3036,10 +3036,10 @@
Set_High_Precision( RAS_VARS ras.outline.flags &
- ft_outline_high_precision );
+ FT_OUTLINE_HIGH_PRECISION );
ras.scale_shift = ras.precision_shift + 1;
ras.dropOutControl = 2;
- ras.second_pass = !( ras.outline.flags & ft_outline_single_pass );
+ ras.second_pass = !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS );
/* Vertical Sweep */
@@ -3259,7 +3259,7 @@
return Raster_Err_Invalid;
/* this version of the raster does not support direct rendering, sorry */
- if ( params->flags & ft_raster_flag_direct )
+ if ( params->flags & FT_RASTER_FLAG_DIRECT )
return Raster_Err_Unsupported;
if ( !target_map || !target_map->buffer )
@@ -3268,7 +3268,7 @@
ras.outline = *outline;
ras.target = *target_map;
- return ( ( params->flags & ft_raster_flag_aa )
+ return ( ( params->flags & FT_RASTER_FLAG_AA )
? Render_Gray_Glyph( raster )
: Render_Glyph( raster ) );
}
@@ -3276,7 +3276,7 @@
const FT_Raster_Funcs ft_standard_raster =
{
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
(FT_Raster_New_Func) ft_black_new,
(FT_Raster_Reset_Func) ft_black_reset,
(FT_Raster_Set_Mode_Func)ft_black_set_mode,
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -118,7 +118,7 @@
}
/* check rendering mode */
- if ( mode != ft_render_mode_mono )
+ if ( mode != FT_RENDER_MODE_MONO )
{
/* raster1 is only capable of producing monochrome bitmaps */
if ( render->clazz == &ft_raster1_renderer_class )
@@ -158,17 +158,17 @@
}
/* allocate new one, depends on pixel format */
- if ( !( mode & ft_render_mode_mono ) )
+ if ( !( mode & FT_RENDER_MODE_MONO ) )
{
/* we pad to 32 bits, only for backwards compatibility with FT 1.x */
pitch = ( width + 3 ) & -4;
- bitmap->pixel_mode = ft_pixel_mode_grays;
+ bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
bitmap->num_grays = 256;
}
else
{
pitch = ( ( width + 15 ) >> 4 ) << 1;
- bitmap->pixel_mode = ft_pixel_mode_mono;
+ bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
}
bitmap->width = width;
@@ -188,8 +188,8 @@
params.source = outline;
params.flags = 0;
- if ( bitmap->pixel_mode == ft_pixel_mode_grays )
- params.flags |= ft_raster_flag_aa;
+ if ( bitmap->pixel_mode == FT_PIXEL_MODE_GRAY )
+ params.flags |= FT_RASTER_FLAG_AA;
/* render outline into the bitmap */
error = render->raster_render( render->raster, ¶ms );
@@ -199,7 +199,7 @@
if ( error )
goto Exit;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
slot->bitmap_left = cbox.xMin >> 6;
slot->bitmap_top = cbox.yMax >> 6;
@@ -226,12 +226,12 @@
(FT_Module_Requester) 0
},
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
- (FTRenderer_render) ft_raster1_render,
- (FTRenderer_transform)ft_raster1_transform,
- (FTRenderer_getCBox) ft_raster1_get_cbox,
- (FTRenderer_setMode) ft_raster1_set_mode,
+ (FT_Renderer_RenderFunc) ft_raster1_render,
+ (FT_Renderer_TransformFunc)ft_raster1_transform,
+ (FT_Renderer_GetCBoxFunc) ft_raster1_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_raster1_set_mode,
(FT_Raster_Funcs*) &ft_standard_raster
};
@@ -259,12 +259,12 @@
(FT_Module_Requester) 0
},
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
- (FTRenderer_render) ft_raster1_render,
- (FTRenderer_transform)ft_raster1_transform,
- (FTRenderer_getCBox) ft_raster1_get_cbox,
- (FTRenderer_setMode) ft_raster1_set_mode,
+ (FT_Renderer_RenderFunc) ft_raster1_render,
+ (FT_Renderer_TransformFunc)ft_raster1_transform,
+ (FT_Renderer_GetCBoxFunc) ft_raster1_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_raster1_set_mode,
(FT_Raster_Funcs*) &ft_standard_raster
};
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -92,7 +92,7 @@
FT_Error error;
- error = TT_Get_PS_Name( face, glyph_index, &gname );
+ error = tt_face_get_ps_name( face, glyph_index, &gname );
if ( !error && buffer_max > 0 )
{
FT_UInt len = (FT_UInt)( ft_strlen( gname ) );
@@ -220,7 +220,7 @@
FT_CALLBACK_DEF( FT_Module_Interface )
- SFNT_Get_Interface( FT_Module module,
+ sfnt_get_interface( FT_Module module,
const char* module_interface )
{
FT_UNUSED( module );
@@ -243,44 +243,44 @@
static
const SFNT_Interface sfnt_interface =
{
- TT_Goto_Table,
+ tt_face_goto_table,
- SFNT_Init_Face,
- SFNT_Load_Face,
- SFNT_Done_Face,
- SFNT_Get_Interface,
+ sfnt_init_face,
+ sfnt_load_face,
+ sfnt_done_face,
+ sfnt_get_interface,
- TT_Load_Any,
- TT_Load_SFNT_Header,
- TT_Load_Directory,
+ tt_face_load_any,
+ tt_face_load_sfnt_header,
+ tt_face_load_directory,
- TT_Load_Header,
- TT_Load_Metrics_Header,
- TT_Load_CMap,
- TT_Load_MaxProfile,
- TT_Load_OS2,
- TT_Load_PostScript,
+ tt_face_load_header,
+ tt_face_load_metrics_header,
+ tt_face_load_cmap,
+ tt_face_load_max_profile,
+ tt_face_load_os2,
+ tt_face_load_postscript,
- TT_Load_Names,
- TT_Free_Names,
+ tt_face_load_names,
+ tt_face_free_names,
- TT_Load_Hdmx,
- TT_Free_Hdmx,
+ tt_face_load_hdmx,
+ tt_face_free_hdmx,
- TT_Load_Kern,
- TT_Load_Gasp,
- TT_Load_PCLT,
+ tt_face_load_kern,
+ tt_face_load_gasp,
+ tt_face_load_pclt,
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
/* see `ttload.h' */
- TT_Load_Bitmap_Header,
+ tt_face_load_bitmap_header,
/* see `ttsbit.h' */
- TT_Set_SBit_Strike,
- TT_Load_SBit_Strikes,
- TT_Load_SBit_Image,
- TT_Free_SBit_Strikes,
+ tt_face_set_sbit_strike,
+ tt_face_load_sbit_strikes,
+ tt_face_load_sbit_image,
+ tt_face_free_sbit_strikes,
#else /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -295,8 +295,8 @@
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
/* see `ttpost.h' */
- TT_Get_PS_Name,
- TT_Free_Post_Names,
+ tt_face_get_ps_name,
+ tt_face_free_ps_names,
#else /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
@@ -306,8 +306,8 @@
#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
/* see `ttcmap.h' */
- TT_CharMap_Load,
- TT_CharMap_Free,
+ tt_face_load_charmap,
+ tt_face_free_charmap,
};
@@ -325,7 +325,7 @@
(FT_Module_Constructor)0,
(FT_Module_Destructor) 0,
- (FT_Module_Requester) SFNT_Get_Interface
+ (FT_Module_Requester) sfnt_get_interface
};
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -296,20 +296,20 @@
static
const TEncoding tt_encodings[] =
{
- { TT_PLATFORM_ISO, -1, ft_encoding_unicode },
+ { TT_PLATFORM_ISO, -1, FT_ENCODING_UNICODE },
- { TT_PLATFORM_APPLE_UNICODE, -1, ft_encoding_unicode },
+ { TT_PLATFORM_APPLE_UNICODE, -1, FT_ENCODING_UNICODE },
- { TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, ft_encoding_apple_roman },
+ { TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, FT_ENCODING_APPLE_ROMAN },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_SYMBOL_CS, ft_encoding_symbol },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, ft_encoding_unicode },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, ft_encoding_unicode },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, ft_encoding_sjis },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, ft_encoding_gb2312 },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, ft_encoding_big5 },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, ft_encoding_wansung },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, ft_encoding_johab }
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_SYMBOL_CS, FT_ENCODING_MS_SYMBOL },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, FT_ENCODING_UNICODE },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, FT_ENCODING_MS_SJIS },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, FT_ENCODING_MS_GB2312 },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, FT_ENCODING_MS_BIG5 },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, FT_ENCODING_MS_WANSUNG },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, FT_ENCODING_MS_JOHAB }
};
const TEncoding *cur, *limit;
@@ -328,12 +328,12 @@
}
}
- return ft_encoding_none;
+ return FT_ENCODING_NONE;
}
FT_LOCAL_DEF( FT_Error )
- SFNT_Init_Face( FT_Stream stream,
+ sfnt_init_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -397,7 +397,7 @@
FT_LOCAL_DEF( FT_Error )
- SFNT_Load_Face( FT_Stream stream,
+ sfnt_load_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -434,11 +434,11 @@
/* do we have outlines in there? */
#ifdef FT_CONFIG_OPTION_INCREMENTAL
has_outline = FT_BOOL( face->root.internal->incremental_interface != 0 ||
- TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
- TT_LookUp_Table( face, TTAG_CFF ) != 0 );
+ tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
+ tt_face_lookup_table( face, TTAG_CFF ) != 0 );
#else
- has_outline = FT_BOOL( TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
- TT_LookUp_Table( face, TTAG_CFF ) != 0 );
+ has_outline = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
+ tt_face_lookup_table( face, TTAG_CFF ) != 0 );
#endif
is_apple_sbit = 0;
@@ -585,7 +585,7 @@
/* encoding ID of each charmap. */
/* */
- TT_Build_CMaps( face ); /* ignore errors */
+ tt_face_build_cmaps( face ); /* ignore errors */
/* set the encoding fields */
@@ -603,7 +603,7 @@
#if 0
if ( root->charmap == NULL &&
- charmap->encoding == ft_encoding_unicode )
+ charmap->encoding == FT_ENCODING_UNICODE )
{
/* set 'root->charmap' to the first Unicode encoding we find */
root->charmap = charmap;
@@ -753,7 +753,7 @@
FT_LOCAL_DEF( void )
- SFNT_Done_Face( TT_Face face )
+ sfnt_done_face( TT_Face face )
{
FT_Memory memory = face->root.memory;
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
--- a/src/sfnt/sfobjs.h
+++ b/src/sfnt/sfobjs.h
@@ -29,7 +29,7 @@
FT_LOCAL( FT_Error )
- SFNT_Init_Face( FT_Stream stream,
+ sfnt_init_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -36,7 +36,7 @@
FT_Parameter* params );
FT_LOCAL( FT_Error )
- SFNT_Load_Face( FT_Stream stream,
+ sfnt_load_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -43,7 +43,7 @@
FT_Parameter* params );
FT_LOCAL( void )
- SFNT_Done_Face( TT_Face face );
+ sfnt_done_face( TT_Face face );
FT_END_HEADER
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -86,7 +86,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_CharMap_Load */
+ /* tt_face_load_charmap */
/* */
/* <Description> */
/* Loads a given TrueType character map into memory. */
@@ -108,9 +108,9 @@
/* released. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_CharMap_Load( TT_Face face,
- TT_CMapTable cmap,
- FT_Stream stream )
+ tt_face_load_charmap( TT_Face face,
+ TT_CMapTable cmap,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory;
@@ -391,7 +391,7 @@
return SFNT_Err_Ok;
Fail:
- TT_CharMap_Free( face, cmap );
+ tt_face_free_charmap( face, cmap );
return error;
}
@@ -399,7 +399,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_CharMap_Free */
+ /* tt_face_free_charmap */
/* */
/* <Description> */
/* Destroys a character mapping table. */
@@ -413,8 +413,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_CharMap_Free( TT_Face face,
- TT_CMapTable cmap )
+ tt_face_free_charmap( TT_Face face,
+ TT_CMapTable cmap )
{
FT_Memory memory;
@@ -633,7 +633,7 @@
{
char_lo = (FT_UInt)( charCode & 0xFF );
char_hi = charCode >> 8;
-
+
if ( char_hi == 0 )
{
/* an 8-bit character code -- we use the subHeader 0 in this case */
@@ -655,16 +655,16 @@
continue;
}
}
-
+
sh2 = cmap2->subHeaders + index1;
char_lo -= sh2->firstCode;
-
+
if ( char_lo > (FT_UInt)sh2->entryCount )
{
charCode = ( char_hi + 1 ) << 8;
continue;
}
-
+
offset = sh2->idRangeOffset / 2 + char_lo;
if ( offset >= (FT_UInt)cmap2->numGlyphId ||
cmap2->glyphIdArray[offset] == 0 )
@@ -672,7 +672,7 @@
charCode++;
continue;
}
-
+
return charCode;
}
return 0;
@@ -813,7 +813,7 @@
if ( seg4->idRangeOffset == 0 )
return ( charCode );
-
+
while ( charCode <= (FT_UInt) seg4->endCount )
{
/* otherwise, we must use the glyphIdArray to do it */
@@ -890,12 +890,12 @@
charCode++;
-
+
cmap6 = &cmap->c.cmap6;
-
+
if ( charCode < (FT_ULong) cmap6->firstCode )
charCode = cmap6->firstCode;
-
+
charCode -= cmap6->firstCode;
while ( charCode < (FT_UInt)cmap6->entryCount )
@@ -1016,7 +1016,7 @@
Found:
if ( charCode < group->startCharCode )
charCode = group->startCharCode;
-
+
return charCode;
}
@@ -1085,10 +1085,10 @@
charCode++;
cmap10 = &cmap->c.cmap10;
-
+
if ( charCode < cmap10->startCharCode )
charCode = cmap10->startCharCode;
-
+
charCode -= cmap10->startCharCode;
/* the overflow trick for comparison works here also since the number */
--- a/src/sfnt/ttcmap.h
+++ b/src/sfnt/ttcmap.h
@@ -28,13 +28,13 @@
FT_LOCAL( FT_Error )
- TT_CharMap_Load( TT_Face face,
- TT_CMapTable cmap,
- FT_Stream input );
+ tt_face_load_charmap( TT_Face face,
+ TT_CMapTable cmap,
+ FT_Stream input );
FT_LOCAL( FT_Error )
- TT_CharMap_Free( TT_Face face,
- TT_CMapTable cmap );
+ tt_face_free_charmap( TT_Face face,
+ TT_CMapTable cmap );
FT_END_HEADER
--- a/src/sfnt/ttcmap0.c
+++ b/src/sfnt/ttcmap0.c
@@ -1666,7 +1666,7 @@
/* in the current face */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Build_CMaps( TT_Face face )
+ tt_face_build_cmaps( TT_Face face )
{
FT_Byte* table = face->cmap_table;
FT_Byte* limit = table + face->cmap_size;
@@ -1681,7 +1681,7 @@
if ( TT_NEXT_USHORT( p ) != 0 )
{
p -= 2;
- FT_ERROR(( "TT_Build_CMaps: unsupported `cmap' table format = %d\n",
+ FT_ERROR(( "tt_face_build_cmaps: unsupported `cmap' table format = %d\n",
TT_PEEK_USHORT( p ) ));
return FT_Err_Invalid_Table;
}
@@ -1697,7 +1697,7 @@
charmap.platform_id = TT_NEXT_USHORT( p );
charmap.encoding_id = TT_NEXT_USHORT( p );
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_none; /* will be filled later */
+ charmap.encoding = FT_ENCODING_NONE; /* will be filled later */
offset = TT_NEXT_ULONG( p );
if ( offset && table + offset + 2 < limit )
@@ -1731,7 +1731,7 @@
(void)FT_CMap_New( (FT_CMap_Class)clazz, cmap, &charmap, NULL );
else
{
- FT_ERROR(( "TT_Build_CMaps:" ));
+ FT_ERROR(( "tt_face_build_cmaps:" ));
FT_ERROR(( " broken cmap sub-table ignored!\n" ));
}
}
--- a/src/sfnt/ttcmap0.h
+++ b/src/sfnt/ttcmap0.h
@@ -63,7 +63,7 @@
FT_LOCAL( FT_Error )
- TT_Build_CMaps( TT_Face face );
+ tt_face_build_cmaps( TT_Face face );
FT_END_HEADER
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -40,7 +40,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_LookUp_Table */
+ /* tt_face_lookup_table */
/* */
/* <Description> */
/* Looks for a TrueType table by name. */
@@ -54,14 +54,14 @@
/* A pointer to the table directory entry. 0 if not found. */
/* */
FT_LOCAL_DEF( TT_Table )
- TT_LookUp_Table( TT_Face face,
- FT_ULong tag )
+ tt_face_lookup_table( TT_Face face,
+ FT_ULong tag )
{
TT_Table entry;
TT_Table limit;
- FT_TRACE3(( "TT_LookUp_Table: %08p, `%c%c%c%c' -- ",
+ FT_TRACE3(( "tt_face_lookup_table: %08p, `%c%c%c%c' -- ",
face,
(FT_Char)( tag >> 24 ),
(FT_Char)( tag >> 16 ),
@@ -90,7 +90,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Goto_Table */
+ /* tt_face_goto_table */
/* */
/* <Description> */
/* Looks for a TrueType table by name, then seek a stream to it. */
@@ -109,16 +109,16 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Goto_Table( TT_Face face,
- FT_ULong tag,
- FT_Stream stream,
- FT_ULong* length )
+ tt_face_goto_table( TT_Face face,
+ FT_ULong tag,
+ FT_Stream stream,
+ FT_ULong* length )
{
TT_Table table;
FT_Error error;
- table = TT_LookUp_Table( face, tag );
+ table = tt_face_lookup_table( face, tag );
if ( table )
{
if ( length )
@@ -239,7 +239,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_SFNT_Header */
+ /* tt_face_load_sfnt_header */
/* */
/* <Description> */
/* Loads the header of a SFNT font file. Supports collections. */
@@ -267,10 +267,10 @@
/* values of `search_range', `entry_selector', and `range_shift'. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_SFNT_Header( TT_Face face,
- FT_Stream stream,
- FT_Long face_index,
- SFNT_Header sfnt )
+ tt_face_load_sfnt_header( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header sfnt )
{
FT_Error error;
FT_ULong format_tag, offset;
@@ -301,7 +301,7 @@
};
- FT_TRACE2(( "TT_Load_SFNT_Header: %08p, %ld\n",
+ FT_TRACE2(( "tt_face_load_sfnt_header: %08p, %ld\n",
face, face_index ));
face->ttc_header.tag = 0;
@@ -324,7 +324,7 @@
FT_Int n;
- FT_TRACE3(( "TT_Load_SFNT_Header: file is a collection\n" ));
+ FT_TRACE3(( "tt_face_load_sfnt_header: file is a collection\n" ));
/* It is a TrueType collection, i.e. a file containing several */
/* font files. Read the font directory now */
@@ -367,7 +367,7 @@
error = sfnt_dir_check( stream, offset, sfnt->num_tables );
if ( error )
{
- FT_TRACE2(( "TT_Load_SFNT_Header: file is not SFNT!\n" ));
+ FT_TRACE2(( "tt_face_load_sfnt_header: file is not SFNT!\n" ));
error = SFNT_Err_Unknown_File_Format;
}
@@ -379,7 +379,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Directory */
+ /* tt_face_load_directory */
/* */
/* <Description> */
/* Loads the table directory into a face object. */
@@ -399,9 +399,9 @@
/* The stream cursor must be at the font file's origin. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Directory( TT_Face face,
- FT_Stream stream,
- SFNT_Header sfnt )
+ tt_face_load_directory( TT_Face face,
+ FT_Stream stream,
+ SFNT_Header sfnt )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -409,7 +409,7 @@
TT_TableRec *entry, *limit;
- FT_TRACE2(( "TT_Load_Directory: %08p\n", face ));
+ FT_TRACE2(( "tt_face_load_directory: %08p\n", face ));
FT_TRACE2(( "-- Tables count: %12u\n", sfnt->num_tables ));
FT_TRACE2(( "-- Format version: %08lx\n", sfnt->format_tag ));
@@ -454,7 +454,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Any */
+ /* tt_face_load_any */
/* */
/* <Description> */
/* Loads any font table into client memory. */
@@ -492,11 +492,11 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Any( TT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length )
+ tt_face_load_any( TT_Face face,
+ FT_ULong tag,
+ FT_Long offset,
+ FT_Byte* buffer,
+ FT_ULong* length )
{
FT_Error error;
FT_Stream stream;
@@ -507,7 +507,7 @@
if ( tag != 0 )
{
/* look for tag in font directory */
- table = TT_LookUp_Table( face, tag );
+ table = tt_face_lookup_table( face, tag );
if ( !table )
{
error = SFNT_Err_Table_Missing;
@@ -544,7 +544,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Generic_Header */
+ /* tt_face_load_generic_header */
/* */
/* <Description> */
/* Loads the TrueType table `head' or `bhed'. */
@@ -558,7 +558,7 @@
/* FreeType error code. 0 means success. */
/* */
static FT_Error
- TT_Load_Generic_Header( TT_Face face,
+ tt_face_load_generic_header( TT_Face face,
FT_Stream stream,
FT_ULong tag )
{
@@ -594,7 +594,7 @@
};
- FT_TRACE2(( "TT_Load_Generic_Header: "
+ FT_TRACE2(( "tt_face_load_generic_header: "
"%08p, looking up font table `%c%c%c%c'.\n",
face,
(FT_Char)( tag >> 24 ),
@@ -605,7 +605,7 @@
error = face->goto_table( face, tag, stream, 0 );
if ( error )
{
- FT_TRACE2(( "TT_Load_Generic_Header: Font table is missing!\n" ));
+ FT_TRACE2(( "tt_face_load_generic_header: Font table is missing!\n" ));
goto Exit;
}
@@ -616,7 +616,7 @@
FT_TRACE2(( " Units per EM: %8u\n", header->Units_Per_EM ));
FT_TRACE2(( " IndexToLoc: %8d\n", header->Index_To_Loc_Format ));
- FT_TRACE2(( "TT_Load_Generic_Header: Font table loaded.\n" ));
+ FT_TRACE2(( "tt_face_load_generic_header: Font table loaded.\n" ));
Exit:
return error;
@@ -624,10 +624,10 @@
FT_LOCAL_DEF( FT_Error )
- TT_Load_Header( TT_Face face,
- FT_Stream stream )
+ tt_face_load_header( TT_Face face,
+ FT_Stream stream )
{
- return TT_Load_Generic_Header( face, stream, TTAG_head );
+ return tt_face_load_generic_header( face, stream, TTAG_head );
}
@@ -634,10 +634,10 @@
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
FT_LOCAL_DEF( FT_Error )
- TT_Load_Bitmap_Header( TT_Face face,
- FT_Stream stream )
+ tt_face_load_bitmap_header( TT_Face face,
+ FT_Stream stream )
{
- return TT_Load_Generic_Header( face, stream, TTAG_bhed );
+ return tt_face_load_generic_header( face, stream, TTAG_bhed );
}
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -646,7 +646,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_MaxProfile */
+ /* tt_face_load_max_profile */
/* */
/* <Description> */
/* Loads the maximum profile into a face object. */
@@ -660,8 +660,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_MaxProfile( TT_Face face,
- FT_Stream stream )
+ tt_face_load_max_profile( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
TT_MaxProfile* maxProfile = &face->max_profile;
@@ -768,7 +768,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Metrics */
+ /* tt_face_load_metrics */
/* */
/* <Description> */
/* Loads the horizontal or vertical metrics table into a face object. */
@@ -784,9 +784,9 @@
/* FreeType error code. 0 means success. */
/* */
static FT_Error
- TT_Load_Metrics( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical )
+ tt_face_load_metrics( TT_Face face,
+ FT_Stream stream,
+ FT_Bool vertical )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -911,7 +911,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Metrics_Header */
+ /* tt_face_load_metrics_header */
/* */
/* <Description> */
/* Loads the horizontal or vertical header in a face object. */
@@ -927,9 +927,9 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Metrics_Header( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical )
+ tt_face_load_metrics_header( TT_Face face,
+ FT_Stream stream,
+ FT_Bool vertical )
{
FT_Error error;
TT_HoriHeader* header;
@@ -1003,7 +1003,7 @@
/* Now try to load the corresponding metrics */
- error = TT_Load_Metrics( face, stream, vertical );
+ error = tt_face_load_metrics( face, stream, vertical );
Exit:
return error;
@@ -1013,7 +1013,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Names */
+ /* tt_face_load_names */
/* */
/* <Description> */
/* Loads the name records. */
@@ -1027,8 +1027,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Names( TT_Face face,
- FT_Stream stream )
+ tt_face_load_names( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1097,7 +1097,7 @@
if ( storage_start > storage_limit )
{
- FT_ERROR(( "TT_Load_Names: invalid `name' table\n" ));
+ FT_ERROR(( "tt_face_load_names: invalid `name' table\n" ));
error = SFNT_Err_Name_Table_Missing;
goto Exit;
}
@@ -1157,7 +1157,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Free_Names */
+ /* tt_face_free_names */
/* */
/* <Description> */
/* Frees the name records. */
@@ -1166,7 +1166,7 @@
/* face :: A handle to the target face object. */
/* */
FT_LOCAL_DEF( void )
- TT_Free_Names( TT_Face face )
+ tt_face_free_names( TT_Face face )
{
FT_Memory memory = face->root.driver->root.memory;
TT_NameTable table = &face->name_table;
@@ -1192,7 +1192,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_CMap */
+ /* tt_face_load_cmap */
/* */
/* <Description> */
/* Loads the cmap directory in a face object. The cmaps itselves are */
@@ -1208,8 +1208,8 @@
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_CMap( TT_Face face,
- FT_Stream stream )
+ tt_face_load_cmap( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
@@ -1239,7 +1239,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_OS2 */
+ /* tt_face_load_os2 */
/* */
/* <Description> */
/* Loads the OS2 table. */
@@ -1253,8 +1253,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_OS2( TT_Face face,
- FT_Stream stream )
+ tt_face_load_os2( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
TT_OS2* os2;
@@ -1382,7 +1382,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Postscript */
+ /* tt_face_load_postscript */
/* */
/* <Description> */
/* Loads the Postscript table. */
@@ -1396,8 +1396,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_PostScript( TT_Face face,
- FT_Stream stream )
+ tt_face_load_postscript( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
TT_Postscript* post = &face->postscript;
@@ -1441,7 +1441,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_PCLT */
+ /* tt_face_load_pclt */
/* */
/* <Description> */
/* Loads the PCL 5 Table. */
@@ -1455,8 +1455,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_PCLT( TT_Face face,
- FT_Stream stream )
+ tt_face_load_pclt( TT_Face face,
+ FT_Stream stream )
{
static const FT_Frame_Field pclt_fields[] =
{
@@ -1509,7 +1509,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Gasp */
+ /* tt_face_load_gasp */
/* */
/* <Description> */
/* Loads the `gasp' table into a face object. */
@@ -1523,8 +1523,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Gasp( TT_Face face,
- FT_Stream stream )
+ tt_face_load_gasp( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1533,7 +1533,7 @@
TT_GaspRange gaspranges;
- FT_TRACE2(( "TT_Load_Gasp: %08p\n", face ));
+ FT_TRACE2(( "tt_face_load_gasp: %08p\n", face ));
/* the gasp table is optional */
error = face->goto_table( face, TTAG_gasp, stream, 0 );
@@ -1584,7 +1584,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Kern */
+ /* tt_face_load_kern */
/* */
/* <Description> */
/* Loads the first kerning table with format 0 in the font. Only */
@@ -1601,8 +1601,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Kern( TT_Face face,
- FT_Stream stream )
+ tt_face_load_kern( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1737,7 +1737,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Hdmx */
+ /* tt_face_load_hdmx */
/* */
/* <Description> */
/* Loads the horizontal device metrics table. */
@@ -1751,8 +1751,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Hdmx( TT_Face face,
- FT_Stream stream )
+ tt_face_load_hdmx( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1820,7 +1820,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Free_Hdmx */
+ /* tt_face_free_hdmx */
/* */
/* <Description> */
/* Frees the horizontal device metrics table. */
@@ -1829,7 +1829,7 @@
/* face :: A handle to the target face object. */
/* */
FT_LOCAL_DEF( void )
- TT_Free_Hdmx( TT_Face face )
+ tt_face_free_hdmx( TT_Face face )
{
if ( face )
{
--- a/src/sfnt/ttload.h
+++ b/src/sfnt/ttload.h
@@ -30,101 +30,101 @@
FT_LOCAL( TT_Table )
- TT_LookUp_Table( TT_Face face,
- FT_ULong tag );
+ tt_face_lookup_table( TT_Face face,
+ FT_ULong tag );
FT_LOCAL( FT_Error )
- TT_Goto_Table( TT_Face face,
- FT_ULong tag,
- FT_Stream stream,
- FT_ULong* length );
+ tt_face_goto_table( TT_Face face,
+ FT_ULong tag,
+ FT_Stream stream,
+ FT_ULong* length );
FT_LOCAL( FT_Error )
- TT_Load_SFNT_Header( TT_Face face,
- FT_Stream stream,
- FT_Long face_index,
- SFNT_Header sfnt );
+ tt_face_load_sfnt_header( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header sfnt );
FT_LOCAL( FT_Error )
- TT_Load_Directory( TT_Face face,
- FT_Stream stream,
- SFNT_Header sfnt );
+ tt_face_load_directory( TT_Face face,
+ FT_Stream stream,
+ SFNT_Header sfnt );
FT_LOCAL( FT_Error )
- TT_Load_Any( TT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length );
+ tt_face_load_any( TT_Face face,
+ FT_ULong tag,
+ FT_Long offset,
+ FT_Byte* buffer,
+ FT_ULong* length );
FT_LOCAL( FT_Error )
- TT_Load_Header( TT_Face face,
- FT_Stream stream );
+ tt_face_load_header( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Metrics_Header( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical );
+ tt_face_load_metrics_header( TT_Face face,
+ FT_Stream stream,
+ FT_Bool vertical );
FT_LOCAL( FT_Error )
- TT_Load_CMap( TT_Face face,
- FT_Stream stream );
+ tt_face_load_cmap( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_MaxProfile( TT_Face face,
- FT_Stream stream );
+ tt_face_load_max_profile( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Names( TT_Face face,
- FT_Stream stream );
+ tt_face_load_names( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_OS2( TT_Face face,
- FT_Stream stream );
+ tt_face_load_os2( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_PostScript( TT_Face face,
- FT_Stream stream );
+ tt_face_load_postscript( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Hdmx( TT_Face face,
- FT_Stream stream );
+ tt_face_load_hdmx( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_PCLT( TT_Face face,
- FT_Stream stream );
+ tt_face_load_pclt( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( void )
- TT_Free_Names( TT_Face face );
+ tt_face_free_names( TT_Face face );
FT_LOCAL( void )
- TT_Free_Hdmx ( TT_Face face );
+ tt_face_free_hdmx ( TT_Face face );
FT_LOCAL( FT_Error )
- TT_Load_Kern( TT_Face face,
- FT_Stream stream );
+ tt_face_load_kern( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Gasp( TT_Face face,
- FT_Stream stream );
+ tt_face_load_gasp( TT_Face face,
+ FT_Stream stream );
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
FT_LOCAL( FT_Error )
- TT_Load_Bitmap_Header( TT_Face face,
- FT_Stream stream );
+ tt_face_load_bitmap_header( TT_Face face,
+ FT_Stream stream );
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -62,11 +62,11 @@
/* table of Mac names. Thus, it is possible to build a version of */
/* FreeType without the Type 1 driver & PSNames module. */
-#define MAC_NAME( x ) TT_Post_Default_Names[x]
+#define MAC_NAME( x ) tt_post_default_names[x]
/* the 258 default Mac PS glyph names */
- FT_String* TT_Post_Default_Names[258] =
+ static const FT_String* tt_post_default_names[258] =
{
/* 0 */
".notdef", ".null", "CR", "space", "exclam",
@@ -153,7 +153,7 @@
static FT_Error
- Load_Format_20( TT_Face face,
+ load_format_20( TT_Face face,
FT_Stream stream )
{
FT_Memory memory = stream->memory;
@@ -271,7 +271,7 @@
static FT_Error
- Load_Format_25( TT_Face face,
+ load_format_25( TT_Face face,
FT_Stream stream )
{
FT_Memory memory = stream->memory;
@@ -334,7 +334,7 @@
static FT_Error
- Load_Post_Names( TT_Face face )
+ load_post_names( TT_Face face )
{
FT_Stream stream;
FT_Error error;
@@ -359,11 +359,11 @@
switch ( format )
{
case 0x00020000L:
- error = Load_Format_20( face, stream );
+ error = load_format_20( face, stream );
break;
case 0x00028000L:
- error = Load_Format_25( face, stream );
+ error = load_format_25( face, stream );
break;
default:
@@ -378,7 +378,7 @@
FT_LOCAL_DEF( void )
- TT_Free_Post_Names( TT_Face face )
+ tt_face_free_ps_names( TT_Face face )
{
FT_Memory memory = face->root.memory;
TT_Post_Names names = &face->postscript_names;
@@ -423,7 +423,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Get_PS_Name */
+ /* tt_face_get_ps_name */
/* */
/* <Description> */
/* Gets the PostScript glyph name of a glyph. */
@@ -442,9 +442,9 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Get_PS_Name( TT_Face face,
- FT_UInt idx,
- FT_String** PSname )
+ tt_face_get_ps_name( TT_Face face,
+ FT_UInt idx,
+ FT_String** PSname )
{
FT_Error error;
TT_Post_Names names;
@@ -485,7 +485,7 @@
if ( !names->loaded )
{
- error = Load_Post_Names( face );
+ error = load_post_names( face );
if ( error )
break;
}
@@ -510,7 +510,7 @@
if ( !names->loaded )
{
- error = Load_Post_Names( face );
+ error = load_post_names( face );
if ( error )
break;
}
--- a/src/sfnt/ttpost.h
+++ b/src/sfnt/ttpost.h
@@ -30,12 +30,12 @@
FT_LOCAL( FT_Error )
- TT_Get_PS_Name( TT_Face face,
- FT_UInt idx,
- FT_String** PSname );
+ tt_face_get_ps_name( TT_Face face,
+ FT_UInt idx,
+ FT_String** PSname );
FT_LOCAL( void )
- TT_Free_Post_Names( TT_Face face );
+ tt_face_free_ps_names( TT_Face face );
FT_END_HEADER
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -377,7 +377,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_SBit_Strikes */
+ /* tt_face_load_sbit_strikes */
/* */
/* <Description> */
/* Loads the table of embedded bitmap sizes for this face. */
@@ -391,8 +391,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_SBit_Strikes( TT_Face face,
- FT_Stream stream )
+ tt_face_load_sbit_strikes( TT_Face face,
+ FT_Stream stream )
{
FT_Error error = 0;
FT_Memory memory = stream->memory;
@@ -471,7 +471,7 @@
if ( version != 0x00020000L ||
num_strikes >= 0x10000L )
{
- FT_ERROR(( "TT_Load_SBit_Strikes: invalid table version!\n" ));
+ FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version!\n" ));
error = SFNT_Err_Invalid_File_Format;
goto Exit;
@@ -577,7 +577,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Free_SBit_Strikes */
+ /* tt_face_free_sbit_strikes */
/* */
/* <Description> */
/* Releases the embedded bitmap tables. */
@@ -586,7 +586,7 @@
/* face :: The target face object. */
/* */
FT_LOCAL_DEF( void )
- TT_Free_SBit_Strikes( TT_Face face )
+ tt_face_free_sbit_strikes( TT_Face face )
{
FT_Memory memory = face->root.memory;
TT_SBit_Strike strike = face->sbit_strikes;
@@ -621,7 +621,7 @@
FT_LOCAL_DEF( FT_Error )
- TT_Set_SBit_Strike( TT_Face face,
+ tt_face_set_sbit_strike( TT_Face face,
FT_Int x_ppem,
FT_Int y_ppem,
FT_ULong *astrike_index )
@@ -651,7 +651,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Find_SBit_Range */
+ /* find_sbit_range */
/* */
/* <Description> */
/* Scans a given strike's ranges and return, for a given glyph */
@@ -671,7 +671,7 @@
/* FreeType error code. 0 means the glyph index was found. */
/* */
static FT_Error
- Find_SBit_Range( FT_UInt glyph_index,
+ find_sbit_range( FT_UInt glyph_index,
TT_SBit_Strike strike,
TT_SBit_Range *arange,
FT_ULong *aglyph_offset )
@@ -754,7 +754,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Find_SBit_Image */
+ /* find_sbit_image */
/* */
/* <Description> */
/* Checks whether an embedded bitmap (an `sbit') exists for a given */
@@ -780,7 +780,7 @@
/* glyph. */
/* */
static FT_Error
- Find_SBit_Image( TT_Face face,
+ find_sbit_image( TT_Face face,
FT_UInt glyph_index,
FT_ULong strike_index,
TT_SBit_Range *arange,
@@ -797,7 +797,7 @@
strike = &face->sbit_strikes[strike_index];
- error = Find_SBit_Range( glyph_index, strike,
+ error = find_sbit_range( glyph_index, strike,
arange, aglyph_offset );
if ( error )
goto Fail;
@@ -819,7 +819,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Load_SBit_Metrics */
+ /* load_sbit_metrics */
/* */
/* <Description> */
/* Gets the big metrics for a given SBit. */
@@ -844,7 +844,7 @@
/* function exit. */
/* */
static FT_Error
- Load_SBit_Metrics( FT_Stream stream,
+ load_sbit_metrics( FT_Stream stream,
TT_SBit_Range range,
TT_SBit_Metrics metrics )
{
@@ -918,7 +918,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Crop_Bitmap */
+ /* crop_bitmap */
/* */
/* <Description> */
/* Crops a bitmap to its tightest bounding box, and adjusts its */
@@ -930,7 +930,7 @@
/* metrics :: The corresponding metrics structure. */
/* */
static void
- Crop_Bitmap( FT_Bitmap* map,
+ crop_bitmap( FT_Bitmap* map,
TT_SBit_Metrics metrics )
{
/***********************************************************************/
@@ -1116,7 +1116,7 @@
map->width = 0;
map->rows = 0;
map->pitch = 0;
- map->pixel_mode = ft_pixel_mode_mono;
+ map->pixel_mode = FT_PIXEL_MODE_MONO;
}
@@ -1226,7 +1226,7 @@
if ( FT_STREAM_SEEK( ebdt_pos + glyph_offset ) )
goto Exit;
- error = Load_SBit_Metrics( stream, range, metrics );
+ error = load_sbit_metrics( stream, range, metrics );
if ( error )
goto Exit;
@@ -1245,22 +1245,22 @@
switch ( strike->bit_depth )
{
case 1:
- map->pixel_mode = ft_pixel_mode_mono;
+ map->pixel_mode = FT_PIXEL_MODE_MONO;
map->pitch = ( map->width + 7 ) >> 3;
break;
case 2:
- map->pixel_mode = ft_pixel_mode_pal2;
+ map->pixel_mode = FT_PIXEL_MODE_GRAY2;
map->pitch = ( map->width + 3 ) >> 2;
break;
case 4:
- map->pixel_mode = ft_pixel_mode_pal4;
+ map->pixel_mode = FT_PIXEL_MODE_GRAY4;
map->pitch = ( map->width + 1 ) >> 1;
break;
case 8:
- map->pixel_mode = ft_pixel_mode_grays;
+ map->pixel_mode = FT_PIXEL_MODE_GRAY;
map->pitch = map->width;
break;
@@ -1336,7 +1336,7 @@
/* find the range for this element */
- error = Find_SBit_Range( comp->glyph_code,
+ error = find_sbit_range( comp->glyph_code,
strike,
&elem_range,
&elem_offset );
@@ -1369,7 +1369,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_SBit_Image */
+ /* tt_face_load_sbit_image */
/* */
/* <Description> */
/* Loads a given glyph sbit image from the font resource. This also */
@@ -1400,13 +1400,13 @@
/* The `map.buffer' field is always freed before the glyph is loaded. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_SBit_Image( TT_Face face,
- FT_ULong strike_index,
- FT_UInt glyph_index,
- FT_UInt load_flags,
- FT_Stream stream,
- FT_Bitmap *map,
- TT_SBit_MetricsRec *metrics )
+ tt_face_load_sbit_image( TT_Face face,
+ FT_ULong strike_index,
+ FT_UInt glyph_index,
+ FT_UInt load_flags,
+ FT_Stream stream,
+ FT_Bitmap *map,
+ TT_SBit_MetricsRec *metrics )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1417,7 +1417,7 @@
/* Check whether there is a glyph sbit for the current index */
- error = Find_SBit_Image( face, glyph_index, strike_index,
+ error = find_sbit_image( face, glyph_index, strike_index,
&range, &strike, &glyph_offset );
if ( error )
goto Exit;
@@ -1464,7 +1464,7 @@
/* Crop the bitmap now, unless specified otherwise */
if ( load_flags & FT_LOAD_CROP_BITMAP )
- Crop_Bitmap( map, metrics );
+ crop_bitmap( map, metrics );
Exit:
return error;
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -28,27 +28,27 @@
FT_LOCAL( FT_Error )
- TT_Load_SBit_Strikes( TT_Face face,
- FT_Stream stream );
+ tt_face_load_sbit_strikes( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( void )
- TT_Free_SBit_Strikes( TT_Face face );
+ tt_face_free_sbit_strikes( TT_Face face );
FT_LOCAL( FT_Error )
- TT_Set_SBit_Strike( TT_Face face,
- FT_Int x_ppem,
- FT_Int y_ppem,
- FT_ULong *astrike_index );
+ tt_face_set_sbit_strike( TT_Face face,
+ FT_Int x_ppem,
+ FT_Int y_ppem,
+ FT_ULong *astrike_index );
FT_LOCAL( FT_Error )
- TT_Load_SBit_Image( TT_Face face,
- FT_ULong strike_index,
- FT_UInt glyph_index,
- FT_UInt load_flags,
- FT_Stream stream,
- FT_Bitmap *map,
- TT_SBit_MetricsRec *metrics );
+ tt_face_load_sbit_image( TT_Face face,
+ FT_ULong strike_index,
+ FT_UInt glyph_index,
+ FT_UInt load_flags,
+ FT_Stream stream,
+ FT_Bitmap *map,
+ TT_SBit_MetricsRec *metrics );
FT_END_HEADER
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1357,7 +1357,7 @@
if ( coverage < 0 )
coverage = -coverage;
- if ( ras.outline.flags & ft_outline_even_odd_fill )
+ if ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL )
{
coverage &= 511;
@@ -1618,14 +1618,14 @@
tag = FT_CURVE_TAG( tags[0] );
/* A contour cannot start with a cubic control point! */
- if ( tag == FT_Curve_Tag_Cubic )
+ if ( tag == FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
/* check first point to determine origin */
- if ( tag == FT_Curve_Tag_Conic )
+ if ( tag == FT_CURVE_TAG_CONIC )
{
/* first point is conic control. Yes, this happens. */
- if ( FT_CURVE_TAG( outline->tags[last] ) == FT_Curve_Tag_On )
+ if ( FT_CURVE_TAG( outline->tags[last] ) == FT_CURVE_TAG_ON )
{
/* start at last point if it is on the curve */
v_start = v_last;
@@ -1657,7 +1657,7 @@
tag = FT_CURVE_TAG( tags[0] );
switch ( tag )
{
- case FT_Curve_Tag_On: /* emit a single line_to */
+ case FT_CURVE_TAG_ON: /* emit a single line_to */
{
FT_Vector vec;
@@ -1671,7 +1671,7 @@
continue;
}
- case FT_Curve_Tag_Conic: /* consume conic arcs */
+ case FT_CURVE_TAG_CONIC: /* consume conic arcs */
{
v_control.x = SCALED( point->x );
v_control.y = SCALED( point->y );
@@ -1690,7 +1690,7 @@
vec.x = SCALED( point->x );
vec.y = SCALED( point->y );
- if ( tag == FT_Curve_Tag_On )
+ if ( tag == FT_CURVE_TAG_ON )
{
error = func_interface->conic_to( &v_control, &vec, user );
if ( error )
@@ -1698,7 +1698,7 @@
continue;
}
- if ( tag != FT_Curve_Tag_Conic )
+ if ( tag != FT_CURVE_TAG_CONIC )
goto Invalid_Outline;
v_middle.x = ( v_control.x + vec.x ) / 2;
@@ -1716,13 +1716,13 @@
goto Close;
}
- default: /* FT_Curve_Tag_Cubic */
+ default: /* FT_CURVE_TAG_CUBIC */
{
FT_Vector vec1, vec2;
if ( point + 1 > limit ||
- FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
+ FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
point += 2;
@@ -1969,16 +1969,16 @@
return ErrRaster_Invalid_Outline;
/* if direct mode is not set, we must have a target bitmap */
- if ( ( params->flags & ft_raster_flag_direct ) == 0 &&
+ if ( ( params->flags & FT_RASTER_FLAG_DIRECT ) == 0 &&
( !target_map || !target_map->buffer ) )
return -1;
/* this version does not support monochrome rendering */
- if ( !( params->flags & ft_raster_flag_aa ) )
+ if ( !( params->flags & FT_RASTER_FLAG_AA ) )
return ErrRaster_Invalid_Mode;
/* compute clipping box */
- if ( ( params->flags & ft_raster_flag_direct ) == 0 )
+ if ( ( params->flags & FT_RASTER_FLAG_DIRECT ) == 0 )
{
/* compute clip box from target pixmap */
ras.clip_box.xMin = 0;
@@ -1986,7 +1986,7 @@
ras.clip_box.xMax = target_map->width;
ras.clip_box.yMax = target_map->rows;
}
- else if ( params->flags & ft_raster_flag_clip )
+ else if ( params->flags & FT_RASTER_FLAG_CLIP )
{
ras.clip_box = params->clip_box;
}
@@ -2008,7 +2008,7 @@
ras.render_span = (FT_Raster_Span_Func)gray_render_span;
ras.render_span_data = &ras;
- if ( params->flags & ft_raster_flag_direct )
+ if ( params->flags & FT_RASTER_FLAG_DIRECT )
{
ras.render_span = (FT_Raster_Span_Func)params->gray_spans;
ras.render_span_data = params->user;
@@ -2133,7 +2133,7 @@
const FT_Raster_Funcs ft_grays_raster =
{
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
(FT_Raster_New_Func) gray_raster_new,
(FT_Raster_Reset_Func) gray_raster_reset,
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -94,10 +94,13 @@
/* convert a slot's glyph image into a bitmap */
static FT_Error
- ft_smooth_render( FT_Renderer render,
- FT_GlyphSlot slot,
- FT_UInt mode,
- FT_Vector* origin )
+ ft_smooth_render_generic( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin,
+ FT_UInt required_mode,
+ FT_Int hmul,
+ FT_Int vmul )
{
FT_Error error;
FT_Outline* outline = NULL;
@@ -117,7 +120,7 @@
}
/* check mode */
- if ( mode != ft_render_mode_normal )
+ if ( mode != required_mode )
return Smooth_Err_Cannot_Render_Glyph;
outline = &slot->outline;
@@ -148,7 +151,16 @@
/* allocate new one, depends on pixel format */
pitch = width;
- bitmap->pixel_mode = ft_pixel_mode_grays;
+ if ( hmul )
+ {
+ width = width*hmul;
+ pitch = ( width + 3 ) & -4;
+ }
+
+ if ( vmul )
+ height *= vmul;
+
+ bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
bitmap->num_grays = 256;
bitmap->width = width;
bitmap->rows = height;
@@ -165,17 +177,46 @@
/* set up parameters */
params.target = bitmap;
params.source = outline;
- params.flags = ft_raster_flag_aa;
+ params.flags = FT_RASTER_FLAG_AA;
+ /* implode outline if needed */
+ {
+ FT_Int n;
+ FT_Vector* vec;
+
+ if ( hmul )
+ for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+ vec->x *= hmul;
+
+ if ( vmul )
+ for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+ vec->y *= vmul;
+ }
+
/* render outline into the bitmap */
error = render->raster_render( render->raster, ¶ms );
-
+
+ /* deflate outline if needed */
+ {
+ FT_Int n;
+ FT_Vector* vec;
+
+ if ( hmul )
+ for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+ vec->x /= hmul;
+
+ if ( vmul )
+ for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+ vec->y /= vmul;
+ }
+
+
FT_Outline_Translate( outline, cbox.xMin, cbox.yMin );
if ( error )
goto Exit;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
slot->bitmap_left = cbox.xMin >> 6;
slot->bitmap_top = cbox.yMax >> 6;
@@ -187,6 +228,47 @@
}
+
+ /* convert a slot's glyph image into a bitmap */
+ static FT_Error
+ ft_smooth_render( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin )
+ {
+ return ft_smooth_render_generic( render, slot, mode, origin,
+ FT_RENDER_MODE_NORMAL,
+ 0, 0 );
+ }
+
+
+ /* convert a slot's glyph image into a horizontal LCD bitmap */
+ static FT_Error
+ ft_smooth_render_lcd( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin )
+ {
+ return ft_smooth_render_generic( render, slot, mode, origin,
+ FT_RENDER_MODE_LCD,
+ 3, 0 );
+ }
+
+
+ /* convert a slot's glyph image into a vertical LCD bitmap */
+ static FT_Error
+ ft_smooth_render_lcd_v( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin )
+ {
+ return ft_smooth_render_generic( render, slot, mode, origin,
+ FT_RENDER_MODE_LCD_V,
+ 0, 3 );
+ }
+
+
+
FT_CALLBACK_TABLE_DEF
const FT_Renderer_Class ft_smooth_renderer_class =
{
@@ -205,12 +287,71 @@
(FT_Module_Requester) 0
},
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
- (FTRenderer_render) ft_smooth_render,
- (FTRenderer_transform)ft_smooth_transform,
- (FTRenderer_getCBox) ft_smooth_get_cbox,
- (FTRenderer_setMode) ft_smooth_set_mode,
+ (FT_Renderer_RenderFunc) ft_smooth_render,
+ (FT_Renderer_TransformFunc)ft_smooth_transform,
+ (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_smooth_set_mode,
+
+ (FT_Raster_Funcs*) &ft_grays_raster
+ };
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FT_Renderer_Class ft_smooth_lcd_renderer_class =
+ {
+ {
+ ft_module_renderer,
+ sizeof( FT_RendererRec ),
+
+ "smooth-lcd",
+ 0x10000L,
+ 0x20000L,
+
+ 0, /* module specific interface */
+
+ (FT_Module_Constructor)ft_smooth_init,
+ (FT_Module_Destructor) 0,
+ (FT_Module_Requester) 0
+ },
+
+ FT_GLYPH_FORMAT_OUTLINE,
+
+ (FT_Renderer_RenderFunc) ft_smooth_render_lcd,
+ (FT_Renderer_TransformFunc)ft_smooth_transform,
+ (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_smooth_set_mode,
+
+ (FT_Raster_Funcs*) &ft_grays_raster
+ };
+
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FT_Renderer_Class ft_smooth_lcdv_renderer_class =
+ {
+ {
+ ft_module_renderer,
+ sizeof( FT_RendererRec ),
+
+ "smooth-lcdv",
+ 0x10000L,
+ 0x20000L,
+
+ 0, /* module specific interface */
+
+ (FT_Module_Constructor)ft_smooth_init,
+ (FT_Module_Destructor) 0,
+ (FT_Module_Requester) 0
+ },
+
+ FT_GLYPH_FORMAT_OUTLINE,
+
+ (FT_Renderer_RenderFunc) ft_smooth_render_lcd_v,
+ (FT_Renderer_TransformFunc)ft_smooth_transform,
+ (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_smooth_set_mode,
(FT_Raster_Funcs*) &ft_grays_raster
};
--- a/src/smooth/ftsmooth.h
+++ b/src/smooth/ftsmooth.h
@@ -33,7 +33,12 @@
#ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER
FT_EXPORT_VAR( const FT_Renderer_Class ) ft_smooth_renderer_class;
+
+ FT_EXPORT_VAR( const FT_Renderer_Class ) ft_smooth_lcd_renderer_class;
+
+ FT_EXPORT_VAR( const FT_Renderer_Class ) ft_smooth_lcd_v_renderer_class;
#endif
+
FT_END_HEADER
--- a/src/tools/test_bbox.c
+++ b/src/tools/test_bbox.c
@@ -46,10 +46,10 @@
static char dummy_tag_1[4] =
{
- FT_Curve_Tag_On,
- FT_Curve_Tag_Cubic,
- FT_Curve_Tag_Cubic,
- FT_Curve_Tag_On
+ FT_CURVE_TAG_ON,
+ FT_CURVE_TAG_CUBIC,
+ FT_CURVE_TAG_CUBIC,
+ FT_CURVE_TAG_ON
};
static short dummy_contour_1[1] =
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -222,7 +222,7 @@
size->strike_index = 0xFFFF;
#endif
- return TT_Size_Reset( size );
+ return tt_size_reset( size );
}
@@ -261,7 +261,7 @@
size->strike_index = 0xFFFF;
#endif
- return TT_Size_Reset( size );
+ return tt_size_reset( size );
}
@@ -319,7 +319,7 @@
if ( !size->ttmetrics.valid )
{
- if ( FT_SET_ERROR( TT_Size_Reset( size ) ) )
+ if ( FT_SET_ERROR( tt_size_reset( size ) ) )
return error;
}
}
@@ -390,8 +390,8 @@
(void*)0, /* driver specific interface */
- (FT_Module_Constructor)TT_Driver_Init,
- (FT_Module_Destructor) TT_Driver_Done,
+ (FT_Module_Constructor)tt_driver_init,
+ (FT_Module_Destructor) tt_driver_done,
(FT_Module_Requester) tt_get_interface,
},
@@ -400,10 +400,10 @@
sizeof ( FT_GlyphSlotRec ),
- (FT_Face_InitFunc) TT_Face_Init,
- (FT_Face_DoneFunc) TT_Face_Done,
- (FT_Size_InitFunc) TT_Size_Init,
- (FT_Size_DoneFunc) TT_Size_Done,
+ (FT_Face_InitFunc) tt_face_init,
+ (FT_Face_DoneFunc) tt_face_done,
+ (FT_Size_InitFunc) tt_size_init,
+ (FT_Size_DoneFunc) tt_size_done,
(FT_Slot_InitFunc) 0,
(FT_Slot_DoneFunc) 0,
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -458,7 +458,7 @@
/* clear the touch tags */
for ( n = 0; n < n_points; n++ )
- outline->tags[n] &= FT_Curve_Tag_On;
+ outline->tags[n] &= FT_CURVE_TAG_ON;
outline->n_points = (FT_UShort)n_points;
outline->n_contours = (FT_Short) n_contours;
@@ -1021,7 +1021,7 @@
FT_GlyphLoader_Add( gloader );
glyph->num_subglyphs = gloader->base.num_subglyphs;
- glyph->format = ft_glyph_format_composite;
+ glyph->format = FT_GLYPH_FORMAT_COMPOSITE;
glyph->subglyphs = gloader->base.subglyphs;
goto Exit;
@@ -1299,7 +1299,7 @@
for ( k = 0; k < num_points; k++ )
- pts->tags[k] &= FT_Curve_Tag_On;
+ pts->tags[k] &= FT_CURVE_TAG_ON;
}
cur_to_org( num_points + 2, pts );
@@ -1363,9 +1363,9 @@
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
y_scale = size->root.metrics.y_scale;
- if ( glyph->format != ft_glyph_format_composite )
+ if ( glyph->format != FT_GLYPH_FORMAT_COMPOSITE )
{
- glyph->outline.flags &= ~ft_outline_single_pass;
+ glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;
/* copy outline to our glyph slot */
FT_GlyphLoader_CopyPoints( glyph->internal->loader, loader->gloader );
@@ -1647,7 +1647,7 @@
glyph->metrics.vertBearingY = (FT_Pos)metrics.vertBearingY << 6;
glyph->metrics.vertAdvance = (FT_Pos)metrics.vertAdvance << 6;
- glyph->format = ft_glyph_format_bitmap;
+ glyph->format = FT_GLYPH_FORMAT_BITMAP;
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
{
glyph->bitmap_left = metrics.vertBearingX;
@@ -1754,7 +1754,7 @@
#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
/* Main loading loop */
- glyph->format = ft_glyph_format_outline;
+ glyph->format = FT_GLYPH_FORMAT_OUTLINE;
glyph->num_subglyphs = 0;
error = load_truetype_glyph( &loader, glyph_index );
@@ -1773,7 +1773,7 @@
/* TrueType glyphs at all sizes using the bytecode interpreter. */
/* */
if ( size && size->root.metrics.y_ppem < 24 )
- glyph->outline.flags |= ft_outline_high_precision;
+ glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
Exit:
return error;
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -1175,15 +1175,15 @@
{
FT_Int32 m, s, hi;
FT_UInt32 l, lo;
-
+
/* compute ax*bx as 64-bit value */
l = (FT_UInt32)( ( a & 0xFFFFU ) * b );
m = ( a >> 16 ) * b;
-
+
lo = l + (FT_UInt32)( m << 16 );
hi = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo < l );
-
+
/* divide the result by 2^14 with rounding */
s = hi >> 31;
l = lo + (FT_UInt32)s;
@@ -1192,7 +1192,7 @@
l = lo + 0x2000U;
hi += (l < lo);
-
+
return ( hi << 18 ) | ( l >> 14 );
}
@@ -1206,26 +1206,26 @@
{
FT_Int32 m, s, hi1, hi2, hi;
FT_UInt32 l, lo1, lo2, lo;
-
+
/* compute ax*bx as 64-bit value */
l = (FT_UInt32)( ( ax & 0xFFFFU ) * bx );
m = ( ax >> 16 ) * bx;
-
+
lo1 = l + (FT_UInt32)( m << 16 );
hi1 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo1 < l );
-
+
/* compute ay*by as 64-bit value */
l = (FT_UInt32)( ( ay & 0xFFFFU ) * by );
m = ( ay >> 16 ) * by;
-
+
lo2 = l + (FT_UInt32)( m << 16 );
hi2 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo2 < l );
-
+
/* add them */
lo = lo1 + lo2;
hi = hi1 + hi2 + ( lo < lo1 );
-
+
/* divide the result by 2^14 with rounding */
s = hi >> 31;
l = lo + (FT_UInt32)s;
@@ -1234,7 +1234,7 @@
l = lo + 0x2000U;
hi += ( l < lo );
-
+
return ( hi << 18 ) | ( l >> 14 );
}
@@ -1250,33 +1250,33 @@
FT_Int32 m, hi1, hi2, hi;
FT_UInt32 l, lo1, lo2, lo;
-
+
/* compute x*x as 64-bit value */
lo = (FT_UInt32)( x & 0xFFFFU );
hi = x >> 16;
-
+
l = lo * lo;
m = hi * lo;
hi = hi * hi;
-
+
lo1 = l + (FT_UInt32)( m << 17 );
hi1 = hi + ( m >> 15 ) + ( lo1 < l );
-
+
/* compute y*y as 64-bit value */
lo = (FT_UInt32)( y & 0xFFFFU );
hi = y >> 16;
-
+
l = lo * lo;
m = hi * lo;
hi = hi * hi;
-
+
lo2 = l + (FT_UInt32)( m << 17 );
hi2 = hi + ( m >> 15 ) + ( lo2 < l );
-
+
/* add them to get 'x*x+y*y' as 64-bit value */
lo = lo1 + lo2;
hi = hi1 + hi2 + ( lo < lo1 );
-
+
/* compute the square root of this value */
{
FT_UInt32 root, rem, test_div;
@@ -1303,13 +1303,13 @@
}
} while ( --count );
}
-
+
return (FT_Int32)root;
}
}
#else
-
+
/* this version uses FT_Vector_Length which computes the same value */
/* much, much faster.. */
/* */
@@ -1325,7 +1325,7 @@
return FT_Vector_Length( &v );
}
-
+
#endif
@@ -1550,7 +1550,7 @@
#endif
- zone->tags[point] |= FT_Curve_Tag_Touch_X;
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
v = CUR.GS.freeVector.y;
@@ -1571,7 +1571,7 @@
#endif
- zone->tags[point] |= FT_Curve_Tag_Touch_Y;
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
}
@@ -1594,7 +1594,7 @@
FT_UNUSED_EXEC;
zone->cur[point].x += distance;
- zone->tags[point] |= FT_Curve_Tag_Touch_X;
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
@@ -1606,7 +1606,7 @@
FT_UNUSED_EXEC;
zone->cur[point].y += distance;
- zone->tags[point] |= FT_Curve_Tag_Touch_Y;
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
@@ -5023,7 +5023,7 @@
}
}
else
- CUR.pts.tags[point] ^= FT_Curve_Tag_On;
+ CUR.pts.tags[point] ^= FT_CURVE_TAG_ON;
CUR.GS.loop--;
}
@@ -5057,7 +5057,7 @@
}
for ( I = L; I <= K; I++ )
- CUR.pts.tags[I] |= FT_Curve_Tag_On;
+ CUR.pts.tags[I] |= FT_CURVE_TAG_ON;
}
@@ -5085,7 +5085,7 @@
}
for ( I = L; I <= K; I++ )
- CUR.pts.tags[I] &= ~FT_Curve_Tag_On;
+ CUR.pts.tags[I] &= ~FT_CURVE_TAG_ON;
}
@@ -5153,7 +5153,7 @@
{
CUR.zp2.cur[point].x += dx;
if ( touch )
- CUR.zp2.tags[point] |= FT_Curve_Tag_Touch_X;
+ CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
if ( CUR.GS.freeVector.y != 0 )
@@ -5160,7 +5160,7 @@
{
CUR.zp2.cur[point].y += dy;
if ( touch )
- CUR.zp2.tags[point] |= FT_Curve_Tag_Touch_Y;
+ CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
}
@@ -5828,7 +5828,7 @@
dx = CUR.zp0.cur[b0].x - CUR.zp1.cur[a0].x;
dy = CUR.zp0.cur[b0].y - CUR.zp1.cur[a0].y;
- CUR.zp2.tags[point] |= FT_Curve_Tag_Touch_Both;
+ CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_BOTH;
discriminant = TT_MULDIV( dax, -dby, 0x40 ) +
TT_MULDIV( day, dbx, 0x40 );
@@ -6006,10 +6006,10 @@
mask = 0xFF;
if ( CUR.GS.freeVector.x != 0 )
- mask &= ~FT_Curve_Tag_Touch_X;
+ mask &= ~FT_CURVE_TAG_TOUCH_X;
if ( CUR.GS.freeVector.y != 0 )
- mask &= ~FT_Curve_Tag_Touch_Y;
+ mask &= ~FT_CURVE_TAG_TOUCH_Y;
CUR.zp0.tags[point] &= mask;
}
@@ -6149,13 +6149,13 @@
if ( CUR.opcode & 1 )
{
- mask = FT_Curve_Tag_Touch_X;
+ mask = FT_CURVE_TAG_TOUCH_X;
V.orgs = CUR.pts.org;
V.curs = CUR.pts.cur;
}
else
{
- mask = FT_Curve_Tag_Touch_Y;
+ mask = FT_CURVE_TAG_TOUCH_Y;
V.orgs = (FT_Vector*)( (FT_Pos*)CUR.pts.org + 1 );
V.curs = (FT_Vector*)( (FT_Pos*)CUR.pts.cur + 1 );
}
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -57,7 +57,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Done_GlyphZone */
+ /* tt_glyphzone_done */
/* */
/* <Description> */
/* Deallocates a glyph zone. */
@@ -66,7 +66,7 @@
/* zone :: A pointer to the target glyph zone. */
/* */
FT_LOCAL_DEF( void )
- TT_Done_GlyphZone( TT_GlyphZone zone )
+ tt_glyphzone_done( TT_GlyphZone zone )
{
FT_Memory memory = zone->memory;
@@ -84,7 +84,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_New_GlyphZone */
+ /* tt_glyphzone_new */
/* */
/* <Description> */
/* Allocates a new glyph zone. */
@@ -103,7 +103,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_New_GlyphZone( FT_Memory memory,
+ tt_glyphzone_new( FT_Memory memory,
FT_UShort maxPoints,
FT_Short maxContours,
TT_GlyphZone zone )
@@ -122,7 +122,7 @@
FT_NEW_ARRAY( zone->tags, maxPoints ) ||
FT_NEW_ARRAY( zone->contours, maxContours ) )
{
- TT_Done_GlyphZone( zone );
+ tt_glyphzone_done( zone );
}
return error;
@@ -133,7 +133,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Face_Init */
+ /* tt_face_init */
/* */
/* <Description> */
/* Initializes a given TrueType face object. */
@@ -154,7 +154,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Face_Init( FT_Stream stream,
+ tt_face_init( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -202,17 +202,17 @@
#ifdef FT_CONFIG_OPTION_INCREMENTAL
if ( !face->root.internal->incremental_interface )
- error = TT_Load_Locations( face, stream );
+ error = tt_face_load_loca( face, stream );
if ( !error )
- error = TT_Load_CVT ( face, stream ) ||
- TT_Load_Programs ( face, stream );
+ error = tt_face_load_cvt ( face, stream ) ||
+ tt_face_load_fpgm ( face, stream );
#else
if ( !error )
- error = TT_Load_Locations( face, stream ) ||
- TT_Load_CVT ( face, stream ) ||
- TT_Load_Programs ( face, stream );
+ error = tt_face_load_loca( face, stream ) ||
+ tt_face_load_cvt ( face, stream ) ||
+ tt_face_load_fpgm ( face, stream );
#endif
@@ -233,7 +233,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Face_Done */
+ /* tt_face_done */
/* */
/* <Description> */
/* Finalizes a given face object. */
@@ -242,7 +242,7 @@
/* face :: A pointer to the face object to destroy. */
/* */
FT_LOCAL_DEF( void )
- TT_Face_Done( TT_Face face )
+ tt_face_done( TT_Face face )
{
FT_Memory memory = face->root.memory;
FT_Stream stream = face->root.stream;
@@ -283,7 +283,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Size_Init */
+ /* tt_size_init */
/* */
/* <Description> */
/* Initializes a new TrueType size object. */
@@ -295,7 +295,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Size_Init( TT_Size size )
+ tt_size_init( TT_Size size )
{
FT_Error error = TT_Err_Ok;
@@ -352,7 +352,7 @@
/* reserve twilight zone */
n_twilight = maxp->maxTwilightPoints;
- error = TT_New_GlyphZone( memory, n_twilight, 0, &size->twilight );
+ error = tt_glyphzone_new( memory, n_twilight, 0, &size->twilight );
if ( error )
goto Fail_Memory;
@@ -453,7 +453,7 @@
Fail_Memory:
- TT_Size_Done( size );
+ tt_size_done( size );
return error;
#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
@@ -464,7 +464,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Size_Done */
+ /* tt_size_done */
/* */
/* <Description> */
/* The TrueType size object finalizer. */
@@ -473,7 +473,7 @@
/* size :: A handle to the target size object. */
/* */
FT_LOCAL_DEF( void )
- TT_Size_Done( TT_Size size )
+ tt_size_done( TT_Size size )
{
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
@@ -496,7 +496,7 @@
size->storage_size = 0;
/* twilight zone */
- TT_Done_GlyphZone( &size->twilight );
+ tt_glyphzone_done( &size->twilight );
FT_FREE( size->function_defs );
FT_FREE( size->instruction_defs );
@@ -755,7 +755,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Size_Reset */
+ /* tt_size_reset */
/* */
/* <Description> */
/* Resets a TrueType size when resolutions and character dimensions */
@@ -765,7 +765,7 @@
/* size :: A handle to the target size object. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Size_Reset( TT_Size size )
+ tt_size_reset( TT_Size size )
{
FT_Face face;
FT_Error error = TT_Err_Ok;
@@ -805,7 +805,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Driver_Init */
+ /* tt_driver_init */
/* */
/* <Description> */
/* Initializes a given TrueType driver object. */
@@ -817,7 +817,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Driver_Init( TT_Driver driver )
+ tt_driver_init( TT_Driver driver )
{
FT_Error error;
@@ -832,7 +832,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Driver_Done */
+ /* tt_driver_done */
/* */
/* <Description> */
/* Finalizes a given TrueType driver. */
@@ -841,7 +841,7 @@
/* driver :: A handle to the target TrueType driver. */
/* */
FT_LOCAL_DEF( void )
- TT_Driver_Done( TT_Driver driver )
+ tt_driver_done( TT_Driver driver )
{
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -108,10 +108,10 @@
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
FT_LOCAL( void )
- TT_Done_GlyphZone( TT_GlyphZone zone );
+ tt_glyphzone_done( TT_GlyphZone zone );
FT_LOCAL( FT_Error )
- TT_New_GlyphZone( FT_Memory memory,
+ tt_glyphzone_new( FT_Memory memory,
FT_UShort maxPoints,
FT_Short maxContours,
TT_GlyphZone zone );
@@ -379,7 +379,7 @@
/* Face functions */
/* */
FT_LOCAL( FT_Error )
- TT_Face_Init( FT_Stream stream,
+ tt_face_init( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -386,7 +386,7 @@
FT_Parameter* params );
FT_LOCAL( void )
- TT_Face_Done( TT_Face face );
+ tt_face_done( TT_Face face );
/*************************************************************************/
@@ -394,13 +394,13 @@
/* Size functions */
/* */
FT_LOCAL( FT_Error )
- TT_Size_Init( TT_Size size );
+ tt_size_init( TT_Size size );
FT_LOCAL( void )
- TT_Size_Done( TT_Size size );
+ tt_size_done( TT_Size size );
FT_LOCAL( FT_Error )
- TT_Size_Reset( TT_Size size );
+ tt_size_reset( TT_Size size );
/*************************************************************************/
@@ -408,10 +408,10 @@
/* Driver functions */
/* */
FT_LOCAL( FT_Error )
- TT_Driver_Init( TT_Driver driver );
+ tt_driver_init( TT_Driver driver );
FT_LOCAL( void )
- TT_Driver_Done( TT_Driver driver );
+ tt_driver_done( TT_Driver driver );
FT_END_HEADER
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -40,7 +40,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Locations */
+ /* tt_face_load_loca */
/* */
/* <Description> */
/* Loads the locations table. */
@@ -55,7 +55,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Locations( TT_Face face,
+ tt_face_load_loca( TT_Face face,
FT_Stream stream )
{
FT_Error error;
@@ -129,7 +129,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_CVT */
+ /* tt_face_load_cvt */
/* */
/* <Description> */
/* Loads the control value table into a face object. */
@@ -144,8 +144,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_CVT( TT_Face face,
- FT_Stream stream )
+ tt_face_load_cvt( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -194,7 +194,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Progams */
+ /* tt_face_load_fpgm */
/* */
/* <Description> */
/* Loads the font program and the cvt program. */
@@ -209,8 +209,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Programs( TT_Face face,
- FT_Stream stream )
+ tt_face_load_fpgm( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_ULong table_len;
--- a/src/truetype/ttpload.h
+++ b/src/truetype/ttpload.h
@@ -28,16 +28,16 @@
FT_LOCAL( FT_Error )
- TT_Load_Locations( TT_Face face,
+ tt_face_load_loca( TT_Face face,
FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_CVT( TT_Face face,
- FT_Stream stream );
+ tt_face_load_cvt( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Programs( TT_Face face,
- FT_Stream stream );
+ tt_face_load_fpgm( TT_Face face,
+ FT_Stream stream );
FT_END_HEADER
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -242,7 +242,7 @@
hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
( load_flags & FT_LOAD_NO_HINTING ) == 0 );
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
error = decoder_funcs->init( &decoder,
(FT_Face)face,
@@ -280,8 +280,8 @@
/* bearing the yMax */
if ( !error )
{
- glyph->root.outline.flags &= ft_outline_owner;
- glyph->root.outline.flags |= ft_outline_reverse_fill;
+ glyph->root.outline.flags &= FT_OUTLINE_OWNER;
+ glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
/* for composite glyphs, return only left side bearing and */
/* advance width */
@@ -314,10 +314,10 @@
glyph->root.linearVertAdvance = 0;
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
if ( size && size->root.metrics.y_ppem < 24 )
- glyph->root.outline.flags |= ft_outline_high_precision;
+ glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
#if 1
/* apply the font matrix, if any */
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -443,7 +443,7 @@
/* first of all, try to synthetize a Unicode charmap */
charmap.platform_id = 3;
charmap.encoding_id = 1;
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
@@ -454,25 +454,25 @@
switch ( face->type1.encoding_type )
{
case T1_ENCODING_TYPE_STANDARD:
- charmap.encoding = ft_encoding_adobe_standard;
+ charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
charmap.encoding_id = 0;
clazz = cmap_classes->standard;
break;
case T1_ENCODING_TYPE_EXPERT:
- charmap.encoding = ft_encoding_adobe_expert;
+ charmap.encoding = FT_ENCODING_ADOBE_EXPERT;
charmap.encoding_id = 1;
clazz = cmap_classes->expert;
break;
case T1_ENCODING_TYPE_ARRAY:
- charmap.encoding = ft_encoding_adobe_custom;
+ charmap.encoding = FT_ENCODING_ADOBE_CUSTOM;
charmap.encoding_id = 2;
clazz = cmap_classes->custom;
break;
case T1_ENCODING_TYPE_ISOLATIN1:
- charmap.encoding = ft_encoding_latin_1;
+ charmap.encoding = FT_ENCODING_ADOBE_LATIN_1;
charmap.encoding_id = 3;
clazz = cmap_classes->unicode;
break;
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -296,7 +296,7 @@
/* first of all, try to synthetize a Unicode charmap */
charmap.platform_id = 3;
charmap.encoding_id = 1;
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
@@ -307,25 +307,25 @@
switch ( face->type1.encoding_type )
{
case T1_ENCODING_TYPE_STANDARD:
- charmap.encoding = ft_encoding_adobe_standard;
+ charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
charmap.encoding_id = 0;
clazz = cmap_classes->standard;
break;
case T1_ENCODING_TYPE_EXPERT:
- charmap.encoding = ft_encoding_adobe_expert;
+ charmap.encoding = FT_ENCODING_ADOBE_EXPERT;
charmap.encoding_id = 1;
clazz = cmap_classes->expert;
break;
case T1_ENCODING_TYPE_ARRAY:
- charmap.encoding = ft_encoding_adobe_custom;
+ charmap.encoding = FT_ENCODING_ADOBE_CUSTOM;
charmap.encoding_id = 2;
clazz = cmap_classes->custom;
break;
case T1_ENCODING_TYPE_ISOLATIN1:
- charmap.encoding = ft_encoding_latin_1;
+ charmap.encoding = FT_ENCODING_ADOBE_LATIN_1;
charmap.encoding_id = 3;
clazz = cmap_classes->unicode;
break;
@@ -584,7 +584,7 @@
slot->control_data = 0;
slot->control_len = 0;
slot->other = 0;
- slot->format = ft_glyph_format_none;
+ slot->format = FT_GLYPH_FORMAT_NONE;
slot->linearHoriAdvance = 0;
slot->linearVertAdvance = 0;
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -484,7 +484,7 @@
{
FT_CharMapRec charmap;
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
charmap.platform_id = 3;
charmap.encoding_id = 1;
charmap.face = root;
@@ -614,7 +614,7 @@
bitmap->pitch = pitch;
bitmap->rows = font->header.pixel_height;
- bitmap->pixel_mode = ft_pixel_mode_mono;
+ bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
if ( FT_ALLOC( bitmap->buffer, pitch * bitmap->rows ) )
goto Exit;
@@ -634,7 +634,7 @@
slot->flags = FT_GLYPH_OWN_BITMAP;
slot->bitmap_left = 0;
slot->bitmap_top = font->header.ascent;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
/* now set up metrics */
slot->metrics.horiAdvance = bitmap->width << 6;
@@ -642,7 +642,7 @@
slot->metrics.horiBearingY = slot->bitmap_top << 6;
slot->linearHoriAdvance = (FT_Fixed)bitmap->width << 16;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
Exit:
return error;
--- a/tests/gview.c
+++ b/tests/gview.c
@@ -853,15 +853,15 @@
{
if ( ah_debug_hinter && option_show_smooth )
{
- AH_Outline* glyph = ah_debug_hinter->glyph;
+ AH_Outline glyph = ah_debug_hinter->glyph;
FT_UInt count = glyph->num_points;
- AH_Point* point = glyph->points;
+ AH_Point point = glyph->points;
nv_painter_set_color( painter, SMOOTH_COLOR, 256 );
for ( ; count > 0; count--, point++ )
{
- if ( !( point->flags & ah_flag_weak_interpolation ) )
+ if ( !( point->flags & AH_FLAG_WEAK_INTERPOLATION ) )
{
NV_Transform transform, *trans = &transform;
NV_Vector vec;
@@ -883,9 +883,9 @@
{
if ( ah_debug_hinter )
{
- AH_Outline* glyph = ah_debug_hinter->glyph;
+ AH_Outline glyph = ah_debug_hinter->glyph;
FT_UInt count;
- AH_Edge* edge;
+ AH_Edge edge;
FT_Pos pp1 = ah_debug_hinter->pp1.x;
nv_painter_set_color( painter, EDGE_COLOR, 256 );
@@ -938,12 +938,12 @@
/* draw vertical segments */
if ( option_show_vert_hints )
{
- AH_Segment* seg = glyph->vert_segments;
+ AH_Segment seg = glyph->vert_segments;
FT_UInt count = glyph->num_vsegments;
for ( ; count > 0; count--, seg++ )
{
- AH_Point *first, *last;
+ AH_PointRec *first, *last;
NV_Vector v1, v2;
NV_Pos y1, y2, x;
@@ -977,12 +977,12 @@
/* draw horizontal segments */
if ( option_show_horz_hints )
{
- AH_Segment* seg = glyph->horz_segments;
+ AH_Segment seg = glyph->horz_segments;
FT_UInt count = glyph->num_hsegments;
for ( ; count > 0; count--, seg++ )
{
- AH_Point *first, *last;
+ AH_PointRec *first, *last;
NV_Vector v1, v2;
NV_Pos y1, y2, x;
@@ -1016,12 +1016,12 @@
if ( option_show_vert_hints && option_show_links )
{
- AH_Segment* seg = glyph->vert_segments;
+ AH_Segment seg = glyph->vert_segments;
FT_UInt count = glyph->num_vsegments;
for ( ; count > 0; count--, seg++ )
{
- AH_Segment* seg2 = NULL;
+ AH_Segment seg2 = NULL;
NV_Path link;
NV_Vector v1, v2;
@@ -1052,12 +1052,12 @@
if ( option_show_horz_hints && option_show_links )
{
- AH_Segment* seg = glyph->horz_segments;
+ AH_Segment seg = glyph->horz_segments;
FT_UInt count = glyph->num_hsegments;
for ( ; count > 0; count--, seg++ )
{
- AH_Segment* seg2 = NULL;
+ AH_Segment seg2 = NULL;
NV_Path link;
NV_Vector v1, v2;
@@ -1113,7 +1113,7 @@
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_BITMAP );
if (error) Panic( "could not load glyph" );
- if ( face->glyph->format != ft_glyph_format_outline )
+ if ( face->glyph->format != FT_GLYPH_FORMAT_OUTLINE )
Panic( "could not load glyph outline" );
error = nv_path_new_from_outline( renderer,
@@ -1167,7 +1167,7 @@
for ( m = first; m <= last; m++ )
{
- color = (out.tags[m] & FT_Curve_Tag_On)
+ color = (out.tags[m] & FT_CURVE_TAG_ON)
? ON_COLOR
: OFF_COLOR;