mgh: fix for default HDD DMA mode, that wasn't correctly set
[open-ps2-loader.git] / thirdparty / freetype-2.3.12 / src / autofit / aflatin.h
blob660b10c83f7a220a2520087d021eea9b89381e94
1 /***************************************************************************/
2 /* */
3 /* aflatin.h */
4 /* */
5 /* Auto-fitter hinting routines for latin script (specification). */
6 /* */
7 /* Copyright 2003, 2004, 2005, 2006, 2007, 2009 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 /***************************************************************************/
19 #ifndef __AFLATIN_H__
20 #define __AFLATIN_H__
22 #include "afhints.h"
25 FT_BEGIN_HEADER
28 /* the latin-specific script class */
30 AF_DECLARE_SCRIPT_CLASS(af_latin_script_class)
33 /* constants are given with units_per_em == 2048 in mind */
34 #define AF_LATIN_CONSTANT( metrics, c ) \
35 ( ( (c) * (FT_Long)( (AF_LatinMetrics)(metrics) )->units_per_em ) / 2048 )
38 /*************************************************************************/
39 /*************************************************************************/
40 /***** *****/
41 /***** L A T I N G L O B A L M E T R I C S *****/
42 /***** *****/
43 /*************************************************************************/
44 /*************************************************************************/
48 * The following declarations could be embedded in the file `aflatin.c';
49 * they have been made semi-public to allow alternate script hinters to
50 * re-use some of them.
54 /* Latin (global) metrics management */
56 enum
58 AF_LATIN_BLUE_CAPITAL_TOP,
59 AF_LATIN_BLUE_CAPITAL_BOTTOM,
60 AF_LATIN_BLUE_SMALL_F_TOP,
61 AF_LATIN_BLUE_SMALL_TOP,
62 AF_LATIN_BLUE_SMALL_BOTTOM,
63 AF_LATIN_BLUE_SMALL_MINOR,
65 AF_LATIN_BLUE_MAX
69 #define AF_LATIN_IS_TOP_BLUE( b ) ( (b) == AF_LATIN_BLUE_CAPITAL_TOP || \
70 (b) == AF_LATIN_BLUE_SMALL_F_TOP || \
71 (b) == AF_LATIN_BLUE_SMALL_TOP )
73 #define AF_LATIN_MAX_WIDTHS 16
74 #define AF_LATIN_MAX_BLUES AF_LATIN_BLUE_MAX
77 enum
79 AF_LATIN_BLUE_ACTIVE = 1 << 0,
80 AF_LATIN_BLUE_TOP = 1 << 1,
81 AF_LATIN_BLUE_ADJUSTMENT = 1 << 2, /* used for scale adjustment */
82 /* optimization */
83 AF_LATIN_BLUE_FLAG_MAX
87 typedef struct AF_LatinBlueRec_
89 AF_WidthRec ref;
90 AF_WidthRec shoot;
91 FT_UInt flags;
93 } AF_LatinBlueRec, *AF_LatinBlue;
96 typedef struct AF_LatinAxisRec_
98 FT_Fixed scale;
99 FT_Pos delta;
101 FT_UInt width_count;
102 AF_WidthRec widths[AF_LATIN_MAX_WIDTHS];
103 FT_Pos edge_distance_threshold;
104 FT_Pos standard_width;
105 FT_Bool extra_light;
107 /* ignored for horizontal metrics */
108 FT_Bool control_overshoot;
109 FT_UInt blue_count;
110 AF_LatinBlueRec blues[AF_LATIN_BLUE_MAX];
112 FT_Fixed org_scale;
113 FT_Pos org_delta;
115 } AF_LatinAxisRec, *AF_LatinAxis;
118 typedef struct AF_LatinMetricsRec_
120 AF_ScriptMetricsRec root;
121 FT_UInt units_per_em;
122 AF_LatinAxisRec axis[AF_DIMENSION_MAX];
124 } AF_LatinMetricsRec, *AF_LatinMetrics;
127 FT_LOCAL( FT_Error )
128 af_latin_metrics_init( AF_LatinMetrics metrics,
129 FT_Face face );
131 FT_LOCAL( void )
132 af_latin_metrics_scale( AF_LatinMetrics metrics,
133 AF_Scaler scaler );
135 FT_LOCAL( void )
136 af_latin_metrics_init_widths( AF_LatinMetrics metrics,
137 FT_Face face,
138 FT_ULong charcode );
140 FT_LOCAL( void )
141 af_latin_metrics_check_digits( AF_LatinMetrics metrics,
142 FT_Face face );
145 /*************************************************************************/
146 /*************************************************************************/
147 /***** *****/
148 /***** L A T I N G L Y P H A N A L Y S I S *****/
149 /***** *****/
150 /*************************************************************************/
151 /*************************************************************************/
153 enum
155 AF_LATIN_HINTS_HORZ_SNAP = 1 << 0, /* enable stem width snapping */
156 AF_LATIN_HINTS_VERT_SNAP = 1 << 1, /* enable stem height snapping */
157 AF_LATIN_HINTS_STEM_ADJUST = 1 << 2, /* enable stem width/height */
158 /* adjustment */
159 AF_LATIN_HINTS_MONO = 1 << 3 /* indicate monochrome */
160 /* rendering */
164 #define AF_LATIN_HINTS_DO_HORZ_SNAP( h ) \
165 AF_HINTS_TEST_OTHER( h, AF_LATIN_HINTS_HORZ_SNAP )
167 #define AF_LATIN_HINTS_DO_VERT_SNAP( h ) \
168 AF_HINTS_TEST_OTHER( h, AF_LATIN_HINTS_VERT_SNAP )
170 #define AF_LATIN_HINTS_DO_STEM_ADJUST( h ) \
171 AF_HINTS_TEST_OTHER( h, AF_LATIN_HINTS_STEM_ADJUST )
173 #define AF_LATIN_HINTS_DO_MONO( h ) \
174 AF_HINTS_TEST_OTHER( h, AF_LATIN_HINTS_MONO )
178 * This shouldn't normally be exported. However, other scripts might
179 * like to use this function as-is.
181 FT_LOCAL( FT_Error )
182 af_latin_hints_compute_segments( AF_GlyphHints hints,
183 AF_Dimension dim );
186 * This shouldn't normally be exported. However, other scripts might
187 * want to use this function as-is.
189 FT_LOCAL( void )
190 af_latin_hints_link_segments( AF_GlyphHints hints,
191 AF_Dimension dim );
194 * This shouldn't normally be exported. However, other scripts might
195 * want to use this function as-is.
197 FT_LOCAL( FT_Error )
198 af_latin_hints_compute_edges( AF_GlyphHints hints,
199 AF_Dimension dim );
201 FT_LOCAL( FT_Error )
202 af_latin_hints_detect_features( AF_GlyphHints hints,
203 AF_Dimension dim );
205 /* */
207 FT_END_HEADER
209 #endif /* __AFLATIN_H__ */
212 /* END */