Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
ttsubpix.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* ttsubpix.h */
4 /* */
5 /* TrueType Subpixel Hinting. */
6 /* */
7 /* Copyright 2010-2013 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */
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. */
15 /* */
16 /***************************************************************************/
17 
18 
19 #ifndef __TTSUBPIX_H__
20 #define __TTSUBPIX_H__
21 
22 #include <ft2build.h>
23 #include "ttobjs.h"
24 #include "ttinterp.h"
25 
26 
28 
29 
30 #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
31 
32  /*************************************************************************/
33  /* */
34  /* ID flags to identify special functions at FDEF and runtime. */
35  /* */
36  /* */
37 #define SPH_FDEF_INLINE_DELTA_1 0x0000001
38 #define SPH_FDEF_INLINE_DELTA_2 0x0000002
39 #define SPH_FDEF_DIAGONAL_STROKE 0x0000004
40 #define SPH_FDEF_VACUFORM_ROUND_1 0x0000008
41 #define SPH_FDEF_TTFAUTOHINT_1 0x0000010
42 #define SPH_FDEF_SPACING_1 0x0000020
43 #define SPH_FDEF_SPACING_2 0x0000040
44 #define SPH_FDEF_TYPEMAN_STROKES 0x0000080
45 
46 
47  /*************************************************************************/
48  /* */
49  /* Tweak flags that are set for each glyph by the below rules. */
50  /* */
51  /* */
52 #define SPH_TWEAK_ALLOW_X_DMOVE 0x0000001
53 #define SPH_TWEAK_ALLOW_X_DMOVEX 0x0000002
54 #define SPH_TWEAK_ALLOW_X_MOVE_ZP2 0x0000004
55 #define SPH_TWEAK_ALWAYS_DO_DELTAP 0x0000008
56 #define SPH_TWEAK_ALWAYS_SKIP_DELTAP 0x0000010
57 #define SPH_TWEAK_COURIER_NEW_2_HACK 0x0000020
58 #define SPH_TWEAK_DEEMBOLDEN 0x0000040
59 #define SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES 0x0000080
60 #define SPH_TWEAK_DO_SHPIX 0x0000100
61 #define SPH_TWEAK_EMBOLDEN 0x0000200
62 #define SPH_TWEAK_MIAP_HACK 0x0000400
63 #define SPH_TWEAK_NORMAL_ROUND 0x0000800
64 #define SPH_TWEAK_NO_ALIGNRP_AFTER_IUP 0x0001000
65 #define SPH_TWEAK_NO_CALL_AFTER_IUP 0x0002000
66 #define SPH_TWEAK_NO_DELTAP_AFTER_IUP 0x0004000
67 #define SPH_TWEAK_PIXEL_HINTING 0x0008000
68 #define SPH_TWEAK_RASTERIZER_35 0x0010000
69 #define SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES 0x0020000
70 #define SPH_TWEAK_SKIP_INLINE_DELTAS 0x0040000
71 #define SPH_TWEAK_SKIP_IUP 0x0080000
72 #define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES 0x0100000
73 #define SPH_TWEAK_SKIP_OFFPIXEL_Y_MOVES 0x0200000
74 #define SPH_TWEAK_TIMES_NEW_ROMAN_HACK 0x0400000
75 #define SPH_TWEAK_MIRP_CVT_ZERO 0x0800000
76 
77 
78  FT_LOCAL( FT_Bool )
79  sph_test_tweak( TT_Face face,
80  const FT_String* family,
81  FT_UInt ppem,
82  const FT_String* style,
83  FT_UInt glyph_index,
84  const SPH_TweakRule* rule,
85  FT_UInt num_rules );
86 
87  FT_LOCAL( FT_UInt )
88  sph_test_tweak_x_scaling( TT_Face face,
89  const FT_String* family,
90  FT_UInt ppem,
91  const FT_String* style,
92  FT_UInt glyph_index );
93 
94  FT_LOCAL( void )
95  sph_set_tweaks( TT_Loader loader,
96  FT_UInt glyph_index );
97 
98 
99  /* These macros are defined absent a method for setting them */
100 #define SPH_OPTION_BITMAP_WIDTHS FALSE
101 #define SPH_OPTION_SET_SUBPIXEL TRUE
102 #define SPH_OPTION_SET_GRAYSCALE FALSE
103 #define SPH_OPTION_SET_COMPATIBLE_WIDTHS FALSE
104 #define SPH_OPTION_SET_RASTERIZER_VERSION 38
105 
106 #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
107 
108 
110 
111 #endif /* __TTSUBPIX_H__ */
112 
113 /* END */
#define FT_END_HEADER
Definition: ftheader.h:54
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
GLenum GLuint GLint GLenum face
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
#define FT_LOCAL(x)
Definition: ftconfig.h:235
char FT_String
Definition: fttypes.h:183
unsigned int FT_UInt
Definition: fttypes.h:227