diff options
author | marha <marha@users.sourceforge.net> | 2011-07-18 10:51:09 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-18 10:51:09 +0200 |
commit | 3c0d2312573b81e3067bea610a58b1940c075e05 (patch) | |
tree | 3f025a27d813374f225957801226aa8ee829a33a /freetype/include | |
parent | ba033884541714680fd7552ab9d6c8817650f7d8 (diff) | |
parent | 88101146f2ec7d53ffb793e365f05097ffd35fd3 (diff) | |
download | vcxsrv-3c0d2312573b81e3067bea610a58b1940c075e05.tar.gz vcxsrv-3c0d2312573b81e3067bea610a58b1940c075e05.tar.bz2 vcxsrv-3c0d2312573b81e3067bea610a58b1940c075e05.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
X11/Xfuncproto.h.in
X11/configure.ac
X11/keysymdef.h
freetype/include/freetype/internal/pcftypes.h
freetype/src/cache/ftcbasic.c
freetype/src/cache/ftccmap.c
mesalib/src/glsl/ir.h
mesalib/src/glsl/link_functions.cpp
mesalib/src/mesa/main/dlist.c
mesalib/src/mesa/program/prog_optimize.c
mesalib/src/mesa/state_tracker/st_program.c
pthreads/Makefile
Diffstat (limited to 'freetype/include')
-rw-r--r-- | freetype/include/freetype/config/ftconfig.h | 60 | ||||
-rw-r--r-- | freetype/include/freetype/config/ftheader.h | 15 | ||||
-rw-r--r-- | freetype/include/freetype/config/ftoption.h | 67 | ||||
-rw-r--r-- | freetype/include/freetype/freetype.h | 21 | ||||
-rw-r--r-- | freetype/include/freetype/ftbbox.h | 10 | ||||
-rw-r--r-- | freetype/include/freetype/ftbzip2.h | 102 | ||||
-rw-r--r-- | freetype/include/freetype/ftchapters.h | 1 | ||||
-rw-r--r-- | freetype/include/freetype/fterrdef.h | 1 | ||||
-rw-r--r-- | freetype/include/freetype/ftgasp.h | 18 | ||||
-rw-r--r-- | freetype/include/freetype/ftglyph.h | 9 | ||||
-rw-r--r-- | freetype/include/freetype/ftmoderr.h | 39 | ||||
-rw-r--r-- | freetype/include/freetype/ftoutln.h | 7 | ||||
-rw-r--r-- | freetype/include/freetype/ftrender.h | 8 | ||||
-rw-r--r-- | freetype/include/freetype/internal/ftstream.h | 114 | ||||
-rw-r--r-- | freetype/include/freetype/internal/fttrace.h | 7 | ||||
-rw-r--r-- | freetype/include/freetype/internal/pcftypes.h | 56 | ||||
-rw-r--r-- | freetype/include/freetype/tttables.h | 12 |
17 files changed, 374 insertions, 173 deletions
diff --git a/freetype/include/freetype/config/ftconfig.h b/freetype/include/freetype/config/ftconfig.h index cbe30f268..b30489676 100644 --- a/freetype/include/freetype/config/ftconfig.h +++ b/freetype/include/freetype/config/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* ANSI-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2010 by */ +/* Copyright 1996-2004, 2006-2008, 2010-2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -127,7 +127,12 @@ FT_BEGIN_HEADER #if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \ ( defined( __MWERKS__ ) && defined( macintosh ) ) /* no Carbon frameworks for 64bit 10.4.x */ + /* AvailabilityMacros.h is available since Mac OS X 10.2, */ + /* so guess the system version by maximum errno before inclusion */ +#include <errno.h> +#ifdef ECANCELED /* defined since 10.2 */ #include "AvailabilityMacros.h" +#endif #if defined( __LP64__ ) && \ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) #define DARWIN_NO_CARBON 1 @@ -348,14 +353,14 @@ FT_BEGIN_HEADER register FT_Int32 t, t2; - asm __volatile__ ( - "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ - "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ - "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ - "adds %1, %1, %0\n\t" /* %1 += %0 */ - "adc %2, %2, #0\n\t" /* %2 += carry */ - "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ - "orr %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ + __asm__ __volatile__ ( + "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ + "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ + "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ + "adds %1, %1, %0\n\t" /* %1 += %0 */ + "adc %2, %2, #0\n\t" /* %2 += carry */ + "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ + "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ : "=r"(a), "=&r"(t2), "=&r"(t) : "r"(a), "r"(b) ); return a; @@ -395,6 +400,43 @@ FT_BEGIN_HEADER #endif /* __GNUC__ */ + +#ifdef _MSC_VER /* Visual C++ */ + +#ifdef _M_IX86 + +#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 + + /* documentation is in freetype.h */ + + static __inline FT_Int32 + FT_MulFix_i386( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 result; + + __asm + { + mov eax, a + mov edx, b + imul edx + mov ecx, edx + sar ecx, 31 + add ecx, 8000h + add eax, ecx + adc edx, 0 + shr eax, 16 + shl edx, 16 + add eax, edx + mov result, eax + } + return result; + } + +#endif /* _M_IX86 */ + +#endif /* _MSC_VER */ + #endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ diff --git a/freetype/include/freetype/config/ftheader.h b/freetype/include/freetype/config/ftheader.h index b63945dcb..2a7b8c4e0 100644 --- a/freetype/include/freetype/config/ftheader.h +++ b/freetype/include/freetype/config/ftheader.h @@ -4,7 +4,7 @@ /* */ /* Build macros of the FreeType 2 library. */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -427,6 +427,19 @@ /************************************************************************* * * @macro: + * FT_BZIP2_H + * + * @description: + * A macro used in #include statements to name the file containing the + * definitions of an API which supports bzip2-compressed files. + * + */ +#define FT_BZIP2_H <freetype/ftbzip2.h> + + + /************************************************************************* + * + * @macro: * FT_WINFONTS_H * * @description: diff --git a/freetype/include/freetype/config/ftoption.h b/freetype/include/freetype/config/ftoption.h index 2b46259c1..17c1d1d1c 100644 --- a/freetype/include/freetype/config/ftoption.h +++ b/freetype/include/freetype/config/ftoption.h @@ -4,8 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ -/* 2010 by */ +/* Copyright 1996-2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -190,6 +189,22 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ + /* Bzip2-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* `bzip2' program. This is mostly used to parse many of the PCF */ + /* files that come with XFree86. The implementation uses `libbz2' to */ + /* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */ + /* Contrary to gzip, bzip2 currently is not included and need to use */ + /* the system available bzip2 implementation. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +/* #define FT_CONFIG_OPTION_USE_BZIP2 */ + + + /*************************************************************************/ + /* */ /* DLL export compilation */ /* */ /* When compiling FreeType as a DLL, some systems/compilers need a */ @@ -365,6 +380,39 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ + /* Autofitter debugging */ + /* */ + /* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */ + /* control the autofitter behaviour for debugging purposes with global */ + /* boolean variables (consequently, you should *never* enable this */ + /* while compiling in `release' mode): */ + /* */ + /* _af_debug_disable_horz_hints */ + /* _af_debug_disable_vert_hints */ + /* _af_debug_disable_blue_hints */ + /* */ + /* Additionally, the following functions provide dumps of various */ + /* internal autofit structures to stdout (using `printf'): */ + /* */ + /* af_glyph_hints_dump_points */ + /* af_glyph_hints_dump_segments */ + /* af_glyph_hints_dump_edges */ + /* */ + /* As an argument, they use another global variable: */ + /* */ + /* _af_debug_hints */ + /* */ + /* Please have a look at the `ftgrid' demo program to see how those */ + /* variables and macros should be used. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ +/* #define FT_DEBUG_AUTOFIT */ + + + /*************************************************************************/ + /* */ /* Memory Debugging */ /* */ /* FreeType now comes with an integrated memory debugger that is */ @@ -575,7 +623,7 @@ FT_BEGIN_HEADER /* composite flags array which can be used to disambiguate, but old */ /* fonts will not have them. */ /* */ - /* http://partners.adobe.com/asn/developer/opentype/glyf.html */ + /* http://www.microsoft.com/typography/otspec/glyf.htm */ /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ /* */ #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED @@ -676,6 +724,19 @@ FT_BEGIN_HEADER /* */ #define AF_CONFIG_OPTION_INDIC + /*************************************************************************/ + /* */ + /* Compile autofit module with warp hinting. The idea of the warping */ + /* code is to slightly scale and shift a glyph within a single dimension */ + /* so that as much of its segments are aligned (more or less) on the */ + /* grid. To find out the optimal scaling and shifting value, various */ + /* parameter combinations are tried and scored. */ + /* */ + /* This experimental option is only active if the render mode is */ + /* FT_RENDER_MODE_LIGHT. */ + /* */ +/* #define AF_CONFIG_OPTION_USE_WARPER */ + /* */ diff --git a/freetype/include/freetype/freetype.h b/freetype/include/freetype/freetype.h index 70c39008b..a0a353060 100644 --- a/freetype/include/freetype/freetype.h +++ b/freetype/include/freetype/freetype.h @@ -4,8 +4,7 @@ /* */ /* FreeType high-level API and common types (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ -/* 2010 by */ +/* Copyright 1996-2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -227,10 +226,12 @@ FT_BEGIN_HEADER /* Left side bearing for vertical layout. */ /* */ /* vertBearingY :: */ - /* Top side bearing for vertical layout. */ + /* Top side bearing for vertical layout. Larger positive values */ + /* mean further below the vertical glyph origin. */ /* */ /* vertAdvance :: */ - /* Advance height for vertical layout. */ + /* Advance height for vertical layout. Positive values mean the */ + /* glyph has a positive advance downward. */ /* */ /* <Note> */ /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ @@ -1058,7 +1059,7 @@ FT_BEGIN_HEADER /* */ /* It is not possible to autohint such fonts using */ /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ - /* @FT_LOAD_NO_HINTING. You have to set both FT_LOAD_NO_HINTING */ + /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */ /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ /* probably never want this except for demonstration purposes. */ /* */ @@ -2445,13 +2446,7 @@ FT_BEGIN_HEADER * in fonts. By default, FreeType tries to handle broken fonts also. * * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: - * Indicates that the font driver should ignore the global advance - * width defined in the font. By default, that value is used as the - * advance width for all glyphs when the face has - * @FT_FACE_FLAG_FIXED_WIDTH set. - * - * This flag exists for historical reasons (to support buggy CJK - * fonts). + * Ignored. Deprecated. * * FT_LOAD_NO_RECURSE :: * This flag is only used internally. It merely indicates that the @@ -3808,7 +3803,7 @@ FT_BEGIN_HEADER */ #define FREETYPE_MAJOR 2 #define FREETYPE_MINOR 4 -#define FREETYPE_PATCH 4 +#define FREETYPE_PATCH 5 /*************************************************************************/ diff --git a/freetype/include/freetype/ftbbox.h b/freetype/include/freetype/ftbbox.h index 0347eda01..f605ac1c4 100644 --- a/freetype/include/freetype/ftbbox.h +++ b/freetype/include/freetype/ftbbox.h @@ -4,7 +4,7 @@ /* */ /* FreeType exact bbox computation (specification). */ /* */ -/* Copyright 1996-2001, 2003, 2007 by */ +/* Copyright 1996-2001, 2003, 2007, 2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -73,6 +73,14 @@ FT_BEGIN_HEADER /* <Return> */ /* FreeType error code. 0~means success. */ /* */ + /* <Note> */ + /* If the font is tricky and the glyph has been loaded with */ + /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ + /* reasonable values for the BBox it is necessary to load the glyph */ + /* at a large ppem value (so that the hinting instructions can */ + /* properly shift and scale the subglyphs), then extracting the BBox */ + /* which can be eventually converted back to font units. */ + /* */ FT_EXPORT( FT_Error ) FT_Outline_Get_BBox( FT_Outline* outline, FT_BBox *abbox ); diff --git a/freetype/include/freetype/ftbzip2.h b/freetype/include/freetype/ftbzip2.h new file mode 100644 index 000000000..1bf81b15e --- /dev/null +++ b/freetype/include/freetype/ftbzip2.h @@ -0,0 +1,102 @@ +/***************************************************************************/ +/* */ +/* ftbzip2.h */ +/* */ +/* Bzip2-compressed stream support. */ +/* */ +/* Copyright 2010 by */ +/* Joel Klinghed. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTBZIP2_H__ +#define __FTBZIP2_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ + /* <Section> */ + /* bzip2 */ + /* */ + /* <Title> */ + /* BZIP2 Streams */ + /* */ + /* <Abstract> */ + /* Using bzip2-compressed font files. */ + /* */ + /* <Description> */ + /* This section contains the declaration of Bzip2-specific functions. */ + /* */ + /*************************************************************************/ + + + /************************************************************************ + * + * @function: + * FT_Stream_OpenBzip2 + * + * @description: + * Open a new stream to parse bzip2-compressed font files. This is + * mainly used to support the compressed `*.pcf.bz2' fonts that come + * with XFree86. + * + * @input: + * stream :: + * The target embedding stream. + * + * source :: + * The source stream. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * The source stream must be opened _before_ calling this function. + * + * Calling the internal function `FT_Stream_Close' on the new stream will + * *not* call `FT_Stream_Close' on the source stream. None of the stream + * objects will be released to the heap. + * + * The stream implementation is very basic and resets the decompression + * process each time seeking backwards is needed within the stream. + * + * In certain builds of the library, bzip2 compression recognition is + * automatically handled when calling @FT_New_Face or @FT_Open_Face. + * This means that if no font driver is capable of handling the raw + * compressed file, the library will try to open a bzip2 compressed stream + * from it and re-open the face with it. + * + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with bzip2 support. + */ + FT_EXPORT( FT_Error ) + FT_Stream_OpenBzip2( FT_Stream stream, + FT_Stream source ); + + /* */ + + +FT_END_HEADER + +#endif /* __FTBZIP2_H__ */ + + +/* END */ diff --git a/freetype/include/freetype/ftchapters.h b/freetype/include/freetype/ftchapters.h index 7775a6bb0..6cdf54e49 100644 --- a/freetype/include/freetype/ftchapters.h +++ b/freetype/include/freetype/ftchapters.h @@ -98,6 +98,7 @@ /* module_management */ /* gzip */ /* lzw */ +/* bzip2 */ /* lcd_filtering */ /* */ /***************************************************************************/ diff --git a/freetype/include/freetype/fterrdef.h b/freetype/include/freetype/fterrdef.h index bf5222060..d4e7287f2 100644 --- a/freetype/include/freetype/fterrdef.h +++ b/freetype/include/freetype/fterrdef.h @@ -214,7 +214,6 @@ FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \ "no Unicode glyph name found" ) - /* BDF errors */ FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \ diff --git a/freetype/include/freetype/ftgasp.h b/freetype/include/freetype/ftgasp.h index 9b4cac9f8..187093f6f 100644 --- a/freetype/include/freetype/ftgasp.h +++ b/freetype/include/freetype/ftgasp.h @@ -4,7 +4,7 @@ /* */ /* Access of TrueType's `gasp' table (specification). */ /* */ -/* Copyright 2007, 2008 by */ +/* Copyright 2007, 2008, 2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -62,19 +62,27 @@ * It is up to the client to decide what to do. * * FT_GASP_DO_GRIDFIT :: - * Grid-fitting and hinting should be performed at the specified ppem. - * This *really* means TrueType bytecode interpretation. + * Grid-fitting and hinting should be performed at the specified ppem. + * This *really* means TrueType bytecode interpretation. If this bit + * is not set, no hinting gets applied. * * FT_GASP_DO_GRAY :: - * Anti-aliased rendering should be performed at the specified ppem. + * Anti-aliased rendering should be performed at the specified ppem. + * If not set, do monochrome rendering. * * FT_GASP_SYMMETRIC_SMOOTHING :: - * Smoothing along multiple axes must be used with ClearType. + * If set, smoothing along multiple axes must be used with ClearType. * * FT_GASP_SYMMETRIC_GRIDFIT :: * Grid-fitting must be used with ClearType's symmetric smoothing. * * @note: + * The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be + * used for standard font rasterization only. Independently of that, + * `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to + * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and + * `FT_GASP_DO_GRAY' are consequently ignored). + * * `ClearType' is Microsoft's implementation of LCD rendering, partly * protected by patents. * diff --git a/freetype/include/freetype/ftglyph.h b/freetype/include/freetype/ftglyph.h index deb712f6c..f5fb7dcd4 100644 --- a/freetype/include/freetype/ftglyph.h +++ b/freetype/include/freetype/ftglyph.h @@ -4,7 +4,7 @@ /* */ /* FreeType convenience functions to handle glyphs (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by */ +/* Copyright 1996-2003, 2006, 2008, 2009, 2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -384,6 +384,13 @@ FT_BEGIN_HEADER /* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */ /* is another name for this constant. */ /* */ + /* If the font is tricky and the glyph has been loaded with */ + /* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */ + /* reasonable values for the CBox it is necessary to load the glyph */ + /* at a large ppem value (so that the hinting instructions can */ + /* properly shift and scale the subglyphs), then extracting the CBox */ + /* which can be eventually converted back to font units. */ + /* */ /* Note that the maximum coordinates are exclusive, which means that */ /* one can compute the width and height of the glyph image (be it in */ /* integer or 26.6 pixels) as: */ diff --git a/freetype/include/freetype/ftmoderr.h b/freetype/include/freetype/ftmoderr.h index b0115dd0d..1bf3b384a 100644 --- a/freetype/include/freetype/ftmoderr.h +++ b/freetype/include/freetype/ftmoderr.h @@ -4,7 +4,7 @@ /* */ /* FreeType module error offsets (specification). */ /* */ -/* Copyright 2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 2001, 2002, 2003, 2004, 2005, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -105,24 +105,25 @@ FT_MODERRDEF( Base, 0x000, "base module" ) FT_MODERRDEF( Autofit, 0x100, "autofitter module" ) FT_MODERRDEF( BDF, 0x200, "BDF module" ) - FT_MODERRDEF( Cache, 0x300, "cache module" ) - FT_MODERRDEF( CFF, 0x400, "CFF module" ) - FT_MODERRDEF( CID, 0x500, "CID module" ) - FT_MODERRDEF( Gzip, 0x600, "Gzip module" ) - FT_MODERRDEF( LZW, 0x700, "LZW module" ) - FT_MODERRDEF( OTvalid, 0x800, "OpenType validation module" ) - FT_MODERRDEF( PCF, 0x900, "PCF module" ) - FT_MODERRDEF( PFR, 0xA00, "PFR module" ) - FT_MODERRDEF( PSaux, 0xB00, "PS auxiliary module" ) - FT_MODERRDEF( PShinter, 0xC00, "PS hinter module" ) - FT_MODERRDEF( PSnames, 0xD00, "PS names module" ) - FT_MODERRDEF( Raster, 0xE00, "raster module" ) - FT_MODERRDEF( SFNT, 0xF00, "SFNT module" ) - FT_MODERRDEF( Smooth, 0x1000, "smooth raster module" ) - FT_MODERRDEF( TrueType, 0x1100, "TrueType module" ) - FT_MODERRDEF( Type1, 0x1200, "Type 1 module" ) - FT_MODERRDEF( Type42, 0x1300, "Type 42 module" ) - FT_MODERRDEF( Winfonts, 0x1400, "Windows FON/FNT module" ) + FT_MODERRDEF( Bzip2, 0x300, "Bzip2 module" ) + FT_MODERRDEF( Cache, 0x400, "cache module" ) + FT_MODERRDEF( CFF, 0x500, "CFF module" ) + FT_MODERRDEF( CID, 0x600, "CID module" ) + FT_MODERRDEF( Gzip, 0x700, "Gzip module" ) + FT_MODERRDEF( LZW, 0x800, "LZW module" ) + FT_MODERRDEF( OTvalid, 0x900, "OpenType validation module" ) + FT_MODERRDEF( PCF, 0xA00, "PCF module" ) + FT_MODERRDEF( PFR, 0xB00, "PFR module" ) + FT_MODERRDEF( PSaux, 0xC00, "PS auxiliary module" ) + FT_MODERRDEF( PShinter, 0xD00, "PS hinter module" ) + FT_MODERRDEF( PSnames, 0xE00, "PS names module" ) + FT_MODERRDEF( Raster, 0xF00, "raster module" ) + FT_MODERRDEF( SFNT, 0x1000, "SFNT module" ) + FT_MODERRDEF( Smooth, 0x1100, "smooth raster module" ) + FT_MODERRDEF( TrueType, 0x1200, "TrueType module" ) + FT_MODERRDEF( Type1, 0x1300, "Type 1 module" ) + FT_MODERRDEF( Type42, 0x1400, "Type 42 module" ) + FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" ) #ifdef FT_MODERR_END_LIST diff --git a/freetype/include/freetype/ftoutln.h b/freetype/include/freetype/ftoutln.h index d741627cc..a29db08f4 100644 --- a/freetype/include/freetype/ftoutln.h +++ b/freetype/include/freetype/ftoutln.h @@ -5,7 +5,7 @@ /* Support for the FT_Outline type used to store glyph shapes of */ /* most scalable font formats (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 by */ +/* Copyright 1996-2003, 2005-2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -227,6 +227,9 @@ FT_BEGIN_HEADER /* <Output> */ /* acbox :: The outline's control box. */ /* */ + /* <Note> */ + /* See @FT_Glyph_Get_CBox for a discussion of tricky fonts. */ + /* */ FT_EXPORT( void ) FT_Outline_Get_CBox( const FT_Outline* outline, FT_BBox *acbox ); @@ -332,7 +335,7 @@ FT_BEGIN_HEADER /* handled incorrectly. */ /* */ /* If you need `better' metrics values you should call */ - /* @FT_Outline_Get_CBox ot @FT_Outline_Get_BBox. */ + /* @FT_Outline_Get_CBox or @FT_Outline_Get_BBox. */ /* */ /* Example call: */ /* */ diff --git a/freetype/include/freetype/ftrender.h b/freetype/include/freetype/ftrender.h index e06a8142e..dd0229b81 100644 --- a/freetype/include/freetype/ftrender.h +++ b/freetype/include/freetype/ftrender.h @@ -212,6 +212,14 @@ FT_BEGIN_HEADER /* */ /* This doesn't change the current renderer for other formats. */ /* */ + /* Currently, only the B/W renderer, if compiled with */ + /* FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels */ + /* anti-aliasing mode; this option must be set directly in */ + /* `ftraster.c' and is undefined by default) accepts a single tag */ + /* `pal5' to set its gray palette as a character string with */ + /* 5~elements. Consequently, the third and fourth argument are zero */ + /* normally. */ + /* */ FT_EXPORT( FT_Error ) FT_Set_Renderer( FT_Library library, FT_Renderer renderer, diff --git a/freetype/include/freetype/internal/ftstream.h b/freetype/include/freetype/internal/ftstream.h index 0f93c1e67..7211ba66e 100644 --- a/freetype/include/freetype/internal/ftstream.h +++ b/freetype/include/freetype/internal/ftstream.h @@ -4,7 +4,7 @@ /* */ /* Stream handling (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2005, 2006 by */ +/* Copyright 1996-2002, 2004-2006, 2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -292,18 +292,18 @@ FT_BEGIN_HEADER #define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetChar, FT_Char ) #define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetChar, FT_Byte ) -#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_Short ) -#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_UShort ) -#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_Long ) -#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_ULong ) -#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetLong, FT_Long ) -#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong ) -#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong ) - -#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetShortLE, FT_Short ) -#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetShortLE, FT_UShort ) -#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetLongLE, FT_Long ) -#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetLongLE, FT_ULong ) +#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_Short ) +#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_UShort ) +#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_Long ) +#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_ULong ) +#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetULong, FT_Long ) +#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong ) +#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong ) + +#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Short ) +#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UShort ) +#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_Long ) +#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_ULong ) #endif #define FT_READ_MACRO( func, type, var ) \ @@ -312,17 +312,17 @@ FT_BEGIN_HEADER #define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var ) #define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var ) -#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadShort, FT_Short, var ) -#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadShort, FT_UShort, var ) -#define FT_READ_OFF3( var ) FT_READ_MACRO( FT_Stream_ReadOffset, FT_Long, var ) -#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadOffset, FT_ULong, var ) -#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadLong, FT_Long, var ) -#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadLong, FT_ULong, var ) +#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_Short, var ) +#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_UShort, var ) +#define FT_READ_OFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_Long, var ) +#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_ULong, var ) +#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_Long, var ) +#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_ULong, var ) -#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadShortLE, FT_Short, var ) -#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadShortLE, FT_UShort, var ) -#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadLongLE, FT_Long, var ) -#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadLongLE, FT_ULong, var ) +#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_Short, var ) +#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_UShort, var ) +#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_Long, var ) +#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_ULong, var ) #ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM @@ -431,25 +431,25 @@ FT_BEGIN_HEADER FT_BASE( FT_Char ) FT_Stream_GetChar( FT_Stream stream ); - /* read a 16-bit big-endian integer from an entered frame */ - FT_BASE( FT_Short ) - FT_Stream_GetShort( FT_Stream stream ); + /* read a 16-bit big-endian unsigned integer from an entered frame */ + FT_BASE( FT_UShort ) + FT_Stream_GetUShort( FT_Stream stream ); - /* read a 24-bit big-endian integer from an entered frame */ - FT_BASE( FT_Long ) - FT_Stream_GetOffset( FT_Stream stream ); + /* read a 24-bit big-endian unsigned integer from an entered frame */ + FT_BASE( FT_ULong ) + FT_Stream_GetUOffset( FT_Stream stream ); - /* read a 32-bit big-endian integer from an entered frame */ - FT_BASE( FT_Long ) - FT_Stream_GetLong( FT_Stream stream ); + /* read a 32-bit big-endian unsigned integer from an entered frame */ + FT_BASE( FT_ULong ) + FT_Stream_GetULong( FT_Stream stream ); - /* read a 16-bit little-endian integer from an entered frame */ - FT_BASE( FT_Short ) - FT_Stream_GetShortLE( FT_Stream stream ); + /* read a 16-bit little-endian unsigned integer from an entered frame */ + FT_BASE( FT_UShort ) + FT_Stream_GetUShortLE( FT_Stream stream ); - /* read a 32-bit little-endian integer from an entered frame */ - FT_BASE( FT_Long ) - FT_Stream_GetLongLE( FT_Stream stream ); + /* read a 32-bit little-endian unsigned integer from an entered frame */ + FT_BASE( FT_ULong ) + FT_Stream_GetULongLE( FT_Stream stream ); /* read a byte from a stream */ @@ -457,30 +457,30 @@ FT_BEGIN_HEADER FT_Stream_ReadChar( FT_Stream stream, FT_Error* error ); - /* read a 16-bit big-endian integer from a stream */ - FT_BASE( FT_Short ) - FT_Stream_ReadShort( FT_Stream stream, - FT_Error* error ); - - /* read a 24-bit big-endian integer from a stream */ - FT_BASE( FT_Long ) - FT_Stream_ReadOffset( FT_Stream stream, + /* read a 16-bit big-endian unsigned integer from a stream */ + FT_BASE( FT_UShort ) + FT_Stream_ReadUShort( FT_Stream stream, FT_Error* error ); + /* read a 24-bit big-endian unsigned integer from a stream */ + FT_BASE( FT_ULong ) + FT_Stream_ReadUOffset( FT_Stream stream, + FT_Error* error ); + /* read a 32-bit big-endian integer from a stream */ - FT_BASE( FT_Long ) - FT_Stream_ReadLong( FT_Stream stream, - FT_Error* error ); + FT_BASE( FT_ULong ) + FT_Stream_ReadULong( FT_Stream stream, + FT_Error* error ); - /* read a 16-bit little-endian integer from a stream */ - FT_BASE( FT_Short ) - FT_Stream_ReadShortLE( FT_Stream stream, - FT_Error* error ); + /* read a 16-bit little-endian unsigned integer from a stream */ + FT_BASE( FT_UShort ) + FT_Stream_ReadUShortLE( FT_Stream stream, + FT_Error* error ); - /* read a 32-bit little-endian integer from a stream */ - FT_BASE( FT_Long ) - FT_Stream_ReadLongLE( FT_Stream stream, - FT_Error* error ); + /* read a 32-bit little-endian unsigned integer from a stream */ + FT_BASE( FT_ULong ) + FT_Stream_ReadULongLE( FT_Stream stream, + FT_Error* error ); /* Read a structure from a stream. The structure must be described */ /* by an array of FT_Frame_Field records. */ diff --git a/freetype/include/freetype/internal/fttrace.h b/freetype/include/freetype/internal/fttrace.h index e9b383a58..fbefdbdf4 100644 --- a/freetype/include/freetype/internal/fttrace.h +++ b/freetype/include/freetype/internal/fttrace.h @@ -4,7 +4,7 @@ /* */ /* Tracing handling (specification only). */ /* */ -/* Copyright 2002, 2004, 2005, 2006, 2007 by */ +/* Copyright 2002, 2004-2007, 2009, 2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -135,5 +135,10 @@ FT_TRACE_DEF( gxvtrak ) FT_TRACE_DEF( gxvprop ) FT_TRACE_DEF( gxvlcar ) + /* autofit components */ +FT_TRACE_DEF( afcjk ) +FT_TRACE_DEF( aflatin ) +FT_TRACE_DEF( aflatin2 ) +FT_TRACE_DEF( afwarp ) /* END */ diff --git a/freetype/include/freetype/internal/pcftypes.h b/freetype/include/freetype/internal/pcftypes.h deleted file mode 100644 index 67dae4e8f..000000000 --- a/freetype/include/freetype/internal/pcftypes.h +++ /dev/null @@ -1,56 +0,0 @@ -/* pcftypes.h - - FreeType font driver for pcf fonts - - Copyright (C) 2000, 2001, 2002 by - Francesco Zappa Nardelli - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - - -#ifndef __PCFTYPES_H__ -#define __PCFTYPES_H__ - - -#include <ft2build.h> -#include <freetype/freetype.h> - - -FT_BEGIN_HEADER - - - typedef struct PCF_Public_FaceRec_ - { - FT_FaceRec root; - FT_StreamRec gzip_stream; - FT_Stream gzip_source; - - char* charset_encoding; - char* charset_registry; - - } PCF_Public_FaceRec, *PCF_Public_Face; - - -FT_END_HEADER - -#endif /* __PCFTYPES_H__ */ - - -/* END */ diff --git a/freetype/include/freetype/tttables.h b/freetype/include/freetype/tttables.h index f3ded6590..c9a9d9179 100644 --- a/freetype/include/freetype/tttables.h +++ b/freetype/include/freetype/tttables.h @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType tables definitions and interface */ /* (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 by */ +/* Copyright 1996-2005, 2008-2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -687,12 +687,16 @@ FT_BEGIN_HEADER * The index of an SFNT table. The function returns * FT_Err_Table_Missing for an invalid value. * - * @output: + * @inout: * tag :: - * The name tag of the SFNT table. + * The name tag of the SFNT table. If the value is NULL, `table_index' + * is ignored, and `length' returns the number of SFNT tables in the + * font. * + * @output: * length :: - * The length of the SFNT table. + * The length of the SFNT table (or the number of SFNT tables, depending + * on `tag'). * * @return: * FreeType error code. 0~means success. |