Index: src/truetype/ttinterp.h |
diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h |
index 6d0fc03d68c5ff3769184eda8b94b15fcd298b32..69f5011ed40de2c9f15dd9d14aea99e0e3e7487b 100644 |
--- a/src/truetype/ttinterp.h |
+++ b/src/truetype/ttinterp.h |
@@ -4,7 +4,7 @@ |
/* */ |
/* TrueType bytecode interpreter (specification). */ |
/* */ |
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */ |
+/* Copyright 1996-2007, 2010, 2012-2013 by */ |
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
/* */ |
/* This file is part of the FreeType project, and may only be used, */ |
@@ -107,6 +107,48 @@ FT_BEGIN_HEADER |
} TT_CallRec, *TT_CallStack; |
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING |
+ |
+ /*************************************************************************/ |
+ /* */ |
+ /* These structures define rules used to tweak subpixel hinting for */ |
+ /* various fonts. "", 0, "", NULL value indicates to match any value. */ |
+ /* */ |
+ |
+#define SPH_MAX_NAME_SIZE 32 |
+#define SPH_MAX_CLASS_MEMBERS 100 |
+ |
+ typedef struct SPH_TweakRule_ |
+ { |
+ const char family[SPH_MAX_NAME_SIZE]; |
+ const FT_UInt ppem; |
+ const char style[SPH_MAX_NAME_SIZE]; |
+ const FT_ULong glyph; |
+ |
+ } SPH_TweakRule; |
+ |
+ |
+ typedef struct SPH_ScaleRule_ |
+ { |
+ const char family[SPH_MAX_NAME_SIZE]; |
+ const FT_UInt ppem; |
+ const char style[SPH_MAX_NAME_SIZE]; |
+ const FT_ULong glyph; |
+ const FT_ULong scale; |
+ |
+ } SPH_ScaleRule; |
+ |
+ |
+ typedef struct SPH_Font_Class_ |
+ { |
+ const char name[SPH_MAX_NAME_SIZE]; |
+ const char member[SPH_MAX_CLASS_MEMBERS][SPH_MAX_NAME_SIZE]; |
+ |
+ } SPH_Font_Class; |
+ |
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ |
+ |
+ |
/*************************************************************************/ |
/* */ |
/* The main structure for the interpreter which collects all necessary */ |
@@ -218,12 +260,43 @@ FT_BEGIN_HEADER |
FT_Bool grayscale; /* are we hinting for grayscale? */ |
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING |
+ TT_Round_Func func_round_sphn; /* subpixel rounding function */ |
+ |
+ FT_Bool grayscale_hinting; /* Using grayscale hinting? */ |
+ FT_Bool subpixel_hinting; /* Using subpixel hinting? */ |
+ FT_Bool native_hinting; /* Using native hinting? */ |
+ FT_Bool ignore_x_mode; /* Standard rendering mode for */ |
+ /* subpixel hinting. On if gray */ |
+ /* or subpixel hinting is on ) */ |
+ |
+ /* The following 4 aren't fully implemented but here for MS rasterizer */ |
+ /* compatibility. */ |
+ FT_Bool compatible_widths; /* compatible widths? */ |
+ FT_Bool symmetrical_smoothing; /* symmetrical_smoothing? */ |
+ FT_Bool bgr; /* bgr instead of rgb? */ |
+ FT_Bool subpixel_positioned; /* subpixel positioned */ |
+ /* (DirectWrite ClearType)? */ |
+ |
+ FT_Int rasterizer_version; /* MS rasterizer version */ |
+ |
+ FT_Bool iup_called; /* IUP called for glyph? */ |
+ |
+ FT_ULong sph_tweak_flags; /* flags to control */ |
+ /* hint tweaks */ |
+ |
+ FT_ULong sph_in_func_flags; /* flags to indicate if in */ |
+ /* special functions */ |
+ |
+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ |
+ |
} TT_ExecContextRec; |
extern const TT_GraphicsState tt_default_graphics_state; |
+#ifdef TT_USE_BYTECODE_INTERPRETER |
FT_LOCAL( FT_Error ) |
TT_Goto_CodeRange( TT_ExecContext exec, |
FT_Int range, |
@@ -246,6 +319,7 @@ FT_BEGIN_HEADER |
FT_Long multiplier, |
void* _pbuff, |
FT_ULong new_max ); |
+#endif /* TT_USE_BYTECODE_INTERPRETER */ |
/*************************************************************************/ |
@@ -270,6 +344,8 @@ FT_BEGIN_HEADER |
FT_EXPORT( TT_ExecContext ) |
TT_New_Context( TT_Driver driver ); |
+ |
+#ifdef TT_USE_BYTECODE_INTERPRETER |
FT_LOCAL( FT_Error ) |
TT_Done_Context( TT_ExecContext exec ); |
@@ -285,6 +361,7 @@ FT_BEGIN_HEADER |
FT_LOCAL( FT_Error ) |
TT_Run_Context( TT_ExecContext exec, |
FT_Bool debug ); |
+#endif /* TT_USE_BYTECODE_INTERPRETER */ |
/*************************************************************************/ |