1 /****************************************************************************
5 * TrueType Subpixel Hinting.
7 * Copyright (C) 2010-2020 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
29 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
31 /**************************************************************************
33 * ID flags to identify special functions at FDEF and runtime.
36 #define SPH_FDEF_INLINE_DELTA_1 0x0000001
37 #define SPH_FDEF_INLINE_DELTA_2 0x0000002
38 #define SPH_FDEF_DIAGONAL_STROKE 0x0000004
39 #define SPH_FDEF_VACUFORM_ROUND_1 0x0000008
40 #define SPH_FDEF_TTFAUTOHINT_1 0x0000010
41 #define SPH_FDEF_SPACING_1 0x0000020
42 #define SPH_FDEF_SPACING_2 0x0000040
43 #define SPH_FDEF_TYPEMAN_STROKES 0x0000080
44 #define SPH_FDEF_TYPEMAN_DIAGENDCTRL 0x0000100
47 /**************************************************************************
49 * Tweak flags that are set for each glyph by the below rules.
52 #define SPH_TWEAK_ALLOW_X_DMOVE 0x0000001UL
53 #define SPH_TWEAK_ALWAYS_DO_DELTAP 0x0000002UL
54 #define SPH_TWEAK_ALWAYS_SKIP_DELTAP 0x0000004UL
55 #define SPH_TWEAK_COURIER_NEW_2_HACK 0x0000008UL
56 #define SPH_TWEAK_DEEMBOLDEN 0x0000010UL
57 #define SPH_TWEAK_DO_SHPIX 0x0000020UL
58 #define SPH_TWEAK_EMBOLDEN 0x0000040UL
59 #define SPH_TWEAK_MIAP_HACK 0x0000080UL
60 #define SPH_TWEAK_NORMAL_ROUND 0x0000100UL
61 #define SPH_TWEAK_NO_ALIGNRP_AFTER_IUP 0x0000200UL
62 #define SPH_TWEAK_NO_CALL_AFTER_IUP 0x0000400UL
63 #define SPH_TWEAK_NO_DELTAP_AFTER_IUP 0x0000800UL
64 #define SPH_TWEAK_PIXEL_HINTING 0x0001000UL
65 #define SPH_TWEAK_RASTERIZER_35 0x0002000UL
66 #define SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES 0x0004000UL
67 #define SPH_TWEAK_SKIP_IUP 0x0008000UL
68 #define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES 0x0010000UL
69 #define SPH_TWEAK_SKIP_OFFPIXEL_Y_MOVES 0x0020000UL
70 #define SPH_TWEAK_TIMES_NEW_ROMAN_HACK 0x0040000UL
71 #define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP 0x0080000UL
75 sph_test_tweak( TT_Face face,
76 const FT_String* family,
78 const FT_String* style,
80 const SPH_TweakRule* rule,
84 sph_test_tweak_x_scaling( TT_Face face,
85 const FT_String* family,
87 const FT_String* style,
88 FT_UInt glyph_index );
91 sph_set_tweaks( TT_Loader loader,
92 FT_UInt glyph_index );
95 /* These macros are defined absent a method for setting them */
96 #define SPH_OPTION_BITMAP_WIDTHS FALSE
97 #define SPH_OPTION_SET_SUBPIXEL TRUE
98 #define SPH_OPTION_SET_GRAYSCALE FALSE
99 #define SPH_OPTION_SET_COMPATIBLE_WIDTHS FALSE
100 #define SPH_OPTION_SET_RASTERIZER_VERSION 38
102 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
107 #endif /* TTSUBPIX_H_ */