Update to freetype 2.6.0

Bug 18751561

Change-Id: Ia8c081f8fd38a1f78c72d30234c5ace8cfffe6a9
This commit is contained in:
Makoto Onuki
2015-06-09 16:35:08 -07:00
parent 53c63001c4
commit fb6b5b10aa
296 changed files with 9053 additions and 8878 deletions

View File

@@ -1,10 +1,10 @@
# this is now the default FreeType build for Android
#
ifndef USE_FREETYPE
USE_FREETYPE := 2.4.2
USE_FREETYPE := 2.6.0
endif
ifeq ($(USE_FREETYPE),2.4.2)
ifeq ($(USE_FREETYPE),2.6.0)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
@@ -14,34 +14,33 @@ include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_SRC_FILES:= \
src/base/ftbbox.c \
src/base/ftbitmap.c \
src/base/ftfstype.c \
src/base/ftglyph.c \
src/base/ftlcdfil.c \
src/base/ftstroke.c \
src/base/fttype1.c \
src/base/ftxf86.c \
src/base/ftbase.c \
src/base/ftsystem.c \
src/base/ftinit.c \
src/base/ftgasp.c \
src/base/ftmm.c \
src/gzip/ftgzip.c \
src/raster/raster.c \
src/sfnt/sfnt.c \
src/smooth/smooth.c \
src/autofit/autofit.c \
src/truetype/truetype.c \
src/cff/cff.c \
src/psnames/psnames.c \
src/pshinter/pshinter.c
src/base/ftbbox.c \
src/base/ftbitmap.c \
src/base/ftfntfmt.c \
src/base/ftfstype.c \
src/base/ftglyph.c \
src/base/ftlcdfil.c \
src/base/ftstroke.c \
src/base/fttype1.c \
src/base/ftbase.c \
src/base/ftsystem.c \
src/base/ftinit.c \
src/base/ftgasp.c \
src/base/ftmm.c \
src/gzip/ftgzip.c \
src/raster/raster.c \
src/sfnt/sfnt.c \
src/smooth/smooth.c \
src/autofit/autofit.c \
src/truetype/truetype.c \
src/cff/cff.c \
src/psnames/psnames.c \
src/pshinter/pshinter.c
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/builds \
$(LOCAL_PATH)/include \
external/libpng \
external/zlib
$(LOCAL_PATH)/include \
external/libpng \
external/zlib
LOCAL_CFLAGS += -W -Wall
LOCAL_CFLAGS += -fPIC -DPIC

View File

@@ -47,3 +47,5 @@
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libft2_*)

4
README.android Normal file
View File

@@ -0,0 +1,4 @@
Freetype
Not all modules in include/config/ftmodule.h are enabled.
Some options in include/config/ftoption.h are enabled/disabled.

View File

@@ -1,61 +0,0 @@
/***************************************************************************/
/* */
/* ft2build.h */
/* */
/* Build macros of the FreeType 2 library. */
/* */
/* Copyright 1996-2001, 2003, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
/*************************************************************************/
/* */
/* This is a Unix-specific version of <ft2build.h> that should be used */
/* exclusively *after* installation of the library. */
/* */
/* It assumes that `/usr/local/include/freetype2' (or whatever is */
/* returned by the `freetype-config --cflags' or `pkg-config --cflags' */
/* command) is in your compilation include path. */
/* */
/* We don't need to do anything special in this release. However, for */
/* a future FreeType 2 release, the following installation changes will */
/* be performed: */
/* */
/* - The contents of `freetype-2.x/include/freetype' will be installed */
/* to `/usr/local/include/freetype2' instead of */
/* `/usr/local/include/freetype2/freetype'. */
/* */
/* - This file will #include <freetype2/config/ftheader.h>, instead */
/* of <freetype/config/ftheader.h>. */
/* */
/* - The contents of `ftheader.h' will be processed with `sed' to */
/* replace all `<freetype/xxx>' with `<freetype2/xxx>'. */
/* */
/* - Adding `/usr/local/include/freetype2' to your compilation include */
/* path will not be necessary anymore. */
/* */
/* These changes will be transparent to client applications which use */
/* freetype-config (or pkg-config). No modifications will be necessary */
/* to compile with the new scheme. */
/* */
/*************************************************************************/
#ifndef __FT2_BUILD_UNIX_H__
#define __FT2_BUILD_UNIX_H__
/* `<prefix>/include/freetype2' must be in your current inclusion path */
#include <freetype/config/ftheader.h>
#endif /* __FT2_BUILD_UNIX_H__ */
/* END */

View File

@@ -4,7 +4,7 @@
/* */
/* ANSI-specific configuration file (specification only). */
/* */
/* Copyright 1996-2004, 2006-2008, 2010-2011, 2013, 2014 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -266,7 +266,16 @@ FT_BEGIN_HEADER
#define FT_INT64 long
#define FT_UINT64 unsigned long
#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
/*************************************************************************/
/* */
/* A 64-bit data type may create compilation problems if you compile */
/* in strict ANSI mode. To avoid them, we disable other 64-bit data */
/* types if __STDC__ is defined. You can however ignore this rule */
/* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
/* this compiler provides the __int64 type */
#define FT_LONG64
@@ -300,39 +309,38 @@ FT_BEGIN_HEADER
#define FT_INT64 long long int
#define FT_UINT64 unsigned long long int
#endif /* _MSC_VER */
#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
/*************************************************************************/
/* */
/* A 64-bit data type will create compilation problems if you compile */
/* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */
/* is defined. You can however ignore this rule by defining the */
/* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
#ifdef __STDC__
/* undefine the 64-bit macros in strict ANSI compilation mode */
#undef FT_LONG64
#undef FT_INT64
#endif /* __STDC__ */
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
#ifdef FT_LONG64
typedef FT_INT64 FT_Int64;
typedef FT_UINT64 FT_UInt64;
#endif
/*************************************************************************/
/* */
/* miscellaneous */
/* */
/*************************************************************************/
#define FT_BEGIN_STMNT do {
#define FT_END_STMNT } while ( 0 )
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
/* typeof condition taken from gnulib's `intprops.h' header file */
#if ( __GNUC__ >= 2 || \
defined( __IBM__TYPEOF__ ) || \
( __SUNPRO_C >= 0x5110 && !__STDC__ ) )
#define TYPEOF( type ) (__typeof__ (type))
#else
#define TYPEOF( type ) /* empty */
#endif
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
#define FT_LOCAL( x ) static x

View File

@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
/* Copyright 1996-2008, 2010, 2012, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -710,14 +710,16 @@
/*************************************************************************
*
* @macro:
* FT_XFREE86_H
* FT_FONT_FORMATS_H
*
* @description:
* A macro used in #include statements to name the file containing the
* FreeType~2 API which provides functions specific to the XFree86 and
* X.Org X11 servers.
* FreeType~2 API which provides functions specific to font formats.
*/
#define FT_XFREE86_H <ftxf86.h>
#define FT_FONT_FORMATS_H <ftfntfmt.h>
/* deprecated */
#define FT_XFREE86_H FT_FONT_FORMATS_H
/*************************************************************************

View File

@@ -21,16 +21,4 @@ FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
/*
* New modules in 2.4.7:
FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
*/
/* EOF */

View File

@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
/* Copyright 1996-2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -61,7 +61,7 @@ FT_BEGIN_HEADER
/* that are statically linked to the library at compile time. By */
/* default, this file is <config/ftmodule.h>. */
/* */
/* We highly recommend using the third method whenever possible. */
/* We highly recommend using the third method whenever possible. */
/* */
/*************************************************************************/
@@ -216,7 +216,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* PNG bitmap support. */
/* PNG bitmap support. */
/* */
/* FreeType now handles loading color bitmap glyphs in the PNG format. */
/* This requires help from the external libpng library. Uncompressed */
@@ -230,7 +230,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* HarfBuzz support. */
/* HarfBuzz support. */
/* */
/* FreeType uses the HarfBuzz library to improve auto-hinting of */
/* OpenType fonts. If available, many glyphs not directly addressable */
@@ -378,10 +378,6 @@ FT_BEGIN_HEADER
/* The size in bytes of the render pool used by the scan-line converter */
/* to do all of its work. */
/* */
/* This must be greater than 4KByte if you use FreeType to rasterize */
/* glyphs; otherwise, you may set it to zero to avoid unnecessary */
/* allocation of the render pool. */
/* */
#define FT_RENDER_POOL_SIZE 16384L
@@ -435,6 +431,8 @@ FT_BEGIN_HEADER
/* af_glyph_hints_dump_points */
/* af_glyph_hints_dump_segments */
/* af_glyph_hints_dump_edges */
/* af_glyph_hints_get_num_segments */
/* af_glyph_hints_get_segment_offset */
/* */
/* As an argument, they use another global variable: */
/* */
@@ -657,19 +655,6 @@ FT_BEGIN_HEADER
/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
/*************************************************************************/
/* */
/* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */
/* bytecode interpreter with a huge switch statement, rather than a call */
/* table. This results in smaller and faster code for a number of */
/* architectures. */
/* */
/* Note however that on some compiler/processor combinations, undefining */
/* this macro will generate faster, though larger, code. */
/* */
#define TT_CONFIG_OPTION_INTERPRETER_SWITCH
/*************************************************************************/
/* */
/* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */
@@ -684,7 +669,7 @@ FT_BEGIN_HEADER
/* fonts will not have them. */
/* */
/* http://www.microsoft.com/typography/otspec/glyf.htm */
/* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
/* */
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
@@ -771,6 +756,30 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/* */
/* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */
/* possible to set up the default values of the four control points that */
/* define the stem darkening behaviour of the (new) CFF engine. For */
/* more details please read the documentation of the */
/* `darkening-parameters' property of the cff driver module (file */
/* `ftcffdrv.h'), which allows the control at run-time. */
/* */
/* Do *not* undefine these macros! */
/* */
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0
/*************************************************************************/
/* */
/* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */
@@ -811,8 +820,10 @@ FT_BEGIN_HEADER
/* 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. */
/* This experimental option is active only if the rendering mode is */
/* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */
/* `warping' property of the auto-hinter (see file `ftautoh.h' for more */
/* information; by default it is switched off). */
/* */
/* #define AF_CONFIG_OPTION_USE_WARPER */
@@ -820,8 +831,8 @@ FT_BEGIN_HEADER
/*
* This macro is obsolete. Support has been removed in FreeType
* version 2.5.
* This macro is obsolete. Support has been removed in FreeType
* version 2.5.
*/
/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
@@ -837,6 +848,35 @@ FT_BEGIN_HEADER
#define TT_USE_BYTECODE_INTERPRETER
#endif
/*
* Check CFF darkening parameters. The checks are the same as in function
* `cff_property_set' in file `cffdrivr.c'.
*/
#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \
\
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \
\
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \
\
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \
CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500
#error "Invalid CFF darkening parameters!"
#endif
FT_END_HEADER

View File

@@ -5,7 +5,7 @@
/* ANSI-specific library and header configuration file (specification */
/* only). */
/* */
/* Copyright 2002-2007, 2009, 2011-2012 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -141,8 +141,7 @@
/**********************************************************************/
#define ft_atol atol
#define ft_labs labs
#define ft_atol atol
/**********************************************************************/

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType high-level API and common types (specification only). */
/* */
/* Copyright 1996-2014 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -113,7 +113,8 @@ FT_BEGIN_HEADER
/* The FreeType~2 base font interface. */
/* */
/* <Description> */
/* This section describes the public high-level API of FreeType~2. */
/* This section describes the most important public high-level API */
/* functions of FreeType~2. */
/* */
/* <Order> */
/* FT_Library */
@@ -122,6 +123,7 @@ FT_BEGIN_HEADER
/* FT_GlyphSlot */
/* FT_CharMap */
/* FT_Encoding */
/* FT_ENC_TAG */
/* */
/* FT_FaceRec */
/* */
@@ -138,8 +140,22 @@ FT_BEGIN_HEADER
/* FT_FACE_FLAG_MULTIPLE_MASTERS */
/* FT_FACE_FLAG_GLYPH_NAMES */
/* FT_FACE_FLAG_EXTERNAL_STREAM */
/* FT_FACE_FLAG_FAST_GLYPHS */
/* FT_FACE_FLAG_HINTER */
/* FT_FACE_FLAG_TRICKY */
/* */
/* FT_HAS_HORIZONTAL */
/* FT_HAS_VERTICAL */
/* FT_HAS_KERNING */
/* FT_HAS_FIXED_SIZES */
/* FT_HAS_GLYPH_NAMES */
/* FT_HAS_MULTIPLE_MASTERS */
/* FT_HAS_COLOR */
/* */
/* FT_IS_SFNT */
/* FT_IS_SCALABLE */
/* FT_IS_FIXED_WIDTH */
/* FT_IS_CID_KEYED */
/* FT_IS_TRICKY */
/* */
/* FT_STYLE_FLAG_BOLD */
/* FT_STYLE_FLAG_ITALIC */
@@ -158,6 +174,7 @@ FT_BEGIN_HEADER
/* */
/* FT_New_Face */
/* FT_Done_Face */
/* FT_Reference_Face */
/* FT_New_Memory_Face */
/* FT_Open_Face */
/* FT_Open_Args */
@@ -170,10 +187,13 @@ FT_BEGIN_HEADER
/* FT_Request_Size */
/* FT_Select_Size */
/* FT_Size_Request_Type */
/* FT_Size_RequestRec */
/* FT_Size_Request */
/* FT_Set_Transform */
/* FT_Load_Glyph */
/* FT_Get_Char_Index */
/* FT_Get_First_Char */
/* FT_Get_Next_Char */
/* FT_Get_Name_Index */
/* FT_Load_Char */
/* */
@@ -190,11 +210,11 @@ FT_BEGIN_HEADER
/* FT_LOAD_NO_SCALE */
/* FT_LOAD_NO_HINTING */
/* FT_LOAD_NO_BITMAP */
/* FT_LOAD_CROP_BITMAP */
/* FT_LOAD_NO_AUTOHINT */
/* FT_LOAD_COLOR */
/* */
/* FT_LOAD_VERTICAL_LAYOUT */
/* FT_LOAD_IGNORE_TRANSFORM */
/* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */
/* FT_LOAD_FORCE_AUTOHINT */
/* FT_LOAD_NO_RECURSE */
/* FT_LOAD_PEDANTIC */
@@ -205,6 +225,8 @@ FT_BEGIN_HEADER
/* FT_LOAD_TARGET_LCD */
/* FT_LOAD_TARGET_LCD_V */
/* */
/* FT_LOAD_TARGET_MODE */
/* */
/* FT_Render_Glyph */
/* FT_Render_Mode */
/* FT_Get_Kerning */
@@ -218,14 +240,22 @@ FT_BEGIN_HEADER
/* FT_Set_Charmap */
/* FT_Get_Charmap_Index */
/* */
/* FT_FSTYPE_INSTALLABLE_EMBEDDING */
/* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING */
/* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING */
/* FT_FSTYPE_EDITABLE_EMBEDDING */
/* FT_FSTYPE_NO_SUBSETTING */
/* FT_FSTYPE_BITMAP_EMBEDDING_ONLY */
/* */
/* FT_Get_FSType_Flags */
/* FT_Get_SubGlyph_Info */
/* */
/* FT_Face_Internal */
/* FT_Size_Internal */
/* FT_Slot_Internal */
/* */
/* FT_FACE_FLAG_XXX */
/* FT_STYLE_FLAG_XXX */
/* FT_OPEN_XXX */
/* FT_LOAD_XXX */
/* FT_LOAD_TARGET_XXX */
/* FT_SUBGLYPH_FLAG_XXX */
/* FT_FSTYPE_XXX */
/* */
/* FT_HAS_FAST_GLYPHS */
/* */
/*************************************************************************/
@@ -364,8 +394,11 @@ FT_BEGIN_HEADER
/* It also embeds a memory manager (see @FT_Memory), as well as a */
/* scan-line converter object (see @FT_Raster). */
/* */
/* In multi-threaded applications, make sure that the same FT_Library */
/* object or any of its children doesn't get accessed in parallel. */
/* In multi-threaded applications it is easiest to use one */
/* `FT_Library' object per thread. In case this is too cumbersome, */
/* a single `FT_Library' object across threads is possible also */
/* (since FreeType version 2.5.6), as long as a mutex lock is used */
/* around @FT_New_Face and @FT_Done_Face. */
/* */
/* <Note> */
/* Library objects are normally created by @FT_Init_FreeType, and */
@@ -376,6 +409,13 @@ FT_BEGIN_HEADER
typedef struct FT_LibraryRec_ *FT_Library;
/*************************************************************************/
/* */
/* <Section> */
/* module_management */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Type> */
@@ -415,6 +455,13 @@ FT_BEGIN_HEADER
typedef struct FT_RendererRec_* FT_Renderer;
/*************************************************************************/
/* */
/* <Section> */
/* base_interface */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Type> */
@@ -433,6 +480,14 @@ FT_BEGIN_HEADER
/* */
/* Use @FT_Done_Face to destroy it (along with its slot and sizes). */
/* */
/* An `FT_Face' object can only be safely used from one thread at a */
/* time. Similarly, creation and destruction of `FT_Face' with the */
/* same @FT_Library object can only be done from one thread at a */
/* time. On the other hand, functions like @FT_Load_Glyph and its */
/* siblings are thread-safe and do not need the lock to be held as */
/* long as the same `FT_Face' object is not used from multiple */
/* threads at the same time. */
/* */
/* <Also> */
/* See @FT_FaceRec for the publicly accessible fields of a given face */
/* object. */
@@ -587,9 +642,13 @@ FT_BEGIN_HEADER
/* */
/* 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.kostis.net/charsets/symbol.htm'. */
/* mathematical symbols and wingdings. For more information, see */
/* `http://www.microsoft.com/typography/otspec/recom.htm', */
/* `http://www.kostis.net/charsets/symbol.htm', and */
/* `http://www.kostis.net/charsets/wingding.htm'. */
/* */
/* This encoding uses character codes from the PUA (Private Unicode */
/* Area) in the range U+F020-U+F0FF. */
/* */
/* FT_ENCODING_SJIS :: */
/* Corresponds to Japanese SJIS encoding. More info at */
@@ -607,7 +666,7 @@ FT_BEGIN_HEADER
/* FT_ENCODING_WANSUNG :: */
/* Corresponds to the Korean encoding system known as Wansung. */
/* For more information see */
/* `http://msdn.microsoft.com/en-US/goglobal/cc305154'. */
/* `https://msdn.microsoft.com/en-US/goglobal/cc305154'. */
/* */
/* FT_ENCODING_JOHAB :: */
/* The Korean standard character set (KS~C 5601-1992), which */
@@ -727,15 +786,8 @@ FT_BEGIN_HEADER
} FT_Encoding;
/*************************************************************************/
/* */
/* <Enum> */
/* ft_encoding_xxx */
/* */
/* <Description> */
/* These constants are deprecated; use the corresponding @FT_Encoding */
/* values instead. */
/* */
/* these constants are deprecated; use the corresponding `FT_Encoding' */
/* values instead */
#define ft_encoding_none FT_ENCODING_NONE
#define ft_encoding_unicode FT_ENCODING_UNICODE
#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL
@@ -856,6 +908,11 @@ FT_BEGIN_HEADER
/* Can be NULL (e.g., in fonts embedded in a */
/* PDF file). */
/* */
/* In case the font doesn't provide a specific */
/* family name entry, FreeType tries to */
/* synthesize one, deriving it from other name */
/* entries. */
/* */
/* style_name :: The face's style name. This is an ASCII */
/* string, usually in English, that describes */
/* the typeface's style (like `Italic', */
@@ -1103,7 +1160,7 @@ FT_BEGIN_HEADER
/* TrueType bytecode instructions to move and scale all of its */
/* subglyphs. */
/* */
/* It is not possible to autohint such fonts using */
/* It is not possible to auto-hint such fonts using */
/* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */
/* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */
/* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */
@@ -1570,15 +1627,15 @@ FT_BEGIN_HEADER
/* change between calls of @FT_Load_Glyph and a */
/* few other functions. */
/* */
/* 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. */
/* bitmap_left :: The bitmap's left bearing expressed in */
/* integer pixels. Only valid if the format is */
/* @FT_GLYPH_FORMAT_BITMAP, this is, if the */
/* glyph slot contains a bitmap. */
/* */
/* bitmap_top :: This is the bitmap's top bearing expressed in */
/* integer pixels. Remember that this is the */
/* distance from the baseline to the top-most */
/* glyph scanline, upwards y~coordinates being */
/* bitmap_top :: The bitmap's top bearing expressed in integer */
/* pixels. Remember that this is the distance */
/* from the baseline to the top-most glyph */
/* scanline, upwards y~coordinates being */
/* *positive*. */
/* */
/* outline :: The outline descriptor for the current glyph */
@@ -1612,11 +1669,11 @@ FT_BEGIN_HEADER
/* needs to know about the image format. */
/* */
/* lsb_delta :: The difference between hinted and unhinted */
/* left side bearing while autohinting is */
/* left side bearing while auto-hinting is */
/* active. Zero otherwise. */
/* */
/* rsb_delta :: The difference between hinted and unhinted */
/* right side bearing while autohinting is */
/* right side bearing while auto-hinting is */
/* active. Zero otherwise. */
/* */
/* <Note> */
@@ -1639,7 +1696,7 @@ FT_BEGIN_HEADER
/* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */
/* */
/* <Note> */
/* Here a small pseudo code fragment that shows how to use */
/* Here is a small pseudo code fragment that shows how to use */
/* `lsb_delta' and `rsb_delta': */
/* */
/* { */
@@ -1732,8 +1789,8 @@ FT_BEGIN_HEADER
/* use @FT_New_Library instead, followed by a call to */
/* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */
/* */
/* For multi-threading applications each thread should have its own */
/* FT_Library object. */
/* See the documentation of @FT_Library and @FT_Face for */
/* multi-threading issues. */
/* */
/* If you need reference-counting (cf. @FT_Reference_Library), use */
/* @FT_New_Library and @FT_Done_Library. */
@@ -1782,16 +1839,6 @@ FT_BEGIN_HEADER
/* */
/* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */
/* */
/* ft_open_memory :: Deprecated; use @FT_OPEN_MEMORY instead. */
/* */
/* ft_open_stream :: Deprecated; use @FT_OPEN_STREAM instead. */
/* */
/* ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead. */
/* */
/* ft_open_driver :: Deprecated; use @FT_OPEN_DRIVER instead. */
/* */
/* ft_open_params :: Deprecated; use @FT_OPEN_PARAMS instead. */
/* */
/* <Note> */
/* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */
/* flags are mutually exclusive. */
@@ -1802,11 +1849,14 @@ FT_BEGIN_HEADER
#define FT_OPEN_DRIVER 0x8
#define FT_OPEN_PARAMS 0x10
#define ft_open_memory FT_OPEN_MEMORY /* deprecated */
#define ft_open_stream FT_OPEN_STREAM /* deprecated */
#define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */
#define ft_open_driver FT_OPEN_DRIVER /* deprecated */
#define ft_open_params FT_OPEN_PARAMS /* deprecated */
/* these constants are deprecated; use the corresponding `FT_OPEN_XXX' */
/* values instead */
#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
/*************************************************************************/
@@ -1871,22 +1921,22 @@ FT_BEGIN_HEADER
/* The stream type is determined by the contents of `flags' that */
/* 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'. */
/* The data are are not copied, and the client is responsible for */
/* releasing and destroying them _after_ the corresponding call to */
/* @FT_Done_Face. */
/* */
/* 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 only tries to */
/* If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries 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' is used. They are ignored otherwise. */
/* */
/* Ideally, both the `pathname' and `params' fields should be tagged */
@@ -2540,11 +2590,6 @@ FT_BEGIN_HEADER
* Indicates that the auto-hinter is preferred over the font's native
* hinter. See also the note below.
*
* FT_LOAD_CROP_BITMAP ::
* Indicates that the font driver should crop the loaded bitmap glyph
* (i.e., remove all space around its black bits). Not all drivers
* implement this.
*
* FT_LOAD_PEDANTIC ::
* Indicates that the font driver should perform pedantic verifications
* during glyph loading. This is mostly used to detect broken glyphs
@@ -2555,9 +2600,6 @@ FT_BEGIN_HEADER
* result in partially hinted or distorted glyphs in case a glyph's
* bytecode is buggy.
*
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
* Ignored. Deprecated.
*
* FT_LOAD_NO_RECURSE ::
* Indicate that the font driver should not load composite glyphs
* recursively. Instead, it should set the `num_subglyph' and
@@ -2596,6 +2638,12 @@ FT_BEGIN_HEADER
* bitmaps transparently. Those bitmaps will be in the
* @FT_PIXEL_MODE_GRAY format.
*
* FT_LOAD_CROP_BITMAP ::
* Ignored. Deprecated.
*
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
* Ignored. Deprecated.
*
* @note:
* By default, hinting is enabled and the font's native hinter (see
* @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can
@@ -2832,19 +2880,8 @@ FT_BEGIN_HEADER
} FT_Render_Mode;
/*************************************************************************/
/* */
/* <Enum> */
/* ft_render_mode_xxx */
/* */
/* <Description> */
/* These constants 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 */
/* */
/* these constants are deprecated; use the corresponding */
/* `FT_Render_Mode' values instead */
#define ft_render_mode_normal FT_RENDER_MODE_NORMAL
#define ft_render_mode_mono FT_RENDER_MODE_MONO
@@ -2908,39 +2945,10 @@ FT_BEGIN_HEADER
} FT_Kerning_Mode;
/*************************************************************************/
/* */
/* <Const> */
/* ft_kerning_default */
/* */
/* <Description> */
/* This constant is deprecated. Please use @FT_KERNING_DEFAULT */
/* instead. */
/* */
/* these constants are deprecated; use the corresponding */
/* `FT_Kerning_Mode' values 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
@@ -3410,8 +3418,9 @@ FT_BEGIN_HEADER
/* @FT_Get_FSType_Flags; they inform client applications of embedding */
/* and subsetting restrictions associated with a font. */
/* */
/* See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for */
/* more details. */
/* See */
/* http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf */
/* for more details. */
/* */
/* <Values> */
/* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */
@@ -3510,8 +3519,8 @@ FT_BEGIN_HEADER
/* */
/* http://www.unicode.org/reports/tr37/ */
/* */
/* To date (November 2012), the character with the most variants is */
/* U+9089, having 31 such IVS. */
/* To date (November 2014), the character with the most variants is */
/* U+9089, having 32 such IVS. */
/* */
/* Adobe and MS decided to support IVS with a new cmap subtable */
/* (format~14). It is an odd subtable because it is not a mapping of */
@@ -3762,12 +3771,6 @@ FT_BEGIN_HEADER
FT_Long c );
/* */
/* The following #if 0 ... #endif is for the documentation formatter, */
/* hiding the internal `FT_MULFIX_INLINED' macro. */
#if 0
/*************************************************************************/
/* */
/* <Function> */
@@ -3801,17 +3804,6 @@ FT_BEGIN_HEADER
FT_MulFix( FT_Long a,
FT_Long b );
/* */
#endif
#ifdef FT_MULFIX_INLINED
#define FT_MulFix( a, b ) FT_MULFIX_INLINED( a, b )
#else
FT_EXPORT( FT_Long )
FT_MulFix( FT_Long a,
FT_Long b );
#endif
/*************************************************************************/
/* */
@@ -3824,18 +3816,12 @@ FT_BEGIN_HEADER
/* used to divide a given value by a 16.16 fixed-point factor. */
/* */
/* <Input> */
/* a :: The first multiplier. */
/* b :: The second multiplier. Use a 16.16 factor here whenever */
/* possible (see note below). */
/* a :: The numerator. */
/* b :: The denominator. Use a 16.16 factor here. */
/* */
/* <Return> */
/* The result of `(a*0x10000)/b'. */
/* */
/* <Note> */
/* The optimization for FT_DivFix() is simple: If (a~<<~16) fits in */
/* 32~bits, then the division is computed directly. Otherwise, we */
/* use a specialized version of @FT_MulDiv. */
/* */
FT_EXPORT( FT_Long )
FT_DivFix( FT_Long a,
FT_Long b );
@@ -3935,6 +3921,18 @@ FT_BEGIN_HEADER
/* even a new release of FreeType with only documentation changes */
/* increases the version number. */
/* */
/* <Order> */
/* FT_Library_Version */
/* */
/* FREETYPE_MAJOR */
/* FREETYPE_MINOR */
/* FREETYPE_PATCH */
/* */
/* FT_Face_CheckTrueTypePatents */
/* FT_Face_SetUnpatentedHinting */
/* */
/* FREETYPE_XXX */
/* */
/*************************************************************************/
@@ -3959,8 +3957,8 @@ FT_BEGIN_HEADER
*
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 5
#define FREETYPE_PATCH 3
#define FREETYPE_MINOR 6
#define FREETYPE_PATCH 0
/*************************************************************************/

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType 2 build and setup macros. */
/* */
/* Copyright 1996-2001, 2006, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* Quick computation of advance widths (specification only). */
/* */
/* Copyright 2008, 2013 by */
/* Copyright 2008-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -48,6 +48,11 @@ FT_BEGIN_HEADER
* @description:
* This section contains functions to quickly extract advance values
* without handling glyph outlines, if possible.
*
* @order:
* FT_Get_Advance
* FT_Get_Advances
*
*/
@@ -72,7 +77,7 @@ FT_BEGIN_HEADER
/* and hinting of the glyph outline, are extremely slow by */
/* comparison. */
/* */
#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000UL
#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000L
/*************************************************************************/
@@ -171,7 +176,7 @@ FT_BEGIN_HEADER
FT_Int32 load_flags,
FT_Fixed *padvances );
/* */
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType API for controlling the auto-hinter (specification only). */
/* */
/* Copyright 2012, 2013 by */
/* Copyright 2012-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -245,12 +245,12 @@ FT_BEGIN_HEADER
* The data exchange structure for the @glyph-to-script-map property.
*
*/
typedef struct FT_Prop_GlyphToScriptMap_
{
FT_Face face;
FT_Byte* map;
typedef struct FT_Prop_GlyphToScriptMap_
{
FT_Face face;
FT_Byte* map;
} FT_Prop_GlyphToScriptMap;
} FT_Prop_GlyphToScriptMap;
/**************************************************************************
@@ -300,7 +300,7 @@ FT_BEGIN_HEADER
* @description:
* *Experimental* *only*
*
* If Freetype gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make
* If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make
* the HarfBuzz library access OpenType features for getting better
* glyph coverages, this property sets the (auto-fitter) script to be
* used for the default (OpenType) script data of a font's GSUB table.
@@ -384,15 +384,63 @@ FT_BEGIN_HEADER
* The data exchange structure for the @increase-x-height property.
*
*/
typedef struct FT_Prop_IncreaseXHeight_
{
FT_Face face;
FT_UInt limit;
typedef struct FT_Prop_IncreaseXHeight_
{
FT_Face face;
FT_UInt limit;
} FT_Prop_IncreaseXHeight;
} FT_Prop_IncreaseXHeight;
/* */
/**************************************************************************
*
* @property:
* warping
*
* @description:
* *Experimental* *only*
*
* If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to
* activate the warp hinting code in the auto-hinter, this property
* switches warping on and off.
*
* Warping only works in `light' auto-hinting mode. The idea of the
* code is to slightly scale and shift a glyph along the non-hinted
* dimension (which is usually the horizontal axis) so that as much of
* its segments are aligned (more or less) to the grid. To find out a
* glyph's optimal scaling and shifting value, various parameter
* combinations are tried and scored.
*
* By default, warping is off. The example below shows how to switch on
* warping (omitting the error handling).
*
* {
* FT_Library library;
* FT_Bool warping = 1;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "autofitter",
* "warping", &warping );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
* The warping code can also change advance widths. Have a look at the
* `lsb_delta' and `rsb_delta' fields in the @FT_GlyphSlotRec structure
* for details on improving inter-glyph distances while rendering.
*
* Since warping is a global property of the auto-hinter it is best to
* change its value before rendering any face. Otherwise, you should
* reload all faces that get auto-hinted in `light' hinting mode.
*
*/
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType exact bbox computation (specification). */
/* */
/* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -85,7 +85,6 @@ FT_BEGIN_HEADER
FT_Outline_Get_BBox( FT_Outline* outline,
FT_BBox *abbox );
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (specification). */
/* */
/* Copyright 2002-2004, 2006, 2009, 2014 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -53,7 +53,7 @@ FT_BEGIN_HEADER
/**********************************************************************
*
* @enum:
* FT_PropertyType
* BDF_PropertyType
*
* @description:
* A list of BDF property types.
@@ -200,7 +200,7 @@ FT_BEGIN_HEADER
const char* prop_name,
BDF_PropertyRec *aproperty );
/* */
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType utility functions for bitmaps (specification). */
/* */
/* Copyright 2004-2006, 2008, 2013 by */
/* Copyright 2004-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,7 +45,9 @@ FT_BEGIN_HEADER
/* Handling FT_Bitmap objects. */
/* */
/* <Description> */
/* This section contains functions for converting FT_Bitmap objects. */
/* This section contains functions for handling @FT_Bitmap objects. */
/* Note that none of the functions changes the bitmap's `flow' (as */
/* indicated by the sign of the `pitch' field in `FT_Bitmap'). */
/* */
/*************************************************************************/
@@ -53,7 +55,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
/* FT_Bitmap_New */
/* FT_Bitmap_Init */
/* */
/* <Description> */
/* Initialize a pointer to an @FT_Bitmap structure. */
@@ -61,6 +63,14 @@ FT_BEGIN_HEADER
/* <InOut> */
/* abitmap :: A pointer to the bitmap structure. */
/* */
/* <Note> */
/* A deprecated name for the same function is `FT_Bitmap_New'. */
/* */
FT_EXPORT( void )
FT_Bitmap_Init( FT_Bitmap *abitmap );
/* deprecated */
FT_EXPORT( void )
FT_Bitmap_New( FT_Bitmap *abitmap );
@@ -122,6 +132,9 @@ FT_BEGIN_HEADER
/* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */
/* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */
/* */
/* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format */
/* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). */
/* */
FT_EXPORT( FT_Error )
FT_Bitmap_Embolden( FT_Library library,
FT_Bitmap* bitmap,
@@ -197,7 +210,7 @@ FT_BEGIN_HEADER
/* FT_Bitmap_Done */
/* */
/* <Description> */
/* Destroy a bitmap object created with @FT_Bitmap_New. */
/* Destroy a bitmap object initialized with @FT_Bitmap_Init. */
/* */
/* <Input> */
/* library :: A handle to a library object. */

View File

@@ -4,7 +4,7 @@
/* */
/* Bzip2-compressed stream support. */
/* */
/* Copyright 2010 by */
/* Copyright 2010-2015 by */
/* Joel Klinghed. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -91,7 +91,7 @@ FT_BEGIN_HEADER
FT_Stream_OpenBzip2( FT_Stream stream,
FT_Stream source );
/* */
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType Cache subsystem (specification). */
/* */
/* Copyright 1996-2008, 2010, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -209,10 +209,10 @@ FT_BEGIN_HEADER
typedef FT_Error
(*FTC_Face_Requester)( FTC_FaceID face_id,
FT_Library library,
FT_Pointer request_data,
FT_Pointer req_data,
FT_Face* aface );
/* */
/* */
/*************************************************************************/
@@ -667,8 +667,8 @@ FT_BEGIN_HEADER
typedef struct FTC_ImageTypeRec_
{
FTC_FaceID face_id;
FT_Int width;
FT_Int height;
FT_UInt width;
FT_UInt height;
FT_Int32 flags;
} FTC_ImageTypeRec;
@@ -1046,8 +1046,8 @@ FT_BEGIN_HEADER
FTC_SBit *sbit,
FTC_Node *anode );
/* */
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType API for controlling the CFF driver (specification only). */
/* */
/* Copyright 2013 by */
/* Copyright 2013-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -108,6 +108,12 @@ FT_BEGIN_HEADER
* in one of four ways, top edge up or down, bottom edge up or down.
* Unless there are conflicting hstems, the smallest movement is taken
* to minimize distortion.
*
* @order:
* hinting-engine
* no-stem-darkening
* darkening-parameters
*
*/
@@ -212,9 +218,11 @@ FT_BEGIN_HEADER
* stem width >= 2.333px: darkening amount = 0px
* }
*
* and piecewise linear in-between. Using the `darkening-parameters'
* property, these four control points can be changed, as the following
* example demonstrates.
* and piecewise linear in-between. At configuration time, these four
* control points can be set with the macro
* `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'. At runtime, the control
* points can be changed using the `darkening-parameters' property, as
* the following example demonstrates.
*
* {
* FT_Library library;
@@ -242,8 +250,8 @@ FT_BEGIN_HEADER
*
*/
/* */
/* */
FT_END_HEADER

View File

@@ -4,7 +4,8 @@
/* */
/* FreeType API for accessing CID font information (specification). */
/* */
/* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */
/* Copyright 2007-2015 by */
/* Dereg Clegg and Michael Toftdal. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -156,7 +157,8 @@ FT_BEGIN_HEADER
FT_UInt glyph_index,
FT_UInt *cid );
/* */
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType error codes (specification). */
/* */
/* Copyright 2002, 2004, 2006, 2007, 2010-2013 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType error code handling (specification). */
/* */
/* Copyright 1996-2002, 2004, 2007, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -1,10 +1,10 @@
/***************************************************************************/
/* */
/* ftxf86.h */
/* ftfntfmt.h */
/* */
/* Support functions for X11. */
/* Support functions for font formats. */
/* */
/* Copyright 2002-2004, 2006, 2007, 2013 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,8 @@
/***************************************************************************/
#ifndef __FTXF86_H__
#define __FTXF86_H__
#ifndef __FTFNTFMT_H__
#define __FTFNTFMT_H__
#include <ft2build.h>
#include FT_FREETYPE_H
@@ -49,22 +49,20 @@ FT_BEGIN_HEADER
/* however, there are special cases (like in PDF devices) where it is */
/* important to differentiate, in spite of FreeType's uniform API. */
/* */
/* This function is in the X11/xf86 namespace for historical reasons */
/* and in no way depends on that windowing system. */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Function> */
/* FT_Get_X11_Font_Format */
/* FT_Get_Font_Format */
/* */
/* <Description> */
/* Return a string describing the format of a given face, using values */
/* that can be used as an X11 FONT_PROPERTY. Possible values are */
/* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */
/* `PFR', and `Windows~FNT'. */
/* Return a string describing the format of a given face. Possible */
/* values are `TrueType', `Type~1', `BDF', `PCF', `Type~42', */
/* `CID~Type~1', `CFF', `PFR', and `Windows~FNT'. */
/* */
/* The return value is suitable to be used as an X11 FONT_PROPERTY. */
/* */
/* <Input> */
/* face :: */
@@ -73,11 +71,22 @@ FT_BEGIN_HEADER
/* <Return> */
/* Font format string. NULL in case of error. */
/* */
/* <Note> */
/* A deprecated name for the same function is */
/* `FT_Get_X11_Font_Format'. */
/* */
FT_EXPORT( const char* )
FT_Get_Font_Format( FT_Face face );
/* deprecated */
FT_EXPORT( const char* )
FT_Get_X11_Font_Format( FT_Face face );
/* */
/* */
FT_END_HEADER
#endif /* __FTXF86_H__ */
#endif /* __FTFNTFMT_H__ */

View File

@@ -4,7 +4,7 @@
/* */
/* Access of TrueType's `gasp' table (specification). */
/* */
/* Copyright 2007, 2008, 2011 by */
/* Copyright 2007-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -120,7 +120,8 @@
FT_Get_Gasp( FT_Face face,
FT_UInt ppem );
/* */
/* */
#endif /* _FT_GASP_H_ */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (specification). */
/* */
/* Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -325,22 +325,8 @@ FT_BEGIN_HEADER
} FT_Glyph_BBox_Mode;
/*************************************************************************/
/* */
/* <Enum> */
/* ft_glyph_bbox_xxx */
/* */
/* <Description> */
/* These constants are deprecated. Use the corresponding */
/* @FT_Glyph_BBox_Mode values instead. */
/* */
/* <Values> */
/* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */
/* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */
/* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */
/* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */
/* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */
/* */
/* these constants are deprecated; use the corresponding */
/* `FT_Glyph_BBox_Mode' values instead */
#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT
@@ -603,7 +589,6 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_Error )
FT_Matrix_Invert( FT_Matrix* matrix );
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating TrueTypeGX/AAT tables (specification). */
/* */
/* Copyright 2004-2006, 2013 by */
/* Copyright 2004-2015 by */
/* Masatake YAMATO, Redhat K.K, */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -57,9 +57,19 @@ FT_BEGIN_HEADER
/* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */
/* trak, prop, lcar). */
/* */
/* <Order> */
/* FT_TrueTypeGX_Validate */
/* FT_TrueTypeGX_Free */
/* */
/* FT_ClassicKern_Validate */
/* FT_ClassicKern_Free */
/* */
/* FT_VALIDATE_GX_LENGTH */
/* FT_VALIDATE_GXXXX */
/* FT_VALIDATE_CKERNXXX */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* */
@@ -171,8 +181,6 @@ FT_BEGIN_HEADER
FT_VALIDATE_lcar )
/* */
/**********************************************************************
*
* @function:
@@ -221,8 +229,6 @@ FT_BEGIN_HEADER
FT_UInt table_length );
/* */
/**********************************************************************
*
* @function:
@@ -248,8 +254,6 @@ FT_BEGIN_HEADER
FT_Bytes table );
/* */
/**********************************************************************
*
* @enum:
@@ -277,8 +281,6 @@ FT_BEGIN_HEADER
#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
/* */
/**********************************************************************
*
* @function:
@@ -320,8 +322,6 @@ FT_BEGIN_HEADER
FT_Bytes *ckern_table );
/* */
/**********************************************************************
*
* @function:
@@ -346,8 +346,7 @@ FT_BEGIN_HEADER
FT_ClassicKern_Free( FT_Face face,
FT_Bytes table );
/* */
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* Gzip-compressed stream support. */
/* */
/* Copyright 2002-2004, 2006, 2013 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -137,8 +137,7 @@ FT_BEGIN_HEADER
const FT_Byte* input,
FT_ULong input_len );
/* */
/* */
FT_END_HEADER

View File

@@ -5,7 +5,7 @@
/* FreeType glyph image formats and default raster interface */
/* (specification). */
/* */
/* Copyright 1996-2010, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -193,67 +193,14 @@ FT_BEGIN_HEADER
} FT_Pixel_Mode;
/*************************************************************************/
/* */
/* <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. */
/* */
/* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */
/* values instead. */
#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 to describe the format of a bitmap palette, */
/* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
/* */
/* <Values> */
/* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */
/* records. */
/* */
/* ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA */
/* records. */
/* */
/* <Note> */
/* As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by */
/* FreeType, these types are not handled by the library itself. */
/* */
typedef enum FT_Palette_Mode_
{
ft_palette_mode_rgb = 0,
ft_palette_mode_rgba,
ft_palette_mode_max /* do not remove */
} FT_Palette_Mode;
/* */
#endif
/*************************************************************************/
/* */
@@ -311,20 +258,15 @@ FT_BEGIN_HEADER
/* field is intended for paletted pixel modes. Not */
/* used currently. */
/* */
/* <Note> */
/* For now, the only pixel modes supported by FreeType are mono and */
/* grays. However, drivers might be added in the future to support */
/* more `colorful' options. */
/* */
typedef struct FT_Bitmap_
{
int rows;
int width;
unsigned int rows;
unsigned int width;
int pitch;
unsigned char* buffer;
short num_grays;
char pixel_mode;
char palette_mode;
unsigned short num_grays;
unsigned char pixel_mode;
unsigned char palette_mode;
void* palette;
} FT_Bitmap;
@@ -381,7 +323,7 @@ FT_BEGIN_HEADER
/* */
/* flags :: A set of bit flags used to characterize the outline */
/* and give hints to the scan-converter and hinter on */
/* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */
/* how to convert/grid-fit it. See @FT_OUTLINE_XXX. */
/* */
/* <Note> */
/* The B/W rasterizer only checks bit~2 in the `tags' array for the */
@@ -402,6 +344,8 @@ FT_BEGIN_HEADER
} FT_Outline;
/* */
/* Following limits must be consistent with */
/* FT_Outline.{n_contours,n_points} */
#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
@@ -411,7 +355,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Enum> */
/* FT_OUTLINE_FLAGS */
/* FT_OUTLINE_XXX */
/* */
/* <Description> */
/* A list of bit-field constants use for the flags in an outline's */
@@ -492,24 +436,8 @@ FT_BEGIN_HEADER
#define FT_OUTLINE_SINGLE_PASS 0x200
/*************************************************************************
*
* @enum:
* ft_outline_flags
*
* @description:
* These constants are deprecated. Please use the corresponding
* @FT_OUTLINE_FLAGS values.
*
* @values:
* ft_outline_none :: See @FT_OUTLINE_NONE.
* ft_outline_owner :: See @FT_OUTLINE_OWNER.
* ft_outline_even_odd_fill :: See @FT_OUTLINE_EVEN_ODD_FILL.
* ft_outline_reverse_fill :: See @FT_OUTLINE_REVERSE_FILL.
* ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.
* ft_outline_high_precision :: See @FT_OUTLINE_HIGH_PRECISION.
* ft_outline_single_pass :: See @FT_OUTLINE_SINGLE_PASS.
*/
/* these constants are deprecated; use the corresponding */
/* `FT_OUTLINE_XXX' values instead */
#define ft_outline_none FT_OUTLINE_NONE
#define ft_outline_owner FT_OUTLINE_OWNER
#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL
@@ -796,22 +724,8 @@ FT_BEGIN_HEADER
} FT_Glyph_Format;
/*************************************************************************/
/* */
/* <Enum> */
/* ft_glyph_format_xxx */
/* */
/* <Description> */
/* A list of deprecated 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. */
/* */
/* these constants are deprecated; use the corresponding */
/* `FT_Glyph_Format' values instead. */
#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
@@ -856,6 +770,21 @@ FT_BEGIN_HEADER
/* <Description> */
/* This section contains technical definitions. */
/* */
/* <Order> */
/* FT_Raster */
/* FT_Span */
/* FT_SpanFunc */
/* */
/* FT_Raster_Params */
/* FT_RASTER_FLAG_XXX */
/* */
/* FT_Raster_NewFunc */
/* FT_Raster_DoneFunc */
/* FT_Raster_ResetFunc */
/* FT_Raster_SetModeFunc */
/* FT_Raster_RenderFunc */
/* FT_Raster_Funcs */
/* */
/*************************************************************************/
@@ -865,8 +794,8 @@ FT_BEGIN_HEADER
/* FT_Raster */
/* */
/* <Description> */
/* A handle (pointer) to a raster object. Each object can be used */
/* independently to convert an outline into a bitmap or pixmap. */
/* An opaque handle (pointer) to a raster object. Each object can be */
/* used independently to convert an outline into a bitmap or pixmap. */
/* */
typedef struct FT_RasterRec_* FT_Raster;
@@ -877,8 +806,8 @@ FT_BEGIN_HEADER
/* FT_Span */
/* */
/* <Description> */
/* A structure used to model a single span of gray (or black) pixels */
/* when rendering a monochrome or anti-aliased bitmap. */
/* A structure used to model a single span of gray pixels when */
/* rendering an anti-aliased bitmap. */
/* */
/* <Fields> */
/* x :: The span's horizontal start position. */
@@ -886,8 +815,7 @@ FT_BEGIN_HEADER
/* len :: The span's length in pixels. */
/* */
/* coverage :: The span color/coverage, ranging from 0 (background) */
/* to 255 (foreground). Only used for anti-aliased */
/* rendering. */
/* to 255 (foreground). */
/* */
/* <Note> */
/* This structure is used by the span drawing callback type named */
@@ -957,22 +885,7 @@ FT_BEGIN_HEADER
/* 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 */
/* per-se the TrueType spec. */
/* */
/* <Input> */
/* y :: The pixel's y~coordinate. */
/* */
/* x :: The pixel's x~coordinate. */
/* */
/* user :: User-supplied data that is passed to the callback. */
/* */
/* <Return> */
/* 1~if the pixel is `set', 0~otherwise. */
/* Deprecated, unimplemented. */
/* */
typedef int
(*FT_Raster_BitTest_Func)( int y,
@@ -986,21 +899,7 @@ FT_BEGIN_HEADER
/* 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. */
/* */
/* <Input> */
/* y :: The pixel's y~coordinate. */
/* */
/* x :: The pixel's x~coordinate. */
/* */
/* user :: User-supplied data that is passed to the callback. */
/* */
/* <Return> */
/* 1~if the pixel is `set', 0~otherwise. */
/* Deprecated, unimplemented. */
/* */
typedef void
(*FT_Raster_BitSet_Func)( int y,
@@ -1034,8 +933,8 @@ FT_BEGIN_HEADER
/* pixmap's buffer _must_ be zeroed before */
/* rendering. */
/* */
/* Note that for now, direct rendering is */
/* only possible with anti-aliased glyphs. */
/* Direct rendering is only possible with */
/* anti-aliased glyphs. */
/* */
/* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
/* rendering mode. If set, the output will */
@@ -1053,7 +952,8 @@ FT_BEGIN_HEADER
#define FT_RASTER_FLAG_DIRECT 0x2
#define FT_RASTER_FLAG_CLIP 0x4
/* deprecated */
/* these constants are deprecated; use the corresponding */
/* `FT_RASTER_FLAG_XXX' values instead */
#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
@@ -1079,11 +979,11 @@ FT_BEGIN_HEADER
/* */
/* gray_spans :: The gray span drawing callback. */
/* */
/* black_spans :: The black span drawing callback. UNIMPLEMENTED! */
/* black_spans :: Unused. */
/* */
/* bit_test :: The bit test callback. UNIMPLEMENTED! */
/* bit_test :: Unused. */
/* */
/* bit_set :: The bit set callback. UNIMPLEMENTED! */
/* bit_set :: Unused. */
/* */
/* user :: User-supplied data that is passed to each drawing */
/* callback. */
@@ -1100,15 +1000,9 @@ FT_BEGIN_HEADER
/* */
/* 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 */
/* monochrome bitmap. This allows direct composition over a */
/* pre-existing bitmap through user-provided callbacks to perform the */
/* span drawing/composition. */
/* */
/* Note that the `bit_test' and `bit_set' callbacks are required when */
/* rendering a monochrome bitmap, as they are crucial to implement */
/* correct drop-out control as defined in the TrueType specification. */
/* spans. This allows direct composition over a pre-existing bitmap */
/* through user-provided callbacks to perform the span drawing and */
/* composition. Not supported by the monochrome rasterizer. */
/* */
typedef struct FT_Raster_Params_
{
@@ -1116,9 +1010,9 @@ FT_BEGIN_HEADER
const void* source;
int flags;
FT_SpanFunc gray_spans;
FT_SpanFunc black_spans; /* doesn't work! */
FT_Raster_BitTest_Func bit_test; /* doesn't work! */
FT_Raster_BitSet_Func bit_set; /* doesn't work! */
FT_SpanFunc black_spans; /* unused */
FT_Raster_BitTest_Func bit_test; /* unused */
FT_Raster_BitSet_Func bit_set; /* unused */
void* user;
FT_BBox clip_box;
@@ -1179,10 +1073,10 @@ FT_BEGIN_HEADER
/* FT_Raster_ResetFunc */
/* */
/* <Description> */
/* FreeType provides an area of memory called the `render pool', */
/* available to all registered rasters. This pool can be freely used */
/* during a given scan-conversion but is shared by all rasters. Its */
/* content is thus transient. */
/* FreeType used to provide an area of memory called the `render */
/* pool' available to all registered rasters. This was not thread */
/* safe however and now FreeType never allocates this pool. NULL */
/* is always passed in as pool_base. */
/* */
/* This function is called each time the render pool changes, or just */
/* after a new raster object is created. */
@@ -1195,10 +1089,9 @@ FT_BEGIN_HEADER
/* pool_size :: The size in bytes of the render pool. */
/* */
/* <Note> */
/* Rasters can ignore the render pool and rely on dynamic memory */
/* Rasters should ignore the render pool and rely on dynamic or stack */
/* allocation if they want to (a handle to the memory allocator is */
/* passed to the raster constructor). However, this is not */
/* recommended for efficiency purposes. */
/* passed to the raster constructor). */
/* */
typedef void
(*FT_Raster_ResetFunc)( FT_Raster raster,
@@ -1305,7 +1198,6 @@ FT_BEGIN_HEADER
} FT_Raster_Funcs;
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType incremental loading (specification). */
/* */
/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,7 +45,7 @@ FT_BEGIN_HEADER
* @description:
* This section contains various functions used to perform so-called
* `incremental' glyph loading. This is a mode where all glyphs loaded
* from a given @FT_Face are provided by the client application,
* from a given @FT_Face are provided by the client application.
*
* Apart from that, all other tables are loaded normally from the font
* file. This mode is useful when FreeType is used within another
@@ -345,6 +345,7 @@ FT_BEGIN_HEADER
/* */
FT_END_HEADER
#endif /* __FTINCREM_H__ */

View File

@@ -5,7 +5,7 @@
/* FreeType API for color filtering of subpixel bitmap glyphs */
/* (specification). */
/* */
/* Copyright 2006-2008, 2010, 2013 by */
/* Copyright 2006-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -56,7 +56,7 @@ FT_BEGIN_HEADER
*
* FreeType generates alpha coverage maps, which are linear by nature.
* For instance, the value 0x80 in bitmap representation means that
* (within numerical precision) 0x80/0xff fraction of that pixel is
* (within numerical precision) 0x80/0xFF fraction of that pixel is
* covered by the glyph's outline. The blending function for placing
* text over a background is
*

View File

@@ -4,7 +4,7 @@
/* */
/* Generic list support for FreeType (specification). */
/* */
/* Copyright 1996-2001, 2003, 2007, 2010, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -248,7 +248,7 @@ FT_BEGIN_HEADER
/* list :: A handle to the list. */
/* */
/* destroy :: A list destructor that will be applied to each element */
/* of the list. */
/* of the list. Set this to NULL if not needed. */
/* */
/* memory :: The current memory object that handles deallocation. */
/* */
@@ -265,7 +265,6 @@ FT_BEGIN_HEADER
FT_Memory memory,
void* user );
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* LZW-compressed stream support. */
/* */
/* Copyright 2004, 2006 by */
/* Copyright 2004-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -88,7 +88,7 @@ FT_BEGIN_HEADER
FT_Stream_OpenLZW( FT_Stream stream,
FT_Stream source );
/* */
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* Additional Mac-specific API. */
/* */
/* Copyright 1996-2001, 2004, 2006, 2007, 2013 by */
/* Copyright 1996-2015 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType Multiple Master font interface (specification). */
/* */
/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -95,8 +95,8 @@ FT_BEGIN_HEADER
/* */
/* num_designs :: Number of designs; should be normally 2^num_axis */
/* even though the Type~1 specification strangely */
/* allows for intermediate designs to be present. This */
/* number cannot exceed~16. */
/* allows for intermediate designs to be present. */
/* This number cannot exceed~16. */
/* */
/* axis :: A table of axis descriptors. */
/* */
@@ -201,10 +201,10 @@ FT_BEGIN_HEADER
/* associated with them. The font can tell the */
/* user that, for example, Weight=1.5 is `Bold'. */
/* */
/* axis :: A table of axis descriptors. */
/* axis :: An axis descriptor table. */
/* GX fonts contain slightly more data than MM. */
/* */
/* namedstyles :: A table of named styles. */
/* namedstyle :: A named style table. */
/* Only meaningful with GX. */
/* */
typedef struct FT_MM_Var_
@@ -218,9 +218,6 @@ FT_BEGIN_HEADER
} FT_MM_Var;
/* */
/*************************************************************************/
/* */
/* <Function> */
@@ -283,8 +280,10 @@ FT_BEGIN_HEADER
/* face :: A handle to the source face. */
/* */
/* <Input> */
/* num_coords :: The number of design coordinates (must be equal to */
/* the number of axes in the font). */
/* num_coords :: The number of available design coordinates. If it */
/* is larger than the number of axes, ignore the excess */
/* values. If it is smaller than the number of axes, */
/* use default values for the remaining axes. */
/* */
/* coords :: An array of design coordinates. */
/* */
@@ -310,8 +309,10 @@ FT_BEGIN_HEADER
/* face :: A handle to the source face. */
/* */
/* <Input> */
/* num_coords :: The number of design coordinates (must be equal to */
/* the number of axes in the font). */
/* num_coords :: The number of available design coordinates. If it */
/* is larger than the number of axes, ignore the excess */
/* values. If it is smaller than the number of axes, */
/* use default values for the remaining axes. */
/* */
/* coords :: An array of design coordinates. */
/* */
@@ -337,8 +338,10 @@ FT_BEGIN_HEADER
/* face :: A handle to the source face. */
/* */
/* <Input> */
/* num_coords :: The number of design coordinates (must be equal to */
/* the number of axes in the font). */
/* num_coords :: The number of available design coordinates. If it */
/* is larger than the number of axes, ignore the excess */
/* values. If it is smaller than the number of axes, */
/* use default values for the remaining axes. */
/* */
/* coords :: The design coordinates array (each element must be */
/* between 0 and 1.0). */
@@ -365,7 +368,6 @@ FT_BEGIN_HEADER
FT_UInt num_coords,
FT_Fixed* coords );
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType modules public interface (specification). */
/* */
/* Copyright 1996-2003, 2006, 2008-2010, 2012, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -75,6 +75,33 @@ FT_BEGIN_HEADER
/* */
/* Note that the FreeType Cache sub-system is not a FreeType module. */
/* */
/* <Order> */
/* FT_Module */
/* FT_Module_Constructor */
/* FT_Module_Destructor */
/* FT_Module_Requester */
/* FT_Module_Class */
/* */
/* FT_Add_Module */
/* FT_Get_Module */
/* FT_Remove_Module */
/* FT_Add_Default_Modules */
/* */
/* FT_Property_Set */
/* FT_Property_Get */
/* */
/* FT_New_Library */
/* FT_Done_Library */
/* FT_Reference_Library */
/* */
/* FT_Renderer */
/* FT_Renderer_Class */
/* */
/* FT_Get_Renderer */
/* FT_Set_Renderer */
/* */
/* FT_Set_Debug_Hook */
/* */
/*************************************************************************/
@@ -442,7 +469,9 @@ FT_BEGIN_HEADER
/* <Description> */
/* This function is used to create a new FreeType library instance */
/* from a given memory object. It is thus possible to use libraries */
/* with distinct memory allocators within the same program. */
/* with distinct memory allocators within the same program. Note, */
/* however, that the used @FT_Memory structure is expected to remain */
/* valid for the life of the @FT_Library object. */
/* */
/* Normally, you would call this function (followed by a call to */
/* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */
@@ -491,7 +520,7 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_Error )
FT_Done_Library( FT_Library library );
/* */
/* */
typedef void
(*FT_DebugHook_Func)( void* arg );
@@ -629,7 +658,6 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_TrueTypeEngineType )
FT_Get_TrueType_Engine_Type( FT_Library library );
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType module error offsets (specification). */
/* */
/* Copyright 2001-2005, 2010, 2013 by */
/* Copyright 2001-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating OpenType tables (specification). */
/* */
/* Copyright 2004-2007, 2013 by */
/* Copyright 2004-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -58,6 +58,12 @@ FT_BEGIN_HEADER
/* This section contains the declaration of functions to validate */
/* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */
/* */
/* <Order> */
/* FT_OpenType_Validate */
/* FT_OpenType_Free */
/* */
/* FT_VALIDATE_OTXXX */
/* */
/*************************************************************************/
@@ -107,8 +113,6 @@ FT_BEGIN_HEADER
FT_VALIDATE_JSTF | \
FT_VALIDATE_MATH
/* */
/**********************************************************************
*
* @function:
@@ -165,8 +169,6 @@ FT_BEGIN_HEADER
FT_Bytes *GSUB_table,
FT_Bytes *JSTF_table );
/* */
/**********************************************************************
*
* @function:
@@ -191,8 +193,7 @@ FT_BEGIN_HEADER
FT_OpenType_Free( FT_Face face,
FT_Bytes table );
/* */
/* */
FT_END_HEADER

View File

@@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
/* Copyright 1996-2003, 2005-2014 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -52,7 +52,6 @@ FT_BEGIN_HEADER
/* */
/* <Order> */
/* FT_Outline */
/* FT_OUTLINE_FLAGS */
/* FT_Outline_New */
/* FT_Outline_Done */
/* FT_Outline_Copy */
@@ -68,13 +67,17 @@ FT_BEGIN_HEADER
/* */
/* FT_Outline_Get_Bitmap */
/* FT_Outline_Render */
/* */
/* FT_Outline_Decompose */
/* FT_Outline_Funcs */
/* FT_Outline_MoveTo_Func */
/* FT_Outline_LineTo_Func */
/* FT_Outline_ConicTo_Func */
/* FT_Outline_CubicTo_Func */
/* FT_Outline_MoveToFunc */
/* FT_Outline_LineToFunc */
/* FT_Outline_ConicToFunc */
/* FT_Outline_CubicToFunc */
/* */
/* FT_Orientation */
/* FT_Outline_Get_Orientation */
/* */
/* FT_OUTLINE_XXX */
/* */
/*************************************************************************/
@@ -535,7 +538,7 @@ FT_BEGIN_HEADER
*
* @description:
* This function analyzes a glyph outline and tries to compute its
* fill orientation (see @FT_Orientation). This is done by integrating
* fill orientation (see @FT_Orientation). This is done by integrating
* the total area covered by the outline. The positive integral
* corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT
* is returned. The negative integral corresponds to the counter-clockwise
@@ -555,7 +558,6 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_Orientation )
FT_Outline_Get_Orientation( FT_Outline* outline );
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing PFR-specific data (specification only). */
/* */
/* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -161,7 +161,7 @@ FT_BEGIN_HEADER
FT_UInt gindex,
FT_Pos *aadvance );
/* */
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType renderer modules public interface (specification). */
/* */
/* Copyright 1996-2001, 2005, 2006, 2010 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -212,13 +212,8 @@ 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. */
/* Currently, no FreeType renderer module uses `parameters'; you */
/* should thus always pass NULL as the value. */
/* */
FT_EXPORT( FT_Error )
FT_Set_Renderer( FT_Library library,
@@ -226,7 +221,6 @@ FT_BEGIN_HEADER
FT_UInt num_params,
FT_Parameter* parameters );
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType size objects management (specification). */
/* */
/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -7,7 +7,7 @@
/* */
/* This is _not_ used to retrieve glyph names! */
/* */
/* Copyright 1996-2003, 2006, 2009, 2010, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType path stroker (specification). */
/* */
/* Copyright 2002-2006, 2008, 2009, 2011-2012 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -46,6 +46,38 @@ FT_BEGIN_HEADER
* This can be useful to generate `bordered' glyph, i.e., glyphs
* displayed with a coloured (and anti-aliased) border around their
* shape.
*
* @order:
* FT_Stroker
*
* FT_Stroker_LineJoin
* FT_Stroker_LineCap
* FT_StrokerBorder
*
* FT_Outline_GetInsideBorder
* FT_Outline_GetOutsideBorder
*
* FT_Glyph_Stroke
* FT_Glyph_StrokeBorder
*
* FT_Stroker_New
* FT_Stroker_Set
* FT_Stroker_Rewind
* FT_Stroker_ParseOutline
* FT_Stroker_Done
*
* FT_Stroker_BeginSubPath
* FT_Stroker_EndSubPath
*
* FT_Stroker_LineTo
* FT_Stroker_ConicTo
* FT_Stroker_CubicTo
*
* FT_Stroker_GetBorderCounts
* FT_Stroker_ExportBorder
* FT_Stroker_GetCounts
* FT_Stroker_Export
*
*/
@@ -55,7 +87,7 @@ FT_BEGIN_HEADER
* FT_Stroker
*
* @description:
* Opaque handler to a path stroker object.
* Opaque handle to a path stroker object.
*/
typedef struct FT_StrokerRec_* FT_Stroker;
@@ -276,6 +308,8 @@ FT_BEGIN_HEADER
* @note:
* The radius is expressed in the same units as the outline
* coordinates.
*
* This function calls @FT_Stroker_Rewind automatically.
*/
FT_EXPORT( void )
FT_Stroker_Set( FT_Stroker stroker,
@@ -570,10 +604,10 @@ FT_BEGIN_HEADER
* receive all new data.
*
* When an outline, or a sub-path, is `closed', the stroker generates
* two independent `border' outlines, named `left' and `right'
* two independent `border' outlines, named `left' and `right'.
*
* When the outline, or a sub-path, is `opened', the stroker merges
* the `border' outlines with caps. The `left' border receives all
* the `border' outlines with caps. The `left' border receives all
* points, while the `right' border becomes empty.
*
* Use the function @FT_Stroker_Export instead if you want to
@@ -736,7 +770,7 @@ FT_BEGIN_HEADER
FT_Bool inside,
FT_Bool destroy );
/* */
/* */
FT_END_HEADER

View File

@@ -5,7 +5,7 @@
/* FreeType synthesizing code for emboldening and slanting */
/* (specification). */
/* */
/* Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 by */
/* Copyright 2000-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -62,8 +62,10 @@ FT_BEGIN_HEADER
/* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
/* */
/* For emboldened outlines the height, width, and advance metrics are */
/* increased by the strength of the emboldening. You can also call */
/* @FT_Outline_Get_CBox to get precise values. */
/* increased by the strength of the emboldening -- this even affects */
/* mono-width fonts! */
/* */
/* You can also call @FT_Outline_Get_CBox to get precise values. */
FT_EXPORT( void )
FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
@@ -73,6 +75,7 @@ FT_BEGIN_HEADER
/* */
FT_END_HEADER
#endif /* __FTSYNTH_H__ */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType low-level system interface definition (specification). */
/* */
/* Copyright 1996-2001, 2002, 2005, 2010 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -192,6 +192,10 @@ FT_BEGIN_HEADER
* @description:
* A handle to an input stream.
*
* @also:
* See @FT_StreamRec for the publicly accessible fields of a given
* stream object.
*
*/
typedef struct FT_StreamRec_* FT_Stream;
@@ -285,6 +289,11 @@ FT_BEGIN_HEADER
* size ::
* The stream size in bytes.
*
* In case of compressed streams where the size is unknown before
* actually doing the decompression, the value is set to 0x7FFFFFFF.
* (Note that this size value can occur for normal streams also; it is
* thus just a hint.)
*
* pos ::
* The current position within the stream.
*
@@ -335,7 +344,6 @@ FT_BEGIN_HEADER
} FT_StreamRec;
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType trigonometric functions (specification). */
/* */
/* Copyright 2001, 2003, 2005, 2007, 2013 by */
/* Copyright 2001-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -237,7 +237,7 @@ FT_BEGIN_HEADER
*
* @input:
* angle ::
* The address of angle.
* The input angle.
*
*/
FT_EXPORT( void )
@@ -259,7 +259,7 @@ FT_BEGIN_HEADER
*
* @input:
* angle ::
* The address of angle.
* The input angle.
*
*/
FT_EXPORT( void )

View File

@@ -5,7 +5,7 @@
/* FreeType API for controlling the TrueType driver */
/* (specification only). */
/* */
/* Copyright 2013 by */
/* Copyright 2013-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -67,13 +67,13 @@ FT_BEGIN_HEADER
* TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel
* support otherwise (since it isn't available then).
*
* If subpixel hinting is on, many TrueType bytecode instructions
* behave differently compared to B/W or grayscale rendering. The
* main idea is to render at a much increased horizontal resolution,
* then sampling down the created output to subpixel precision.
* However, many older fonts are not suited to this and must be
* specially taken care of by applying (hardcoded) font-specific
* tweaks.
* If subpixel hinting is on, many TrueType bytecode instructions behave
* differently compared to B/W or grayscale rendering (except if `native
* ClearType' is selected by the font). The main idea is to render at a
* much increased horizontal resolution, then sampling down the created
* output to subpixel precision. However, many older fonts are not
* suited to this and must be specially taken care of by applying
* (hardcoded) font-specific tweaks.
*
* Details on subpixel hinting and some of the necessary tweaks can be
* found in Greg Hitchcock's whitepaper at
@@ -135,32 +135,95 @@ FT_BEGIN_HEADER
* `FT_Err_Unimplemented_Feature' error.
*
* Depending on the graphics framework, Microsoft uses different
* bytecode engines. As a consequence, the version numbers returned by
* a call to the `GETINFO[1]' bytecode instruction are more convoluted
* than desired.
* bytecode and rendering engines. As a consequence, the version
* numbers returned by a call to the `GETINFO' bytecode instruction are
* more convoluted than desired.
*
* Here are two tables that try to shed some light on the possible
* values for the MS rasterizer engine, together with the additional
* features introduced by it.
*
* {
* framework Windows version result of GETINFO[1]
* ----------------------------------------------------
* GDI before XP 35
* GDI XP and later 37
* GDI+ old before Vista 37
* GDI+ old Vista, 7 38
* GDI+ after 7 40
* DWrite before 8 39
* DWrite 8 and later 40
* GETINFO framework version feature
* -------------------------------------------------------------------
* 3 GDI (Win 3.1), v1.0 16-bit, first version
* TrueImage
* 33 GDI (Win NT 3.1), v1.5 32-bit
* HP Laserjet
* 34 GDI (Win 95) v1.6 font smoothing,
* new SCANTYPE opcode
* 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET
* bits in composite glyphs
* 36 MGDI (Win CE 2) v1.6+ classic ClearType
* 37 GDI (XP and later), v1.8 ClearType
* GDI+ old (before Vista)
* 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType,
* WPF Y-direction ClearType,
* additional error checking
* 39 DWrite (before Win 8) v2.0 subpixel ClearType flags
* in GETINFO opcode,
* bug fixes
* 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag
* DWrite (Win 8) in GETINFO opcode,
* Gray ClearType
* }
*
* Since FreeType doesn't provide all capabilities of DWrite ClearType,
* using version~38 seems justified.
* The `version' field gives a rough orientation only, since some
* applications provided certain features much earlier (as an example,
* Microsoft Reader used subpixel and Y-direction ClearType already in
* Windows 2000). Similarly, updates to a given framework might include
* improved hinting support.
*
* {
* version sampling rendering comment
* x y x y
* --------------------------------------------------------------
* v1.0 normal normal B/W B/W bi-level
* v1.6 high high gray gray grayscale
* v1.8 high normal color-filter B/W (GDI) ClearType
* v1.9 high high color-filter gray Color ClearType
* v2.1 high normal gray B/W Gray ClearType
* v2.1 high high gray gray Gray ClearType
* }
*
* Color and Gray ClearType are the two available variants of
* `Y-direction ClearType', meaning grayscale rasterization along the
* Y-direction; the name used in the TrueType specification for this
* feature is `symmetric smoothing'. `Classic ClearType' is the
* original algorithm used before introducing a modified version in
* Win~XP. Another name for v1.6's grayscale rendering is `font
* smoothing', and `Color ClearType' is sometimes also called `DWrite
* ClearType'. To differentiate between today's Color ClearType and the
* earlier ClearType variant with B/W rendering along the vertical axis,
* the latter is sometimes called `GDI ClearType'.
*
* `Normal' and `high' sampling describe the (virtual) resolution to
* access the rasterized outline after the hinting process. `Normal'
* means 1 sample per grid line (i.e., B/W). In the current Microsoft
* implementation, `high' means an extra virtual resolution of 16x16 (or
* 16x1) grid lines per pixel for bytecode instructions like `MIRP'.
* After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid
* lines for color filtering if Color ClearType is activated.
*
* Note that `Gray ClearType' is essentially the same as v1.6's
* grayscale rendering. However, the GETINFO instruction handles it
* differently: v1.6 returns bit~12 (hinting for grayscale), while v2.1
* returns bits~13 (hinting for ClearType), 18 (symmetrical smoothing),
* and~19 (Gray ClearType). Also, this mode respects bits 2 and~3 for
* the version~1 gasp table exclusively (like Color ClearType), while
* v1.6 only respects the values of version~0 (bits 0 and~1).
*
* FreeType doesn't provide all capabilities of the most recent
* ClearType incarnation, thus we identify our subpixel support as
* version~38.
*
*/
#define TT_INTERPRETER_VERSION_35 35
#define TT_INTERPRETER_VERSION_38 38
/* */
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType simple types definitions (specification only). */
/* */
/* Copyright 1996-2002, 2004, 2006-2009, 2012, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -57,6 +57,8 @@ FT_BEGIN_HEADER
/* FT_UInt16 */
/* FT_Int32 */
/* FT_UInt32 */
/* FT_Int64 */
/* FT_UInt64 */
/* FT_Short */
/* FT_UShort */
/* FT_Long */
@@ -78,7 +80,9 @@ FT_BEGIN_HEADER
/* FT_F2Dot14 */
/* FT_UnitVector */
/* FT_F26Dot6 */
/* FT_Data */
/* */
/* FT_MAKE_TAG */
/* */
/* FT_Generic */
/* FT_Generic_Finalizer */
@@ -567,9 +571,9 @@ FT_BEGIN_HEADER
} FT_ListRec;
/* */
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
#define FT_BOOL( x ) ( (FT_Bool)( x ) )

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing Windows fnt-specific data. */
/* */
/* Copyright 2003, 2004, 2008 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -59,7 +59,7 @@ FT_BEGIN_HEADER
* A list of valid values for the `charset' byte in
* @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
* encodings (except for cp1361) can be found at
* ftp://ftp.unicode.org/public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
* ftp://ftp.unicode.org/Public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
* subdirectory. cp1361 is roughly a superset of
* MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
*
@@ -95,7 +95,7 @@ FT_BEGIN_HEADER
* second default codepage that most international versions of
* Windows have. It is one of the OEM codepages from
*
* http://www.microsoft.com/globaldev/reference/cphome.mspx,
* https://msdn.microsoft.com/en-us/goglobal/bb964655,
*
* and is used for the `DOS boxes', to support legacy applications.
* A German Windows version for example usually uses ANSI codepage
@@ -259,9 +259,9 @@ FT_BEGIN_HEADER
FT_Get_WinFNT_Header( FT_Face face,
FT_WinFNT_HeaderRec *aheader );
/* */
FT_END_HEADER
#endif /* __FTWINFNT_H__ */

View File

@@ -4,7 +4,7 @@
/* */
/* High-level `autohint' module-specific interface (specification). */
/* */
/* Copyright 1996-2002, 2007, 2009, 2012 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (specification). */
/* */
/* Copyright 1996-2006, 2008, 2009, 2012-2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,37 +27,224 @@
FT_BEGIN_HEADER
#if 0
/*************************************************************************/
/* */
/* <Function> */
/* FT_SqrtFixed */
/* */
/* <Description> */
/* Computes the square root of a 16.16 fixed-point value. */
/* */
/* <Input> */
/* x :: The value to compute the root for. */
/* */
/* <Return> */
/* The result of `sqrt(x)'. */
/* */
/* <Note> */
/* This function is not very fast. */
/* */
FT_BASE( FT_Int32 )
FT_SqrtFixed( FT_Int32 x );
#endif /* 0 */
/*************************************************************************/
/* */
/* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */
/* */
/*************************************************************************/
#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
/* Provide assembler fragments for performance-critical functions. */
/* These must be defined `static __inline__' with GCC. */
#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
static __inline FT_Int32
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 t, t2;
__asm
{
smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
mov a, t, asr #31 /* a = (hi >> 31) */
add a, a, #0x8000 /* a += 0x8000 */
adds t2, t2, a /* t2 += a */
adc t, t, #0 /* t += carry */
mov a, t2, lsr #16 /* a = t2 >> 16 */
orr a, a, t, lsl #16 /* a |= t << 16 */
}
return a;
}
#endif /* __CC_ARM || __ARMCC__ */
#ifdef __GNUC__
#if defined( __arm__ ) && \
( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \
!( defined( __CC_ARM ) || defined( __ARMCC__ ) )
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
static __inline__ FT_Int32
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
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) */
#if defined( __clang__ ) && defined( __thumb2__ )
"add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
#else
"add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
#endif
"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)
: "cc" );
return a;
}
#endif /* __arm__ && */
/* ( __thumb2__ || !__thumb__ ) && */
/* !( __CC_ARM || __ARMCC__ ) */
#if defined( __i386__ )
#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__ __volatile__ (
"imul %%edx\n"
"movl %%edx, %%ecx\n"
"sarl $31, %%ecx\n"
"addl $0x8000, %%ecx\n"
"addl %%ecx, %%eax\n"
"adcl $0, %%edx\n"
"shrl $16, %%eax\n"
"shll $16, %%edx\n"
"addl %%edx, %%eax\n"
: "=a"(result), "=d"(b)
: "a"(a), "d"(b)
: "%ecx", "cc" );
return result;
}
#endif /* i386 */
#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 */
#if defined( __GNUC__ ) && defined( __x86_64__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64
static __inline__ FT_Int32
FT_MulFix_x86_64( FT_Int32 a,
FT_Int32 b )
{
/* Temporarily disable the warning that C90 doesn't support */
/* `long long'. */
#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wlong-long"
#endif
#if 1
/* Technically not an assembly fragment, but GCC does a really good */
/* job at inlining it and generating good machine code for it. */
long long ret, tmp;
ret = (long long)a * b;
tmp = ret >> 63;
ret += 0x8000 + tmp;
return (FT_Int32)( ret >> 16 );
#else
/* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */
/* code from the lines below. The main issue is that `wide_a' is not */
/* properly initialized by sign-extending `a'. Instead, the generated */
/* machine code assumes that the register that contains `a' on input */
/* can be used directly as a 64-bit value, which is wrong most of the */
/* time. */
long long wide_a = (long long)a;
long long wide_b = (long long)b;
long long result;
__asm__ __volatile__ (
"imul %2, %1\n"
"mov %1, %0\n"
"sar $63, %0\n"
"lea 0x8000(%1, %0), %0\n"
"sar $16, %0\n"
: "=&r"(result), "=&r"(wide_a)
: "r"(wide_b)
: "cc" );
return (FT_Int32)result;
#endif
#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
#pragma GCC diagnostic pop
#endif
}
#endif /* __GNUC__ && __x86_64__ */
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
#ifdef FT_MULFIX_ASSEMBLER
#define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) )
#endif
#endif
/*************************************************************************/
/* */
@@ -124,10 +311,11 @@ FT_BEGIN_HEADER
FT_Pos out_x,
FT_Pos out_y );
/*
* Return TRUE if a corner is flat or nearly flat. This is equivalent to
* saying that the angle difference between the `in' and `out' vectors is
* very small.
* saying that the corner point is close to its neighbors, or inside an
* ellipse defined by the neighbor focal points to be more precise.
*/
FT_BASE( FT_Int )
ft_corner_is_flat( FT_Pos in_x,
@@ -139,9 +327,31 @@ FT_BEGIN_HEADER
/*
* Return the most significant bit index.
*/
#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
#if defined( __GNUC__ ) && \
( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) )
#if FT_SIZEOF_INT == 4
#define FT_MSB( x ) ( 31 - __builtin_clz( x ) )
#elif FT_SIZEOF_LONG == 4
#define FT_MSB( x ) ( 31 - __builtin_clzl( x ) )
#endif
#endif /* __GNUC__ */
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
#ifndef FT_MSB
FT_BASE( FT_Int )
FT_MSB( FT_UInt32 z );
#endif
/*
* Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses
@@ -152,6 +362,31 @@ FT_BEGIN_HEADER
FT_Fixed y );
#if 0
/*************************************************************************/
/* */
/* <Function> */
/* FT_SqrtFixed */
/* */
/* <Description> */
/* Computes the square root of a 16.16 fixed-point value. */
/* */
/* <Input> */
/* x :: The value to compute the root for. */
/* */
/* <Return> */
/* The result of `sqrt(x)'. */
/* */
/* <Note> */
/* This function is not very fast. */
/* */
FT_BASE( FT_Int32 )
FT_SqrtFixed( FT_Int32 x );
#endif /* 0 */
#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 )
#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 )
#define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 )

View File

@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component (specification). */
/* */
/* Copyright 1996-2002, 2004, 2006-2009, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -140,7 +140,7 @@ FT_BEGIN_HEADER
/* This function may be useful if you want to control FreeType 2's */
/* debug level in your application. */
/* */
FT_BASE( const char * )
FT_BASE( const char* )
FT_Trace_Get_Name( FT_Int idx );

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType font driver interface (specification). */
/* */
/* Copyright 1996-2003, 2006, 2008, 2011-2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph loader (specification). */
/* */
/* Copyright 2002, 2003, 2005, 2006 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -121,21 +121,25 @@ FT_BEGIN_HEADER
FT_UInt n_contours );
#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
( (_count) == 0 || ((_loader)->base.outline.n_points + \
(_loader)->current.outline.n_points + \
(unsigned long)(_count)) <= (_loader)->max_points )
#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
( (_count) == 0 || \
( (FT_UInt)(_loader)->base.outline.n_points + \
(FT_UInt)(_loader)->current.outline.n_points + \
(FT_UInt)(_count) ) <= (_loader)->max_points )
#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
( (_count) == 0 || ((_loader)->base.outline.n_contours + \
(_loader)->current.outline.n_contours + \
(unsigned long)(_count)) <= (_loader)->max_contours )
#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
( (_count) == 0 || \
( (FT_UInt)(_loader)->base.outline.n_contours + \
(FT_UInt)(_loader)->current.outline.n_contours + \
(FT_UInt)(_count) ) <= (_loader)->max_contours )
#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours ) \
( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
? 0 \
: FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) )
#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \
( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
? 0 \
: FT_GlyphLoader_CheckPoints( (_loader), \
(FT_UInt)(_points), \
(FT_UInt)(_contours) ) )
/* check that there is enough space to add `n_subs' sub-glyphs to */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
/* Copyright 1996-2002, 2004-2007, 2010, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -215,11 +215,14 @@ FT_BEGIN_HEADER
#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 )
#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count )
#define FT_MEM_SET( dest, byte, count ) \
ft_memset( dest, byte, (FT_Offset)(count) )
#define FT_MEM_COPY( dest, source, count ) ft_memcpy( dest, source, count )
#define FT_MEM_COPY( dest, source, count ) \
ft_memcpy( dest, source, (FT_Offset)(count) )
#define FT_MEM_MOVE( dest, source, count ) ft_memmove( dest, source, count )
#define FT_MEM_MOVE( dest, source, count ) \
ft_memmove( dest, source, (FT_Offset)(count) )
#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0, count )
@@ -227,14 +230,19 @@ FT_BEGIN_HEADER
#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) )
#define FT_ARRAY_ZERO( dest, count ) \
FT_MEM_ZERO( dest, (count) * sizeof ( *(dest) ) )
#define FT_ARRAY_ZERO( dest, count ) \
FT_MEM_ZERO( dest, \
(FT_Offset)(count) * sizeof ( *(dest) ) )
#define FT_ARRAY_COPY( dest, source, count ) \
FT_MEM_COPY( dest, source, (count) * sizeof ( *(dest) ) )
#define FT_ARRAY_COPY( dest, source, count ) \
FT_MEM_COPY( dest, \
source, \
(FT_Offset)(count) * sizeof ( *(dest) ) )
#define FT_ARRAY_MOVE( dest, source, count ) \
FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) )
#define FT_ARRAY_MOVE( dest, source, count ) \
FT_MEM_MOVE( dest, \
source, \
(FT_Offset)(count) * sizeof ( *(dest) ) )
/*

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (specification). */
/* */
/* Copyright 1996-2006, 2008, 2010, 2012-2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -72,12 +72,23 @@ FT_BEGIN_HEADER
#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) )
/*
* Approximate sqrt(x*x+y*y) using the `alpha max plus beta min'
* algorithm. We use alpha = 1, beta = 3/8, giving us results with a
* largest error less than 7% compared to the exact value.
*/
#define FT_HYPOT( x, y ) \
( x = FT_ABS( x ), \
y = FT_ABS( y ), \
x > y ? x + ( 3 * y >> 3 ) \
: y + ( 3 * x >> 3 ) )
#define FT_PAD_FLOOR( x, n ) ( (x) & ~((n)-1) )
/* we use the TYPEOF macro to suppress signedness compilation warnings */
#define FT_PAD_FLOOR( x, n ) ( (x) & ~TYPEOF( x )( (n)-1 ) )
#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n )
#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n )
#define FT_PIX_FLOOR( x ) ( (x) & ~63 )
#define FT_PIX_FLOOR( x ) ( (x) & ~TYPEOF( x )63 )
#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
@@ -394,7 +405,7 @@ FT_BEGIN_HEADER
/* glyph_hints :: Format-specific glyph hints management. */
/* */
#define FT_GLYPH_OWN_BITMAP 0x1
#define FT_GLYPH_OWN_BITMAP 0x1U
typedef struct FT_Slot_InternalRec_
{
@@ -603,12 +614,12 @@ FT_BEGIN_HEADER
#define FT_REQUEST_WIDTH( req ) \
( (req)->horiResolution \
? (FT_Pos)( (req)->width * (req)->horiResolution + 36 ) / 72 \
? ( (req)->width * (FT_Pos)(req)->horiResolution + 36 ) / 72 \
: (req)->width )
#define FT_REQUEST_HEIGHT( req ) \
( (req)->vertResolution \
? (FT_Pos)( (req)->height * (req)->vertResolution + 36 ) / 72 \
? ( (req)->height * (FT_Pos)(req)->vertResolution + 36 ) / 72 \
: (req)->height )
@@ -730,9 +741,8 @@ FT_BEGIN_HEADER
/* faces_list :: The list of faces currently opened by this */
/* driver. */
/* */
/* glyph_loader :: The glyph loader for all faces managed by this */
/* driver. This object isn't defined for unscalable */
/* formats. */
/* glyph_loader :: Unused. Used to be glyph loader for all faces */
/* managed by this driver. */
/* */
typedef struct FT_DriverRec_
{

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services (declaration). */
/* */
/* Copyright 2009, 2012 by */
/* Copyright 2009-2015 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (specification). */
/* */
/* Copyright 2004, 2006, 2007, 2012, 2013 by */
/* Copyright 2004-2015 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -44,7 +44,7 @@ FT_BEGIN_HEADER
typedef struct FT_RFork_Ref_
{
FT_UShort res_id;
FT_ULong offset;
FT_Long offset;
} FT_RFork_Ref;
@@ -83,7 +83,7 @@ FT_BEGIN_HEADER
/* this array is a storage in non-PIC mode, so ; is needed in END */
#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
const type name[] = {
static const type name[] = {
#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
{ raccess_guess_ ## func_suffix, \
FT_RFork_Rule_ ## type_suffix },

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType services (specification only). */
/* */
/* Copyright 2003-2007, 2009, 2012, 2013 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -750,7 +750,7 @@ FT_BEGIN_HEADER
#define FT_SERVICE_TRUETYPE_ENGINE_H <internal/services/svtteng.h>
#define FT_SERVICE_TT_CMAP_H <internal/services/svttcmap.h>
#define FT_SERVICE_WINFNT_H <internal/services/svwinfnt.h>
#define FT_SERVICE_XFREE86_NAME_H <internal/services/svxf86nm.h>
#define FT_SERVICE_FONT_FORMAT_H <internal/services/svfntfmt.h>
#define FT_SERVICE_TRUETYPE_GLYF_H <internal/services/svttglyf.h>
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* Stream handling (specification). */
/* */
/* Copyright 1996-2002, 2004-2006, 2011, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -361,7 +361,7 @@ FT_BEGIN_HEADER
FT_Long distance );
/* return current stream position */
FT_BASE( FT_Long )
FT_BASE( FT_ULong )
FT_Stream_Pos( FT_Stream stream );
/* read bytes from a stream into a user-allocated buffer, returns an */

View File

@@ -4,7 +4,7 @@
/* */
/* Tracing handling (specification only). */
/* */
/* Copyright 2002, 2004-2007, 2009, 2011-2014 by */
/* Copyright 2002-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType validation support (specification). */
/* */
/* Copyright 2004, 2013 by */
/* Copyright 2004-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -87,13 +87,13 @@ FT_BEGIN_HEADER
/* validator structure */
typedef struct FT_ValidatorRec_
{
ft_jmp_buf jump_buffer; /* used for exception handling */
const FT_Byte* base; /* address of table in memory */
const FT_Byte* limit; /* `base' + sizeof(table) in memory */
FT_ValidationLevel level; /* validation level */
FT_Error error; /* error returned. 0 means success */
ft_jmp_buf jump_buffer; /* used for exception handling */
} FT_ValidatorRec;
#if defined( _MSC_VER )
@@ -126,31 +126,29 @@ FT_BEGIN_HEADER
/* Calls ft_validate_error. Assumes that the `valid' local variable */
/* holds a pointer to the current validator object. */
/* */
/* Use preprocessor prescan to pass FT_ERR_PREFIX. */
/* */
#define FT_INVALID( _prefix, _error ) FT_INVALID_( _prefix, _error )
#define FT_INVALID_( _prefix, _error ) \
ft_validator_error( valid, _prefix ## _error )
#define FT_INVALID( _error ) FT_INVALID_( _error )
#define FT_INVALID_( _error ) \
ft_validator_error( valid, FT_THROW( _error ) )
/* called when a broken table is detected */
#define FT_INVALID_TOO_SHORT \
FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
FT_INVALID( Invalid_Table )
/* called when an invalid offset is detected */
#define FT_INVALID_OFFSET \
FT_INVALID( FT_ERR_PREFIX, Invalid_Offset )
FT_INVALID( Invalid_Offset )
/* called when an invalid format/value is detected */
#define FT_INVALID_FORMAT \
FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
FT_INVALID( Invalid_Table )
/* called when an invalid glyph index is detected */
#define FT_INVALID_GLYPH_ID \
FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index )
FT_INVALID( Invalid_Glyph_Index )
/* called when an invalid field value is detected */
#define FT_INVALID_DATA \
FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
FT_INVALID( Invalid_Table )
FT_END_HEADER

View File

@@ -4,7 +4,7 @@
/* */
/* Internal header files (specification only). */
/* */
/* Copyright 1996-2004, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -5,7 +5,7 @@
/* Auxiliary functions and data structures related to PostScript fonts */
/* (specification). */
/* */
/* Copyright 1996-2004, 2006, 2008, 2009, 2012 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -71,10 +71,10 @@ FT_BEGIN_HEADER
(*done)( PS_Table table );
FT_Error
(*add)( PS_Table table,
FT_Int idx,
void* object,
FT_PtrDist length );
(*add)( PS_Table table,
FT_Int idx,
void* object,
FT_UInt length );
void
(*release)( PS_Table table );
@@ -122,12 +122,12 @@ FT_BEGIN_HEADER
FT_Byte* block; /* current memory block */
FT_Offset cursor; /* current cursor in memory block */
FT_Offset capacity; /* current size of memory block */
FT_Long init;
FT_ULong init;
FT_Int max_elems;
FT_Int num_elems;
FT_Byte** elements; /* addresses of table elements */
FT_PtrDist* lengths; /* lengths of table elements */
FT_UInt* lengths; /* lengths of table elements */
FT_Memory memory;
PS_Table_FuncsRec funcs;
@@ -365,7 +365,7 @@ FT_BEGIN_HEADER
(*to_bytes)( PS_Parser parser,
FT_Byte* bytes,
FT_Offset max_bytes,
FT_Long* pnum_bytes,
FT_ULong* pnum_bytes,
FT_Bool delimiters );
FT_Int
@@ -675,9 +675,9 @@ FT_BEGIN_HEADER
FT_Byte** glyph_names;
FT_Int lenIV; /* internal for sub routine calls */
FT_UInt num_subrs;
FT_Int num_subrs;
FT_Byte** subrs;
FT_PtrDist* subrs_len; /* array of subrs length (optional) */
FT_UInt* subrs_len; /* array of subrs length (optional) */
FT_Matrix font_matrix;
FT_Vector font_offset;

View File

@@ -6,7 +6,7 @@
/* recorders (specification only). These are used to support native */
/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */
/* */
/* Copyright 2001-2003, 2005-2007, 2009, 2012 by */
/* Copyright 2001-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,7 +45,7 @@ FT_BEGIN_HEADER
T1_Private* private_dict,
PSH_Globals* aglobals );
typedef FT_Error
typedef void
(*PSH_Globals_SetScaleFunc)( PSH_Globals globals,
FT_Fixed x_scale,
FT_Fixed y_scale,
@@ -465,7 +465,7 @@ FT_BEGIN_HEADER
typedef void
(*T2_Hints_StemsFunc)( T2_Hints hints,
FT_UInt dimension,
FT_UInt count,
FT_Int count,
FT_Fixed* coordinates );

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType BDF services (specification). */
/* */
/* Copyright 2003, 2009, 2012 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,8 @@
/* */
/* The FreeType CID font services (specification). */
/* */
/* Copyright 2007, 2009, 2012 by Derek Clegg, Michael Toftdal. */
/* Copyright 2007-2015 by */
/* Derek Clegg and Michael Toftdal. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */

View File

@@ -1,10 +1,10 @@
/***************************************************************************/
/* */
/* svxf86nm.h */
/* svfntfmt.h */
/* */
/* The FreeType XFree86 services (specification only). */
/* The FreeType font format service (specification only). */
/* */
/* Copyright 2003 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,8 @@
/***************************************************************************/
#ifndef __SVXF86NM_H__
#define __SVXF86NM_H__
#ifndef __SVFNTFMT_H__
#define __SVFNTFMT_H__
#include FT_INTERNAL_SERVICE_H
@@ -31,17 +31,17 @@ FT_BEGIN_HEADER
* is a simple constant string pointer.
*/
#define FT_SERVICE_ID_XF86_NAME "xf86-driver-name"
#define FT_SERVICE_ID_FONT_FORMAT "font-format"
#define FT_XF86_FORMAT_TRUETYPE "TrueType"
#define FT_XF86_FORMAT_TYPE_1 "Type 1"
#define FT_XF86_FORMAT_BDF "BDF"
#define FT_XF86_FORMAT_PCF "PCF"
#define FT_XF86_FORMAT_TYPE_42 "Type 42"
#define FT_XF86_FORMAT_CID "CID Type 1"
#define FT_XF86_FORMAT_CFF "CFF"
#define FT_XF86_FORMAT_PFR "PFR"
#define FT_XF86_FORMAT_WINFNT "Windows FNT"
#define FT_FONT_FORMAT_TRUETYPE "TrueType"
#define FT_FONT_FORMAT_TYPE_1 "Type 1"
#define FT_FONT_FORMAT_BDF "BDF"
#define FT_FONT_FORMAT_PCF "PCF"
#define FT_FONT_FORMAT_TYPE_42 "Type 42"
#define FT_FONT_FORMAT_CID "CID Type 1"
#define FT_FONT_FORMAT_CFF "CFF"
#define FT_FONT_FORMAT_PFR "PFR"
#define FT_FONT_FORMAT_WINFNT "Windows FNT"
/* */
@@ -49,7 +49,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
#endif /* __SVXF86NM_H__ */
#endif /* __SVFNTFMT_H__ */
/* END */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph dictionary services (specification). */
/* */
/* Copyright 2003, 2009, 2012 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating TrueTypeGX/AAT tables (specification). */
/* */
/* Copyright 2004, 2005 by */
/* Copyright 2004-2015 by */
/* Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType Kerning service (specification). */
/* */
/* Copyright 2006 by */
/* Copyright 2006-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType Multiple Masters and GX var services (specification). */
/* */
/* Copyright 2003, 2004, 2009, 2012 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType OpenType validation service (specification). */
/* */
/* Copyright 2004, 2006 by */
/* Copyright 2004-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* Internal PFR service functions (specification). */
/* */
/* Copyright 2003, 2006 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType PostScript name services (specification). */
/* */
/* Copyright 2003, 2007, 2009, 2012 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType property service (specification). */
/* */
/* Copyright 2012 by */
/* Copyright 2012-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType PostScript charmap service (specification). */
/* */
/* Copyright 2003, 2006, 2009, 2012 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType PostScript info service (specification). */
/* */
/* Copyright 2003, 2004, 2009, 2011, 2012 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType SFNT table loading service (specification). */
/* */
/* Copyright 2003, 2004, 2009, 2012 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,10 +4,8 @@
/* */
/* The FreeType TrueType/sfnt cmap extra information service. */
/* */
/* Copyright 2003 by */
/* Masatake YAMATO, Redhat K.K. */
/* */
/* Copyright 2003, 2008, 2009, 2012, 2013 by */
/* Copyright 2003-2015 by */
/* Masatake YAMATO, Redhat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType TrueType engine query service (specification). */
/* */
/* Copyright 2006 by */
/* Copyright 2006-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,8 @@
/* */
/* The FreeType TrueType glyph service. */
/* */
/* Copyright 2007, 2009, 2012 by David Turner. */
/* Copyright 2007-2015 by */
/* David Turner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */

View File

@@ -4,7 +4,7 @@
/* */
/* The FreeType Windows FNT/FONT service (specification). */
/* */
/* Copyright 2003 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* High-level `sfnt' driver interface (specification). */
/* */
/* Copyright 1996-2006, 2009, 2012-2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -405,14 +405,18 @@ FT_BEGIN_HEADER
/* <Input> */
/* face :: A handle to the target face object. */
/* */
/* stream :: The input stream. */
/* */
/* vertical :: A boolean flag. If set, load vertical metrics. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* gindex :: The glyph index. */
/* */
typedef FT_Error
/* <Output> */
/* abearing :: The horizontal (or vertical) bearing. Set to zero in */
/* case of error. */
/* */
/* aadvance :: The horizontal (or vertical) advance. Set to zero in */
/* case of error. */
/* */
typedef void
(*TT_Get_Metrics_Func)( TT_Face face,
FT_Bool vertical,
FT_UInt gindex,

View File

@@ -5,7 +5,7 @@
/* Basic Type1/Type2 type definitions and interface (specification */
/* only). */
/* */
/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -106,12 +106,12 @@ FT_BEGIN_HEADER
FT_Int num_subrs;
FT_Byte** subrs;
FT_PtrDist* subrs_len;
FT_UInt* subrs_len;
FT_Int num_glyphs;
FT_String** glyph_names; /* array of glyph names */
FT_Byte** charstrings; /* array of glyph charstrings */
FT_PtrDist* charstrings_len;
FT_UInt* charstrings_len;
FT_Byte paint_type;
FT_Byte font_type;
@@ -127,7 +127,7 @@ FT_BEGIN_HEADER
typedef struct CID_SubrsRec_
{
FT_UInt num_subrs;
FT_Int num_subrs;
FT_Byte** code;
} CID_SubrsRec, *CID_Subrs;
@@ -157,10 +157,10 @@ FT_BEGIN_HEADER
typedef struct AFM_KernPairRec_
{
FT_Int index1;
FT_Int index2;
FT_Int x;
FT_Int y;
FT_UInt index1;
FT_UInt index2;
FT_Int x;
FT_Int y;
} AFM_KernPairRec, *AFM_KernPair;
@@ -171,9 +171,9 @@ FT_BEGIN_HEADER
FT_Fixed Ascender;
FT_Fixed Descender;
AFM_TrackKern TrackKerns; /* free if non-NULL */
FT_Int NumTrackKern;
FT_UInt NumTrackKern;
AFM_KernPair KernPairs; /* free if non-NULL */
FT_Int NumKernPair;
FT_UInt NumKernPair;
} AFM_FontInfoRec, *AFM_FontInfo;

View File

@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType type definitions and interface (specification */
/* only). */
/* */
/* Copyright 1996-2002, 2004-2008, 2012-2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -614,8 +614,7 @@ FT_BEGIN_HEADER
/* in use by other platforms (e.g. Newton). */
/* For details, please see */
/* */
/* http://fonts.apple.com/ */
/* TTRefMan/RM06/Chap6bloc.html */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html */
/* */
/* hori :: The line metrics for horizontal layouts. */
/* */
@@ -635,8 +634,7 @@ FT_BEGIN_HEADER
/* flags :: Is this a vertical or horizontal strike? For */
/* details, please see */
/* */
/* http://fonts.apple.com/ */
/* TTRefMan/RM06/Chap6bloc.html */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html */
/* */
typedef struct TT_SBit_StrikeRec_
{
@@ -1113,7 +1111,7 @@ FT_BEGIN_HEADER
/* This field also contains the associated */
/* vertical metrics table (`vmtx'), if found. */
/* IMPORTANT: The contents of this field is */
/* undefined if the `verticalInfo' field is */
/* undefined if the `vertical_info' field is */
/* unset. */
/* */
/* num_names :: The number of name records within this */
@@ -1440,7 +1438,7 @@ FT_BEGIN_HEADER
{
FT_Memory memory;
FT_UShort max_points;
FT_UShort max_contours;
FT_Short max_contours;
FT_UShort n_points; /* number of points in zone */
FT_Short n_contours; /* number of contours */

View File

@@ -5,7 +5,7 @@
/* Basic Type 1/Type 2 tables definitions and interface (specification */
/* only). */
/* */
/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -49,6 +49,26 @@ FT_BEGIN_HEADER
/* This section contains the definition of Type 1-specific tables, */
/* including structures related to other PostScript font formats. */
/* */
/* <Order> */
/* PS_FontInfoRec */
/* PS_FontInfo */
/* PS_PrivateRec */
/* PS_Private */
/* */
/* CID_FaceDictRec */
/* CID_FaceDict */
/* CID_FaceInfoRec */
/* CID_FaceInfo */
/* */
/* FT_Has_PS_Glyph_Names */
/* FT_Get_PS_Font_Info */
/* FT_Get_PS_Font_Private */
/* FT_Get_PS_Font_Value */
/* */
/* T1_Blend_Flags */
/* T1_EncodingType */
/* PS_Dict_Keys */
/* */
/*************************************************************************/
@@ -190,14 +210,30 @@ FT_BEGIN_HEADER
/* given blend dictionary (font info or private). Used to support */
/* Multiple Masters fonts. */
/* */
/* <Values> */
/* T1_BLEND_UNDERLINE_POSITION :: */
/* T1_BLEND_UNDERLINE_THICKNESS :: */
/* T1_BLEND_ITALIC_ANGLE :: */
/* T1_BLEND_BLUE_VALUES :: */
/* T1_BLEND_OTHER_BLUES :: */
/* T1_BLEND_STANDARD_WIDTH :: */
/* T1_BLEND_STANDARD_HEIGHT :: */
/* T1_BLEND_STEM_SNAP_WIDTHS :: */
/* T1_BLEND_STEM_SNAP_HEIGHTS :: */
/* T1_BLEND_BLUE_SCALE :: */
/* T1_BLEND_BLUE_SHIFT :: */
/* T1_BLEND_FAMILY_BLUES :: */
/* T1_BLEND_FAMILY_OTHER_BLUES :: */
/* T1_BLEND_FORCE_BOLD :: */
/* */
typedef enum T1_Blend_Flags_
{
/*# required fields in a FontInfo blend dictionary */
/* required fields in a FontInfo blend dictionary */
T1_BLEND_UNDERLINE_POSITION = 0,
T1_BLEND_UNDERLINE_THICKNESS,
T1_BLEND_ITALIC_ANGLE,
/*# required fields in a Private blend dictionary */
/* required fields in a Private blend dictionary */
T1_BLEND_BLUE_VALUES,
T1_BLEND_OTHER_BLUES,
T1_BLEND_STANDARD_WIDTH,
@@ -210,15 +246,13 @@ FT_BEGIN_HEADER
T1_BLEND_FAMILY_OTHER_BLUES,
T1_BLEND_FORCE_BOLD,
/*# never remove */
T1_BLEND_MAX
T1_BLEND_MAX /* do not remove */
} T1_Blend_Flags;
/* */
/*# backwards compatible definitions */
/* these constants are deprecated; use the corresponding */
/* `T1_Blend_Flags' values instead */
#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION
#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS
#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE
@@ -235,6 +269,8 @@ FT_BEGIN_HEADER
#define t1_blend_force_bold T1_BLEND_FORCE_BOLD
#define t1_blend_max T1_BLEND_MAX
/* */
/* maximum number of Multiple Masters designs, as defined in the spec */
#define T1_MAX_MM_DESIGNS 16
@@ -333,10 +369,17 @@ FT_BEGIN_HEADER
/* */
typedef struct CID_FaceDictRec_* CID_FaceDict;
/* */
/* backwards-compatible definition */
/*************************************************************************/
/* */
/* <Struct> */
/* CID_FontDict */
/* */
/* <Description> */
/* This type is equivalent to @CID_FaceDictRec. It is deprecated but */
/* kept to maintain source compatibility between various versions of */
/* FreeType. */
/* */
typedef CID_FaceDictRec CID_FontDict;
@@ -449,8 +492,9 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
* The string pointers within the font info structure are owned by
* the face and don't need to be freed by the caller.
* String pointers within the @PS_FontInfoRec structure are owned by
* the face and don't need to be freed by the caller. Missing entries
* in the font's FontInfo dictionary are represented by NULL pointers.
*
* If the font's format is not PostScript-based, this function will
* return the `FT_Err_Invalid_Argument' error code.
@@ -503,6 +547,13 @@ FT_BEGIN_HEADER
/* An enumeration describing the `Encoding' entry in a Type 1 */
/* dictionary. */
/* */
/* <Values> */
/* T1_ENCODING_TYPE_NONE :: */
/* T1_ENCODING_TYPE_ARRAY :: */
/* T1_ENCODING_TYPE_STANDARD :: */
/* T1_ENCODING_TYPE_ISOLATIN1 :: */
/* T1_ENCODING_TYPE_EXPERT :: */
/* */
typedef enum T1_EncodingType_
{
T1_ENCODING_TYPE_NONE = 0,
@@ -523,6 +574,54 @@ FT_BEGIN_HEADER
/* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */
/* the Type~1 dictionary entry to retrieve. */
/* */
/* <Values> */
/* PS_DICT_FONT_TYPE :: */
/* PS_DICT_FONT_MATRIX :: */
/* PS_DICT_FONT_BBOX :: */
/* PS_DICT_PAINT_TYPE :: */
/* PS_DICT_FONT_NAME :: */
/* PS_DICT_UNIQUE_ID :: */
/* PS_DICT_NUM_CHAR_STRINGS :: */
/* PS_DICT_CHAR_STRING_KEY :: */
/* PS_DICT_CHAR_STRING :: */
/* PS_DICT_ENCODING_TYPE :: */
/* PS_DICT_ENCODING_ENTRY :: */
/* PS_DICT_NUM_SUBRS :: */
/* PS_DICT_SUBR :: */
/* PS_DICT_STD_HW :: */
/* PS_DICT_STD_VW :: */
/* PS_DICT_NUM_BLUE_VALUES :: */
/* PS_DICT_BLUE_VALUE :: */
/* PS_DICT_BLUE_FUZZ :: */
/* PS_DICT_NUM_OTHER_BLUES :: */
/* PS_DICT_OTHER_BLUE :: */
/* PS_DICT_NUM_FAMILY_BLUES :: */
/* PS_DICT_FAMILY_BLUE :: */
/* PS_DICT_NUM_FAMILY_OTHER_BLUES :: */
/* PS_DICT_FAMILY_OTHER_BLUE :: */
/* PS_DICT_BLUE_SCALE :: */
/* PS_DICT_BLUE_SHIFT :: */
/* PS_DICT_NUM_STEM_SNAP_H :: */
/* PS_DICT_STEM_SNAP_H :: */
/* PS_DICT_NUM_STEM_SNAP_V :: */
/* PS_DICT_STEM_SNAP_V :: */
/* PS_DICT_FORCE_BOLD :: */
/* PS_DICT_RND_STEM_UP :: */
/* PS_DICT_MIN_FEATURE :: */
/* PS_DICT_LEN_IV :: */
/* PS_DICT_PASSWORD :: */
/* PS_DICT_LANGUAGE_GROUP :: */
/* PS_DICT_VERSION :: */
/* PS_DICT_NOTICE :: */
/* PS_DICT_FULL_NAME :: */
/* PS_DICT_FAMILY_NAME :: */
/* PS_DICT_WEIGHT :: */
/* PS_DICT_IS_FIXED_PITCH :: */
/* PS_DICT_UNDERLINE_POSITION :: */
/* PS_DICT_UNDERLINE_THICKNESS :: */
/* PS_DICT_FS_TYPE :: */
/* PS_DICT_ITALIC_ANGLE :: */
/* */
typedef enum PS_Dict_Keys_
{
/* conventionally in the font dictionary */

View File

@@ -4,7 +4,7 @@
/* */
/* TrueType name ID definitions (specification only). */
/* */
/* Copyright 1996-2004, 2006-2008, 2012, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -321,7 +321,7 @@ FT_BEGIN_HEADER
/* */
/* The canonical source for the Apple assigned Language ID's is at */
/* */
/* https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html */
/* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html */
/* */
#define TT_MAC_LANGID_ENGLISH 0
#define TT_MAC_LANGID_FRENCH 1
@@ -470,26 +470,26 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_ARABIC_GENERAL 0x0001
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401
#define TT_MS_LANGID_ARABIC_IRAQ 0x0801
#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01
#define TT_MS_LANGID_ARABIC_EGYPT 0x0C01
#define TT_MS_LANGID_ARABIC_LIBYA 0x1001
#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401
#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801
#define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01
#define TT_MS_LANGID_ARABIC_TUNISIA 0x1C01
#define TT_MS_LANGID_ARABIC_OMAN 0x2001
#define TT_MS_LANGID_ARABIC_YEMEN 0x2401
#define TT_MS_LANGID_ARABIC_SYRIA 0x2801
#define TT_MS_LANGID_ARABIC_JORDAN 0x2c01
#define TT_MS_LANGID_ARABIC_JORDAN 0x2C01
#define TT_MS_LANGID_ARABIC_LEBANON 0x3001
#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401
#define TT_MS_LANGID_ARABIC_UAE 0x3801
#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01
#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01
#define TT_MS_LANGID_ARABIC_QATAR 0x4001
#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402
#define TT_MS_LANGID_CATALAN_SPAIN 0x0403
#define TT_MS_LANGID_CHINESE_GENERAL 0x0004
#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404
#define TT_MS_LANGID_CHINESE_PRC 0x0804
#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04
#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04
#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004
#if 1 /* this looks like the correct value */
@@ -507,7 +507,7 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_DANISH_DENMARK 0x0406
#define TT_MS_LANGID_GERMAN_GERMANY 0x0407
#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807
#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07
#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07
#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007
#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407
#define TT_MS_LANGID_GREEK_GREECE 0x0408
@@ -520,69 +520,69 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009
#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409
#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809
#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09
#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09
#define TT_MS_LANGID_ENGLISH_CANADA 0x1009
#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409
#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809
#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09
#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1C09
#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009
#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409
#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809
#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09
#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09
#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009
#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409
#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809
#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3c09
#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09
#define TT_MS_LANGID_ENGLISH_INDIA 0x4009
#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409
#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809
#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a
#define TT_MS_LANGID_SPANISH_MEXICO 0x080a
#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a
#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a
#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a
#define TT_MS_LANGID_SPANISH_PANAMA 0x180a
#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a
#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a
#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a
#define TT_MS_LANGID_SPANISH_PERU 0x280a
#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a
#define TT_MS_LANGID_SPANISH_ECUADOR 0x300a
#define TT_MS_LANGID_SPANISH_CHILE 0x340a
#define TT_MS_LANGID_SPANISH_URUGUAY 0x380a
#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a
#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a
#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a
#define TT_MS_LANGID_SPANISH_HONDURAS 0x480a
#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a
#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a
#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540a
#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A
#define TT_MS_LANGID_SPANISH_MEXICO 0x080A
#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0C0A
#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A
#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A
#define TT_MS_LANGID_SPANISH_PANAMA 0x180A
#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1C0A
#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200A
#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240A
#define TT_MS_LANGID_SPANISH_PERU 0x280A
#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2C0A
#define TT_MS_LANGID_SPANISH_ECUADOR 0x300A
#define TT_MS_LANGID_SPANISH_CHILE 0x340A
#define TT_MS_LANGID_SPANISH_URUGUAY 0x380A
#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3C0A
#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400A
#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440A
#define TT_MS_LANGID_SPANISH_HONDURAS 0x480A
#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A
#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A
#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A
/* The following ID blatantly violate MS specs by using a */
/* sublanguage > 0x1F. */
#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40aU
#define TT_MS_LANGID_FINNISH_FINLAND 0x040b
#define TT_MS_LANGID_FRENCH_FRANCE 0x040c
#define TT_MS_LANGID_FRENCH_BELGIUM 0x080c
#define TT_MS_LANGID_FRENCH_CANADA 0x0c0c
#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c
#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c
#define TT_MS_LANGID_FRENCH_MONACO 0x180c
#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1c0c
#define TT_MS_LANGID_FRENCH_REUNION 0x200c
#define TT_MS_LANGID_FRENCH_CONGO 0x240c
#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU
#define TT_MS_LANGID_FINNISH_FINLAND 0x040B
#define TT_MS_LANGID_FRENCH_FRANCE 0x040C
#define TT_MS_LANGID_FRENCH_BELGIUM 0x080C
#define TT_MS_LANGID_FRENCH_CANADA 0x0C0C
#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C
#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C
#define TT_MS_LANGID_FRENCH_MONACO 0x180C
#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C
#define TT_MS_LANGID_FRENCH_REUNION 0x200C
#define TT_MS_LANGID_FRENCH_CONGO 0x240C
/* which was formerly: */
#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO
#define TT_MS_LANGID_FRENCH_SENEGAL 0x280c
#define TT_MS_LANGID_FRENCH_CAMEROON 0x2c0c
#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300c
#define TT_MS_LANGID_FRENCH_MALI 0x340c
#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c
#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c
/* and another violation of the spec (see 0xE40aU) */
#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40cU
#define TT_MS_LANGID_HEBREW_ISRAEL 0x040d
#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e
#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f
#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C
#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C
#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C
#define TT_MS_LANGID_FRENCH_MALI 0x340C
#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C
#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C
/* and another violation of the spec (see 0xE40AU) */
#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU
#define TT_MS_LANGID_HEBREW_ISRAEL 0x040D
#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E
#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F
#define TT_MS_LANGID_ITALIAN_ITALY 0x0410
#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810
#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411
@@ -600,27 +600,27 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818
#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419
#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819
#define TT_MS_LANGID_CROATIAN_CROATIA 0x041a
#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a
#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a
#define TT_MS_LANGID_CROATIAN_CROATIA 0x041A
#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A
#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A
#if 0 /* this used to be this value, but it looks like we were wrong */
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101a
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101A
#else /* current sources say */
#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101a
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141a
#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A
/* and XPsp2 Platform SDK added (2004-07-26) */
/* Names are shortened to be significant within 40 chars. */
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181a
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181a
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181A
#endif
#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b
#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c
#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d
#define TT_MS_LANGID_SWEDISH_FINLAND 0x081d
#define TT_MS_LANGID_THAI_THAILAND 0x041e
#define TT_MS_LANGID_TURKISH_TURKEY 0x041f
#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B
#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C
#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D
#define TT_MS_LANGID_SWEDISH_FINLAND 0x081D
#define TT_MS_LANGID_THAI_THAILAND 0x041E
#define TT_MS_LANGID_TURKISH_TURKEY 0x041F
#define TT_MS_LANGID_URDU_PAKISTAN 0x0420
#define TT_MS_LANGID_URDU_INDIA 0x0820
#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421
@@ -633,13 +633,13 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827
#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428
#define TT_MS_LANGID_FARSI_IRAN 0x0429
#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a
#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b
#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c
#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c
#define TT_MS_LANGID_BASQUE_SPAIN 0x042d
#define TT_MS_LANGID_SORBIAN_GERMANY 0x042e
#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f
#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A
#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B
#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C
#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C
#define TT_MS_LANGID_BASQUE_SPAIN 0x042D
#define TT_MS_LANGID_SORBIAN_GERMANY 0x042E
#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F
#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430
#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431
#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432
@@ -650,32 +650,32 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437
#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438
#define TT_MS_LANGID_HINDI_INDIA 0x0439
#define TT_MS_LANGID_MALTESE_MALTA 0x043a
#define TT_MS_LANGID_MALTESE_MALTA 0x043A
/* Added by XPsp2 Platform SDK (2004-07-26) */
#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043b
#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083b
#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3b
#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103b
#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143b
#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183b
#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3b
#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203b
#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243b
#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B
#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B
#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B
#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103B
#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143B
#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183B
#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B
#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B
#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B
/* ... and we also keep our old identifier... */
#define TT_MS_LANGID_SAAMI_LAPONIA 0x043b
#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B
#if 0 /* this seems to be a previous inversion */
#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c
#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c
#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C
#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C
#else
#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c
#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c
#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C
#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C
#endif
#define TT_MS_LANGID_YIDDISH_GERMANY 0x043d
#define TT_MS_LANGID_MALAY_MALAYSIA 0x043e
#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e
#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f
#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D
#define TT_MS_LANGID_MALAY_MALAYSIA 0x043E
#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E
#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043F
#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440
/* alias declared in Windows 2000 */
#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
@@ -693,12 +693,12 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_GUJARATI_INDIA 0x0447
#define TT_MS_LANGID_ORIYA_INDIA 0x0448
#define TT_MS_LANGID_TAMIL_INDIA 0x0449
#define TT_MS_LANGID_TELUGU_INDIA 0x044a
#define TT_MS_LANGID_KANNADA_INDIA 0x044b
#define TT_MS_LANGID_MALAYALAM_INDIA 0x044c
#define TT_MS_LANGID_ASSAMESE_INDIA 0x044d
#define TT_MS_LANGID_MARATHI_INDIA 0x044e
#define TT_MS_LANGID_SANSKRIT_INDIA 0x044f
#define TT_MS_LANGID_TELUGU_INDIA 0x044A
#define TT_MS_LANGID_KANNADA_INDIA 0x044B
#define TT_MS_LANGID_MALAYALAM_INDIA 0x044C
#define TT_MS_LANGID_ASSAMESE_INDIA 0x044D
#define TT_MS_LANGID_MARATHI_INDIA 0x044E
#define TT_MS_LANGID_SANSKRIT_INDIA 0x044F
#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850
#define TT_MS_LANGID_TIBETAN_CHINA 0x0451
@@ -732,13 +732,13 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459
#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859
/* Missing a LCID for Sindhi in Devanagari script */
#define TT_MS_LANGID_SYRIAC_SYRIA 0x045a
#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045b
#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045c
#define TT_MS_LANGID_INUKTITUT_CANADA 0x045d
#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045e
#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045f
#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085f
#define TT_MS_LANGID_SYRIAC_SYRIA 0x045A
#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045B
#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C
#define TT_MS_LANGID_INUKTITUT_CANADA 0x045D
#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E
#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F
#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085F
/* Missing a LCID for Tifinagh script */
#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460
/* Spelled this way by XPsp2 Platform SDK (2004-07-26) */
@@ -758,15 +758,15 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467
#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468
#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469
#define TT_MS_LANGID_YORUBA_NIGERIA 0x046a
#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046b
#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086b
#define TT_MS_LANGID_QUECHUA_PERU 0x0c6b
#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046c
#define TT_MS_LANGID_YORUBA_NIGERIA 0x046A
#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B
#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B
#define TT_MS_LANGID_QUECHUA_PERU 0x0C6B
#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046C
/* Also spelled by XPsp2 Platform SDK (2004-07-26) */
#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \
TT_MS_LANGID_SEPEDI_SOUTH_AFRICA
/* language codes 0x046d, 0x046e and 0x046f are (still) unknown. */
/* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */
#define TT_MS_LANGID_IGBO_NIGERIA 0x0470
#define TT_MS_LANGID_KANURI_NIGERIA 0x0471
#define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472
@@ -783,12 +783,12 @@ FT_BEGIN_HEADER
/* studying). */
#define TT_MS_LANGID_YI_CHINA 0x0478
#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479
/* language codes from 0x047a to 0x047f are (still) unknown. */
/* language codes from 0x047A to 0x047F are (still) unknown. */
#define TT_MS_LANGID_UIGHUR_CHINA 0x0480
#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481
#if 0 /* not deemed useful for fonts */
#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04ff
#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04FF
#endif

View File

@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType tables definitions and interface */
/* (specification only). */
/* */
/* Copyright 1996-2005, 2008-2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -48,6 +48,25 @@ FT_BEGIN_HEADER
/* This section contains the definition of TrueType-specific tables */
/* as well as some routines used to access and process them. */
/* */
/* <Order> */
/* TT_Header */
/* TT_HoriHeader */
/* TT_VertHeader */
/* TT_OS2 */
/* TT_Postscript */
/* TT_PCLT */
/* TT_MaxProfile */
/* */
/* FT_Sfnt_Tag */
/* FT_Get_Sfnt_Table */
/* FT_Load_Sfnt_Table */
/* FT_Sfnt_Table_Info */
/* */
/* FT_Get_CMap_Language_ID */
/* FT_Get_CMap_Format */
/* */
/* FT_PARAM_TAG_UNPATENTED_HINTING */
/* */
/*************************************************************************/
@@ -352,7 +371,7 @@ FT_BEGIN_HEADER
FT_Short xAvgCharWidth;
FT_UShort usWeightClass;
FT_UShort usWidthClass;
FT_Short fsType;
FT_UShort fsType;
FT_Short ySubscriptXSize;
FT_Short ySubscriptYSize;
FT_Short ySubscriptXOffset;
@@ -559,21 +578,44 @@ FT_BEGIN_HEADER
/* An enumeration used to specify the index of an SFNT table. */
/* Used in the @FT_Get_Sfnt_Table API function. */
/* */
/* <Values> */
/* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */
/* */
/* FT_SFNT_MAXP :: To access the font's @TT_MaxProfile structure. */
/* */
/* FT_SFNT_OS2 :: To access the font's @TT_OS2 structure. */
/* */
/* FT_SFNT_HHEA :: To access the font's @TT_HoriHeader structure. */
/* */
/* FT_SFNT_VHEA :: To access the font's @TT_VertHeader struture. */
/* */
/* FT_SFNT_POST :: To access the font's @TT_Postscript structure. */
/* */
/* FT_SFNT_PCLT :: To access the font's @TT_PCLT structure. */
/* */
typedef enum FT_Sfnt_Tag_
{
ft_sfnt_head = 0, /* TT_Header */
ft_sfnt_maxp = 1, /* TT_MaxProfile */
ft_sfnt_os2 = 2, /* TT_OS2 */
ft_sfnt_hhea = 3, /* TT_HoriHeader */
ft_sfnt_vhea = 4, /* TT_VertHeader */
ft_sfnt_post = 5, /* TT_Postscript */
ft_sfnt_pclt = 6, /* TT_PCLT */
FT_SFNT_HEAD,
FT_SFNT_MAXP,
FT_SFNT_OS2,
FT_SFNT_HHEA,
FT_SFNT_VHEA,
FT_SFNT_POST,
FT_SFNT_PCLT,
sfnt_max /* internal end mark */
FT_SFNT_MAX
} FT_Sfnt_Tag;
/* */
/* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */
/* values instead */
#define ft_sfnt_head FT_SFNT_HEAD
#define ft_sfnt_maxp FT_SFNT_MAXP
#define ft_sfnt_os2 FT_SFNT_OS2
#define ft_sfnt_hhea FT_SFNT_HHEA
#define ft_sfnt_vhea FT_SFNT_VHEA
#define ft_sfnt_post FT_SFNT_POST
#define ft_sfnt_pclt FT_SFNT_PCLT
/*************************************************************************/
@@ -611,7 +653,7 @@ FT_BEGIN_HEADER
/* */
/* */
/* vert_header = */
/* (TT_VertHeader*)FT_Get_Sfnt_Table( face, ft_sfnt_vhea ); */
/* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); */
/* } */
/* */
FT_EXPORT( void* )

View File

@@ -4,7 +4,7 @@
/* */
/* Tags for TrueType and OpenType tables (specification only). */
/* */
/* Copyright 1996-2001, 2004, 2005, 2007, 2008, 2013 by */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -4,7 +4,7 @@
/* */
/* Definitions for the unpatented TrueType hinting system */
/* */
/* Copyright 2003, 2006 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* Written by Graham Asher <graham.asher@btinternet.com> */
@@ -48,7 +48,8 @@ FT_BEGIN_HEADER
*/
#define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
/* */
/* */
FT_END_HEADER

View File

@@ -5,7 +5,7 @@
/* Routines used to compute vector angles with limited accuracy */
/* and very high speed. It also contains sorting routines (body). */
/* */
/* Copyright 2003-2006, 2011-2012 by */
/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,66 +20,6 @@
#include "aftypes.h"
#if 0
FT_LOCAL_DEF( FT_Int )
af_corner_is_flat( FT_Pos x_in,
FT_Pos y_in,
FT_Pos x_out,
FT_Pos y_out )
{
FT_Pos ax = x_in;
FT_Pos ay = y_in;
FT_Pos d_in, d_out, d_corner;
if ( ax < 0 )
ax = -ax;
if ( ay < 0 )
ay = -ay;
d_in = ax + ay;
ax = x_out;
if ( ax < 0 )
ax = -ax;
ay = y_out;
if ( ay < 0 )
ay = -ay;
d_out = ax + ay;
ax = x_out + x_in;
if ( ax < 0 )
ax = -ax;
ay = y_out + y_in;
if ( ay < 0 )
ay = -ay;
d_corner = ax + ay;
return ( d_in + d_out - d_corner ) < ( d_corner >> 4 );
}
FT_LOCAL_DEF( FT_Int )
af_corner_orientation( FT_Pos x_in,
FT_Pos y_in,
FT_Pos x_out,
FT_Pos y_out )
{
FT_Pos delta;
delta = x_in * y_out - y_in * x_out;
if ( delta == 0 )
return 0;
else
return 1 - 2 * ( delta < 0 );
}
#endif /* 0 */
/*
* We are not using `af_angle_atan' anymore, but we keep the source
* code below just in case...
@@ -319,7 +259,7 @@
sum += table[j].org;
table[j].org = 0;
}
table[cur_idx].org = sum / j;
table[cur_idx].org = sum / (FT_Pos)j;
if ( i < *count - 1 )
{

View File

@@ -7,7 +7,7 @@
/* */
/* Auto-fitter data for blue strings (body). */
/* */
/* Copyright 2013 by */
/* Copyright 2013-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,6 +26,10 @@
af_blue_strings[] =
{
/* */
'\xD8', '\xA7', '\xD8', '\xA5', '\xD9', '\x84', '\xD9', '\x83', '\xD8', '\xB7', '\xD8', '\xB8', /* ا إ ل ك ط ظ */
'\0',
'\xD8', '\xAA', '\xD8', '\xAB', '\xD8', '\xB7', '\xD8', '\xB8', '\xD9', '\x83', /* ت ث ط ظ ك */
'\0',
'\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\x9F', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕПЗОСЭ */
'\0',
'\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\xA8', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕШЗОСЭ */
@@ -67,6 +71,24 @@
'x', 'z', 'r', 'o', 'e', 's', 'c', /* xzroesc */
'\0',
'p', 'q', 'g', 'j', 'y', /* pqgjy */
'\0',
'\xE0', '\xB0', '\x87', '\xE0', '\xB0', '\x8C', '\xE0', '\xB0', '\x99', '\xE0', '\xB0', '\x9E', '\xE0', '\xB0', '\xA3', '\xE0', '\xB0', '\xB1', '\xE0', '\xB1', '\xAF', /* ఇ ఌ ఙ ఞ ణ ఱ ౯ */
'\0',
'\xE0', '\xB0', '\x85', '\xE0', '\xB0', '\x95', '\xE0', '\xB0', '\x9A', '\xE0', '\xB0', '\xB0', '\xE0', '\xB0', '\xBD', '\xE0', '\xB1', '\xA8', '\xE0', '\xB1', '\xAC', /* అ క చ ర ఽ ౨ ౬ */
'\0',
'\xE0', '\xB8', '\x9A', '\xE0', '\xB9', '\x80', '\xE0', '\xB9', '\x81', '\xE0', '\xB8', '\xAD', '\xE0', '\xB8', '\x81', '\xE0', '\xB8', '\xB2', /* บ เ แ อ ก า */
'\0',
'\xE0', '\xB8', '\x9A', '\xE0', '\xB8', '\x9B', '\xE0', '\xB8', '\xA9', '\xE0', '\xB8', '\xAF', '\xE0', '\xB8', '\xAD', '\xE0', '\xB8', '\xA2', '\xE0', '\xB8', '\xAE', /* บ ป ษ ฯ อ ย ฮ */
'\0',
'\xE0', '\xB8', '\x9B', '\xE0', '\xB8', '\x9D', '\xE0', '\xB8', '\x9F', /* ป ฝ ฟ */
'\0',
'\xE0', '\xB9', '\x82', '\xE0', '\xB9', '\x83', '\xE0', '\xB9', '\x84', /* โ ใ ไ */
'\0',
'\xE0', '\xB8', '\x8E', '\xE0', '\xB8', '\x8F', '\xE0', '\xB8', '\xA4', '\xE0', '\xB8', '\xA6', /* ฎ ฏ ฤ ฦ */
'\0',
'\xE0', '\xB8', '\x8D', '\xE0', '\xB8', '\x90', /* ญ ฐ */
'\0',
'\xE0', '\xB9', '\x90', '\xE0', '\xB9', '\x91', '\xE0', '\xB9', '\x93', /* ๑ ๓ */
#ifdef AF_CONFIG_OPTION_CJK
'\0',
'\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 他们你來們到和地 */
@@ -117,6 +139,9 @@
af_blue_stringsets[] =
{
/* */
{ AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_ARABIC_JOIN, 0 },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 },
{ AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
@@ -153,6 +178,18 @@
{ AF_BLUE_STRING_LATIN_SMALL, 0 },
{ AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_TELUGU_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_THAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
{ AF_BLUE_STRING_THAI_BOTTOM, 0 },
{ AF_BLUE_STRING_THAI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_THAI_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_THAI_DESCENDER, 0 },
{ AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0 },
{ AF_BLUE_STRING_THAI_DIGIT_TOP, 0 },
{ AF_BLUE_STRING_MAX, 0 },
#ifdef AF_CONFIG_OPTION_CJK
{ AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP },
{ AF_BLUE_STRING_CJK_BOTTOM, 0 },

View File

@@ -4,7 +4,7 @@
/* */
/* Auto-fitter data for blue strings (body). */
/* */
/* Copyright 2013 by */
/* Copyright 2013-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@@ -2,7 +2,7 @@
//
// Auto-fitter data for blue strings.
//
// Copyright 2013, 2014 by
// Copyright 2013-2015 by
// David Turner, Robert Wilhelm, and Werner Lemberg.
//
// This file is part of the FreeType project, and may only be used,
@@ -67,6 +67,11 @@
AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_ARABIC_TOP
"ا إ ل ك ط ظ"
AF_BLUE_STRING_ARABIC_JOIN
"ت ث ط ظ ك"
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP
"БВЕПЗОСЭ"
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM
@@ -119,6 +124,29 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_LATIN_SMALL_DESCENDER
"pqgjy"
// we separate the letters with spaces to avoid ligatures;
// this is just for convenience to simplify reading
AF_BLUE_STRING_TELUGU_TOP
"ఇ ఌ ఙ ఞ ణ ఱ ౯"
AF_BLUE_STRING_TELUGU_BOTTOM
"అ క చ ర ఽ ౨ ౬"
AF_BLUE_STRING_THAI_TOP
"บ เ แ อ ก า"
AF_BLUE_STRING_THAI_BOTTOM
"บ ป ษ ฯ อ ย ฮ"
AF_BLUE_STRING_THAI_ASCENDER
"ป ฝ ฟ"
AF_BLUE_STRING_THAI_LARGE_ASCENDER
"โ ใ ไ"
AF_BLUE_STRING_THAI_DESCENDER
"ฎ ฏ ฤ ฦ"
AF_BLUE_STRING_THAI_LARGE_DESCENDER
"ญ ฐ"
AF_BLUE_STRING_THAI_DIGIT_TOP
" ๑ ๓"
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRING_CJK_TOP
@@ -260,6 +288,11 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
AF_BLUE_STRINGSET_ARAB
{ AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_ARABIC_JOIN, 0 }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_CYRL
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }
@@ -306,6 +339,23 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_TELU
{ AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_TELUGU_BOTTOM, 0 }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_THAI
{ AF_BLUE_STRING_THAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
{ AF_BLUE_STRING_THAI_BOTTOM, 0 }
{ AF_BLUE_STRING_THAI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_THAI_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_THAI_DESCENDER, 0 }
{ AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0 }
{ AF_BLUE_STRING_THAI_DIGIT_TOP, 0 }
{ AF_BLUE_STRING_MAX, 0 }
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRINGSET_HANI

View File

@@ -7,7 +7,7 @@
/* */
/* Auto-fitter data for blue strings (specification). */
/* */
/* Copyright 2013, 2014 by */
/* Copyright 2013-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -74,28 +74,39 @@ FT_BEGIN_HEADER
typedef enum AF_Blue_String_
{
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 0,
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 17,
AF_BLUE_STRING_CYRILLIC_SMALL = 34,
AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 51,
AF_BLUE_STRING_DEVANAGARI_BASE = 58,
AF_BLUE_STRING_DEVANAGARI_TOP = 83,
AF_BLUE_STRING_DEVANAGARI_HEAD = 108,
AF_BLUE_STRING_DEVANAGARI_BOTTOM = 133,
AF_BLUE_STRING_GREEK_CAPITAL_TOP = 140,
AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 155,
AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 168,
AF_BLUE_STRING_GREEK_SMALL = 181,
AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 198,
AF_BLUE_STRING_HEBREW_TOP = 215,
AF_BLUE_STRING_HEBREW_BOTTOM = 232,
AF_BLUE_STRING_HEBREW_DESCENDER = 245,
AF_BLUE_STRING_LATIN_CAPITAL_TOP = 256,
AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 265,
AF_BLUE_STRING_LATIN_SMALL_F_TOP = 274,
AF_BLUE_STRING_LATIN_SMALL = 282,
AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 290,
af_blue_1_1 = 295,
AF_BLUE_STRING_ARABIC_TOP = 0,
AF_BLUE_STRING_ARABIC_JOIN = 13,
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 24,
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 41,
AF_BLUE_STRING_CYRILLIC_SMALL = 58,
AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 75,
AF_BLUE_STRING_DEVANAGARI_BASE = 82,
AF_BLUE_STRING_DEVANAGARI_TOP = 107,
AF_BLUE_STRING_DEVANAGARI_HEAD = 132,
AF_BLUE_STRING_DEVANAGARI_BOTTOM = 157,
AF_BLUE_STRING_GREEK_CAPITAL_TOP = 164,
AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 179,
AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 192,
AF_BLUE_STRING_GREEK_SMALL = 205,
AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 222,
AF_BLUE_STRING_HEBREW_TOP = 239,
AF_BLUE_STRING_HEBREW_BOTTOM = 256,
AF_BLUE_STRING_HEBREW_DESCENDER = 269,
AF_BLUE_STRING_LATIN_CAPITAL_TOP = 280,
AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 289,
AF_BLUE_STRING_LATIN_SMALL_F_TOP = 298,
AF_BLUE_STRING_LATIN_SMALL = 306,
AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 314,
AF_BLUE_STRING_TELUGU_TOP = 320,
AF_BLUE_STRING_TELUGU_BOTTOM = 342,
AF_BLUE_STRING_THAI_TOP = 364,
AF_BLUE_STRING_THAI_BOTTOM = 383,
AF_BLUE_STRING_THAI_ASCENDER = 405,
AF_BLUE_STRING_THAI_LARGE_ASCENDER = 415,
AF_BLUE_STRING_THAI_DESCENDER = 425,
AF_BLUE_STRING_THAI_LARGE_DESCENDER = 438,
AF_BLUE_STRING_THAI_DIGIT_TOP = 445,
af_blue_1_1 = 454,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 153,
@@ -136,29 +147,32 @@ FT_BEGIN_HEADER
/* Properties are specific to a writing system. We assume that a given */
/* blue string can't be used in more than a single writing system, which */
/* is a safe bet. */
#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) /* must have value 1 */
#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1 << 1 )
#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 2 )
#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 3 )
#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must have value 1 */
#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 1 )
#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 2 )
#define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 3 )
#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) /* must have value 1 */
#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) /* must have value 2 */
#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must have value 1 */
#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must have value 2 */
#define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP
#define AF_BLUE_STRINGSET_MAX_LEN 7
#define AF_BLUE_STRINGSET_MAX_LEN 8
/* The AF_Blue_Stringset enumeration values are offsets into the */
/* `af_blue_stringsets' array. */
typedef enum AF_Blue_Stringset_
{
AF_BLUE_STRINGSET_CYRL = 0,
AF_BLUE_STRINGSET_DEVA = 6,
AF_BLUE_STRINGSET_GREK = 12,
AF_BLUE_STRINGSET_HEBR = 19,
AF_BLUE_STRINGSET_LATN = 23,
af_blue_2_1 = 30,
AF_BLUE_STRINGSET_ARAB = 0,
AF_BLUE_STRINGSET_CYRL = 3,
AF_BLUE_STRINGSET_DEVA = 9,
AF_BLUE_STRINGSET_GREK = 15,
AF_BLUE_STRINGSET_HEBR = 22,
AF_BLUE_STRINGSET_LATN = 26,
AF_BLUE_STRINGSET_TELU = 33,
AF_BLUE_STRINGSET_THAI = 36,
af_blue_2_1 = 44,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
af_blue_2_1_1 = af_blue_2_1 + 2,

View File

@@ -4,7 +4,7 @@
/* */
/* Auto-fitter data for blue strings (specification). */
/* */
/* Copyright 2013, 2014 by */
/* Copyright 2013-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -96,13 +96,13 @@ FT_BEGIN_HEADER
/* Properties are specific to a writing system. We assume that a given */
/* blue string can't be used in more than a single writing system, which */
/* is a safe bet. */
#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) /* must have value 1 */
#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1 << 1 )
#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 2 )
#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 3 )
#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must have value 1 */
#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 1 )
#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 2 )
#define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 3 )
#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) /* must have value 1 */
#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) /* must have value 2 */
#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must have value 1 */
#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must have value 2 */
#define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP

View File

@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for CJK writing system (body). */
/* */
/* Copyright 2006-2014 by */
/* Copyright 2006-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -260,8 +260,8 @@
FT_Pos fills[AF_BLUE_STRING_MAX_LEN];
FT_Pos flats[AF_BLUE_STRING_MAX_LEN];
FT_Int num_fills;
FT_Int num_flats;
FT_UInt num_fills;
FT_UInt num_flats;
FT_Bool fill;
@@ -720,8 +720,8 @@
{
AF_Point pt = seg->first;
AF_Point last = seg->last;
AF_Flags f0 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );
AF_Flags f1;
FT_UInt f0 = pt->flags & AF_FLAG_CONTROL;
FT_UInt f1;
seg->flags &= ~AF_EDGE_ROUND;
@@ -729,7 +729,7 @@
for ( ; pt != last; f0 = f1 )
{
pt = pt->next;
f1 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL );
f1 = pt->flags & AF_FLAG_CONTROL;
if ( !f0 && !f1 )
break;
@@ -765,10 +765,6 @@
/* now compare each segment to the others */
for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{
/* the fake segments are for metrics hinting only */
if ( seg1->first == seg1->last )
continue;
if ( seg1->dir != major_dir )
continue;
@@ -867,19 +863,19 @@
if ( link == seg2 )
{
seg->link = 0;
seg->link = NULL;
seg->serif = link1;
}
else if ( link == link2 )
{
seg->link = 0;
seg->link = NULL;
seg->serif = seg1;
}
}
}
else
{
seg1->link = link1->link = 0;
seg1->link = link1->link = NULL;
break;
}
@@ -896,7 +892,7 @@
seg2->num_linked++;
if ( seg2->link != seg1 )
{
seg1->link = 0;
seg1->link = NULL;
if ( seg2->score < dist_threshold || seg1->score < seg2->score * 4 )
seg1->serif = seg2->link;
@@ -1028,10 +1024,11 @@
edge->first = seg;
edge->last = seg;
edge->fpos = seg->pos;
edge->opos = edge->pos = FT_MulFix( seg->pos, scale );
seg->edge_next = seg;
edge->dir = seg->dir;
edge->fpos = seg->pos;
edge->opos = FT_MulFix( seg->pos, scale );
edge->pos = edge->opos;
seg->edge_next = seg;
}
else
{
@@ -1162,7 +1159,7 @@
/* Example: the `c' in cour.pfa at size 13 */
if ( edge->serif && edge->link )
edge->serif = 0;
edge->serif = NULL;
}
}
@@ -1193,7 +1190,7 @@
/* Compute all edges which lie within blue zones. */
FT_LOCAL_DEF( void )
static void
af_cjk_hints_compute_blue_edges( AF_GlyphHints hints,
AF_CJKMetrics metrics,
AF_Dimension dim )
@@ -1304,7 +1301,7 @@
/* compute flags depending on render mode, etc. */
mode = metrics->root.scaler.render_mode;
#ifdef AF_CONFIG_OPTION_USE_WARPER
#if 0 /* AF_CONFIG_OPTION_USE_WARPER */
if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )
metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;
#endif
@@ -1337,6 +1334,12 @@
scaler_flags |= AF_SCALER_FLAG_NO_ADVANCE;
#ifdef AF_CONFIG_OPTION_USE_WARPER
/* get (global) warper flag */
if ( !metrics->root.globals->module->warping )
scaler_flags |= AF_SCALER_FLAG_NO_WARPER;
#endif
hints->scaler_flags = scaler_flags;
hints->other_flags = other_flags;
@@ -1357,13 +1360,13 @@
static FT_Pos
af_cjk_snap_width( AF_Width widths,
FT_Int count,
FT_UInt count,
FT_Pos width )
{
int n;
FT_Pos best = 64 + 32 + 2;
FT_Pos reference = width;
FT_Pos scaled;
FT_UInt n;
FT_Pos best = 64 + 32 + 2;
FT_Pos reference = width;
FT_Pos scaled;
for ( n = 0; n < count; n++ )
@@ -1408,8 +1411,8 @@
af_cjk_compute_stem_width( AF_GlyphHints hints,
AF_Dimension dim,
FT_Pos width,
AF_Edge_Flags base_flags,
AF_Edge_Flags stem_flags )
FT_UInt base_flags,
FT_UInt stem_flags )
{
AF_CJKMetrics metrics = (AF_CJKMetrics)hints->metrics;
AF_CJKAxis axis = &metrics->axis[dim];
@@ -1533,10 +1536,9 @@
{
FT_Pos dist = stem_edge->opos - base_edge->opos;
FT_Pos fitted_width = af_cjk_compute_stem_width(
hints, dim, dist,
(AF_Edge_Flags)base_edge->flags,
(AF_Edge_Flags)stem_edge->flags );
FT_Pos fitted_width = af_cjk_compute_stem_width( hints, dim, dist,
base_edge->flags,
stem_edge->flags );
stem_edge->pos = base_edge->pos + fitted_width;
@@ -1614,8 +1616,8 @@
org_len = edge2->opos - edge->opos;
cur_len = af_cjk_compute_stem_width( hints, dim, org_len,
(AF_Edge_Flags)edge->flags,
(AF_Edge_Flags)edge2->flags );
edge->flags,
edge2->flags );
org_center = ( edge->opos + edge2->opos ) / 2 + anchor;
cur_pos1 = org_center - cur_len / 2;
@@ -1716,7 +1718,7 @@
AF_Edge edge_limit = edges + axis->num_edges;
FT_PtrDist n_edges;
AF_Edge edge;
AF_Edge anchor = 0;
AF_Edge anchor = NULL;
FT_Pos delta = 0;
FT_Int skipped = 0;
FT_Bool has_last_stem = FALSE;
@@ -2194,7 +2196,13 @@
goto Exit;
/* analyze glyph outline */
#ifdef AF_CONFIG_OPTION_USE_WARPER
if ( ( metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT &&
AF_HINTS_DO_WARP( hints ) ) ||
AF_HINTS_DO_HORIZONTAL( hints ) )
#else
if ( AF_HINTS_DO_HORIZONTAL( hints ) )
#endif
{
error = af_cjk_hints_detect_features( hints, AF_DIMENSION_HORZ );
if ( error )
@@ -2220,8 +2228,9 @@
{
#ifdef AF_CONFIG_OPTION_USE_WARPER
if ( dim == AF_DIMENSION_HORZ &&
metrics->root.scaler.render_mode == FT_RENDER_MODE_NORMAL )
if ( dim == AF_DIMENSION_HORZ &&
metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT &&
AF_HINTS_DO_WARP( hints ) )
{
AF_WarperRec warper;
FT_Fixed scale;
@@ -2243,12 +2252,6 @@
}
}
#if 0
af_glyph_hints_dump_points( hints );
af_glyph_hints_dump_segments( hints );
af_glyph_hints_dump_edges( hints );
#endif
af_glyph_hints_save( hints, outline );
Exit:

View File

@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for CJK writing system (specification). */
/* */
/* Copyright 2006, 2007, 2011-2014 by */
/* Copyright 2006-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -55,14 +55,10 @@ FT_BEGIN_HEADER
#define AF_CJK_MAX_WIDTHS 16
enum
{
AF_CJK_BLUE_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */
AF_CJK_BLUE_TOP = 1 << 1, /* result of AF_CJK_IS_TOP_BLUE */
AF_CJK_BLUE_ADJUSTMENT = 1 << 2, /* used for scale adjustment */
/* optimization */
AF_CJK_BLUE_FLAG_MAX
};
#define AF_CJK_BLUE_ACTIVE ( 1U << 0 ) /* zone height is <= 3/4px */
#define AF_CJK_BLUE_TOP ( 1U << 1 ) /* result of AF_CJK_IS_TOP_BLUE */
#define AF_CJK_BLUE_ADJUSTMENT ( 1U << 2 ) /* used for scale adjustment */
/* optimization */
typedef struct AF_CJKBlueRec_

View File

@@ -4,7 +4,7 @@
/* */
/* Auto-fitter coverages (specification only). */
/* */
/* Copyright 2013, 2014 by */
/* Copyright 2013-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

Some files were not shown because too many files have changed in this diff Show More