zenilib: zenilib/jni/external/freetype2/src/pshinter/pshglob.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pshglob.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* pshglob.h */
4 /* */
5 /* PostScript hinter global hinting management. */
6 /* */
7 /* Copyright 2001, 2002, 2003 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 __PSHGLOB_H__
20 #define __PSHGLOB_H__
21
22
23 #include FT_FREETYPE_H
24 #include FT_INTERNAL_POSTSCRIPT_HINTS_H
25
26
27 FT_BEGIN_HEADER
28
29
30 /*************************************************************************/
31 /*************************************************************************/
32 /***** *****/
33 /***** GLOBAL HINTS INTERNALS *****/
34 /***** *****/
35 /*************************************************************************/
36 /*************************************************************************/
37
38
39 /*************************************************************************/
40 /* */
41 /* @constant: */
42 /* PS_GLOBALS_MAX_BLUE_ZONES */
43 /* */
44 /* @description: */
45 /* The maximum number of blue zones in a font global hints structure. */
46 /* See @PS_Globals_BluesRec. */
47 /* */
48 #define PS_GLOBALS_MAX_BLUE_ZONES 16
49
50
51 /*************************************************************************/
52 /* */
53 /* @constant: */
54 /* PS_GLOBALS_MAX_STD_WIDTHS */
55 /* */
56 /* @description: */
57 /* The maximum number of standard and snap widths in either the */
58 /* horizontal or vertical direction. See @PS_Globals_WidthsRec. */
59 /* */
60 #define PS_GLOBALS_MAX_STD_WIDTHS 16
61
62
63 /* standard and snap width */
64 typedef struct PSH_WidthRec_
65 {
66 FT_Int org;
67 FT_Pos cur;
68 FT_Pos fit;
69
70 } PSH_WidthRec, *PSH_Width;
71
72
73 /* standard and snap widths table */
74 typedef struct PSH_WidthsRec_
75 {
76 FT_UInt count;
77 PSH_WidthRec widths[PS_GLOBALS_MAX_STD_WIDTHS];
78
79 } PSH_WidthsRec, *PSH_Widths;
80
81
82 typedef struct PSH_DimensionRec_
83 {
84 PSH_WidthsRec stdw;
85 FT_Fixed scale_mult;
86 FT_Fixed scale_delta;
87
88 } PSH_DimensionRec, *PSH_Dimension;
89
90
91 /* blue zone descriptor */
92 typedef struct PSH_Blue_ZoneRec_
93 {
94 FT_Int org_ref;
95 FT_Int org_delta;
96 FT_Int org_top;
97 FT_Int org_bottom;
98
99 FT_Pos cur_ref;
100 FT_Pos cur_delta;
101 FT_Pos cur_bottom;
102 FT_Pos cur_top;
103
104 } PSH_Blue_ZoneRec, *PSH_Blue_Zone;
105
106
107 typedef struct PSH_Blue_TableRec_
108 {
109 FT_UInt count;
110 PSH_Blue_ZoneRec zones[PS_GLOBALS_MAX_BLUE_ZONES];
111
112 } PSH_Blue_TableRec, *PSH_Blue_Table;
113
114
115 /* blue zones table */
116 typedef struct PSH_BluesRec_
117 {
118 PSH_Blue_TableRec normal_top;
119 PSH_Blue_TableRec normal_bottom;
120 PSH_Blue_TableRec family_top;
121 PSH_Blue_TableRec family_bottom;
122
123 FT_Fixed blue_scale;
124 FT_Int blue_shift;
125 FT_Int blue_threshold;
126 FT_Int blue_fuzz;
127 FT_Bool no_overshoots;
128
129 } PSH_BluesRec, *PSH_Blues;
130
131
132 /* font globals. */
133 /* dimension 0 => X coordinates + vertical hints/stems */
134 /* dimension 1 => Y coordinates + horizontal hints/stems */
135 typedef struct PSH_GlobalsRec_
136 {
137 FT_Memory memory;
138 PSH_DimensionRec dimension[2];
139 PSH_BluesRec blues;
140
141 } PSH_GlobalsRec;
142
143
144 #define PSH_BLUE_ALIGN_NONE 0
145 #define PSH_BLUE_ALIGN_TOP 1
146 #define PSH_BLUE_ALIGN_BOT 2
147
148
149 typedef struct PSH_AlignmentRec_
150 {
151 int align;
152 FT_Pos align_top;
153 FT_Pos align_bot;
154
155 } PSH_AlignmentRec, *PSH_Alignment;
156
157
158 FT_LOCAL( void )
159 psh_globals_funcs_init( PSH_Globals_FuncsRec* funcs );
160
161
162 #if 0
163 /* snap a stem width to fitter coordinates. `org_width' is in font */
164 /* units. The result is in device pixels (26.6 format). */
165 FT_LOCAL( FT_Pos )
166 psh_dimension_snap_width( PSH_Dimension dimension,
167 FT_Int org_width );
168 #endif
169
170 FT_LOCAL( FT_Error )
171 psh_globals_set_scale( PSH_Globals globals,
172 FT_Fixed x_scale,
173 FT_Fixed y_scale,
174 FT_Fixed x_delta,
175 FT_Fixed y_delta );
176
177 /* snap a stem to one or two blue zones */
178 FT_LOCAL( void )
179 psh_blues_snap_stem( PSH_Blues blues,
180 FT_Int stem_top,
181 FT_Int stem_bot,
182 PSH_Alignment alignment );
183 /* */
184
185 #ifdef DEBUG_HINTER
186 extern PSH_Globals ps_debug_globals;
187 #endif
188
189
190 FT_END_HEADER
191
192
193 #endif /* __PSHGLOB_H__ */
194
195
196 /* END */
PSH_Globals
typedefFT_BEGIN_HEADER struct PSH_GlobalsRec_ * PSH_Globals
Definition: pshints.h:41
FT_Error
int FT_Error
Definition: fttypes.h:296
PSH_Blue_TableRec
struct PSH_Blue_TableRec_ PSH_Blue_TableRec
PSH_Alignment
struct PSH_AlignmentRec_ * PSH_Alignment
PSH_Blue_Table
struct PSH_Blue_TableRec_ * PSH_Blue_Table
PSH_BluesRec_::blue_scale
FT_Fixed blue_scale
Definition: pshglob.h:123
PSH_BluesRec_
Definition: pshglob.h:116
FT_Pos
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:59
PSH_DimensionRec_::stdw
PSH_WidthsRec stdw
Definition: pshglob.h:84
PSH_WidthRec_::cur
FT_Pos cur
Definition: pshglob.h:67
PSH_BluesRec_::normal_bottom
PSH_Blue_TableRec normal_bottom
Definition: pshglob.h:119
FT_END_HEADER
#define FT_END_HEADER
Definition: ftheader.h:54
PSH_BluesRec_::family_bottom
PSH_Blue_TableRec family_bottom
Definition: pshglob.h:121
PSH_BluesRec
struct PSH_BluesRec_ PSH_BluesRec
PSH_Dimension
struct PSH_DimensionRec_ * PSH_Dimension
FT_Int
signed int FT_Int
Definition: fttypes.h:216
PSH_BluesRec_::blue_fuzz
FT_Int blue_fuzz
Definition: pshglob.h:126
PSH_WidthRec_
Definition: pshglob.h:64
PSH_DimensionRec_::scale_mult
FT_Fixed scale_mult
Definition: pshglob.h:85
PSH_Blue_Zone
struct PSH_Blue_ZoneRec_ * PSH_Blue_Zone
PSH_AlignmentRec_::align
int align
Definition: pshglob.h:151
PSH_GlobalsRec_::memory
FT_Memory memory
Definition: pshglob.h:137
PSH_BluesRec_::no_overshoots
FT_Bool no_overshoots
Definition: pshglob.h:127
PSH_WidthRec
struct PSH_WidthRec_ PSH_WidthRec
PSH_AlignmentRec_::align_bot
FT_Pos align_bot
Definition: pshglob.h:153
PSH_Blue_ZoneRec_::org_delta
FT_Int org_delta
Definition: pshglob.h:95
PS_GLOBALS_MAX_STD_WIDTHS
#define PS_GLOBALS_MAX_STD_WIDTHS
Definition: pshglob.h:60
FT_Bool
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
PSH_GlobalsRec
struct PSH_GlobalsRec_ PSH_GlobalsRec
FT_BEGIN_HEADER
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
PSH_Blue_ZoneRec_::org_bottom
FT_Int org_bottom
Definition: pshglob.h:97
FT_LOCAL
#define FT_LOCAL(x)
Definition: ftconfig.h:466
PSH_BluesRec_::normal_top
PSH_Blue_TableRec normal_top
Definition: pshglob.h:118
PSH_Blue_ZoneRec_::cur_delta
FT_Pos cur_delta
Definition: pshglob.h:100
PSH_GlobalsRec_::dimension
PSH_DimensionRec dimension[2]
Definition: pshglob.h:138
PSH_DimensionRec
struct PSH_DimensionRec_ PSH_DimensionRec
PSH_AlignmentRec
struct PSH_AlignmentRec_ PSH_AlignmentRec
PSH_Blue_ZoneRec_::cur_top
FT_Pos cur_top
Definition: pshglob.h:102
PSH_WidthsRec_
Definition: pshglob.h:74
PSH_GlobalsRec_
Definition: pshglob.h:135
PSH_Blue_TableRec_
Definition: pshglob.h:107
PSH_Widths
struct PSH_WidthsRec_ * PSH_Widths
PSH_BluesRec_::family_top
PSH_Blue_TableRec family_top
Definition: pshglob.h:120
PSH_Blue_ZoneRec_::org_ref
FT_Int org_ref
Definition: pshglob.h:94
PSH_WidthRec_::fit
FT_Pos fit
Definition: pshglob.h:68
PSH_Blue_ZoneRec_::org_top
FT_Int org_top
Definition: pshglob.h:96
FT_Memory
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
PSH_Blue_TableRec_::count
FT_UInt count
Definition: pshglob.h:109
psh_globals_funcs_init
psh_globals_funcs_init(PSH_Globals_FuncsRec *funcs)
Definition: pshglob.c:742
PSH_AlignmentRec_::align_top
FT_Pos align_top
Definition: pshglob.h:152
PSH_Blue_ZoneRec
struct PSH_Blue_ZoneRec_ PSH_Blue_ZoneRec
PSH_Blue_ZoneRec_::cur_bottom
FT_Pos cur_bottom
Definition: pshglob.h:101
PSH_DimensionRec_
Definition: pshglob.h:82
PSH_BluesRec_::blue_shift
FT_Int blue_shift
Definition: pshglob.h:124
PSH_WidthsRec_::count
FT_UInt count
Definition: pshglob.h:76
FT_Fixed
signed long FT_Fixed
Definition: fttypes.h:284
PSH_WidthsRec_::widths
PSH_WidthRec widths[PS_GLOBALS_MAX_STD_WIDTHS]
Definition: pshglob.h:77
PSH_Globals_FuncsRec_
Definition: pshints.h:59
PSH_Blue_TableRec_::zones
PSH_Blue_ZoneRec zones[PS_GLOBALS_MAX_BLUE_ZONES]
Definition: pshglob.h:110
FT_UInt
unsigned int FT_UInt
Definition: fttypes.h:227
PSH_GlobalsRec_::blues
PSH_BluesRec blues
Definition: pshglob.h:139
PSH_WidthsRec
struct PSH_WidthsRec_ PSH_WidthsRec
PSH_BluesRec_::blue_threshold
FT_Int blue_threshold
Definition: pshglob.h:125
PSH_AlignmentRec_
Definition: pshglob.h:149
PS_GLOBALS_MAX_BLUE_ZONES
#define PS_GLOBALS_MAX_BLUE_ZONES
Definition: pshglob.h:48
PSH_Blues
struct PSH_BluesRec_ * PSH_Blues
PSH_Blue_ZoneRec_::cur_ref
FT_Pos cur_ref
Definition: pshglob.h:99
PSH_DimensionRec_::scale_delta
FT_Fixed scale_delta
Definition: pshglob.h:86
psh_blues_snap_stem
psh_blues_snap_stem(PSH_Blues blues, FT_Int stem_top, FT_Int stem_bot, PSH_Alignment alignment)
Definition: pshglob.c:526
PSH_Blue_ZoneRec_
Definition: pshglob.h:92
psh_globals_set_scale
psh_globals_set_scale(PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, FT_Fixed x_delta, FT_Fixed y_delta)
Definition: pshglob.c:707
PSH_Width
struct PSH_WidthRec_ * PSH_Width
PSH_WidthRec_::org
FT_Int org
Definition: pshglob.h:66