~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/freetype/src/autofit/aflatin.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __AFLATIN_H__
 
2
#define __AFLATIN_H__
 
3
 
 
4
#include "afhints.h"
 
5
 
 
6
FT_BEGIN_HEADER
 
7
 
 
8
 /*
 
9
  * the latin-specific script class
 
10
  *
 
11
  */
 
12
  FT_LOCAL( const AF_ScriptClassRec )    af_latin_script_class;
 
13
 
 
14
 /***************************************************************************/
 
15
 /***************************************************************************/
 
16
 /*****                                                                 *****/
 
17
 /*****       L A T I N   G L O B A L   M E T R I C S                   *****/
 
18
 /*****                                                                 *****/
 
19
 /***************************************************************************/
 
20
 /***************************************************************************/
 
21
 
 
22
 /*
 
23
  * the following declarations could be embedded in the file "aflatin.c"
 
24
  * they've been made semi-public to allow alternate script hinters to
 
25
  * re-use some of them
 
26
  */
 
27
 
 
28
 /*
 
29
  *  Latin (global) metrics management
 
30
  *
 
31
  */
 
32
 
 
33
  enum
 
34
  {
 
35
    AF_LATIN_BLUE_CAPITAL_TOP,
 
36
    AF_LATIN_BLUE_CAPITAL_BOTTOM,
 
37
    AF_LATIN_BLUE_SMALL_F_TOP,
 
38
    AF_LATIN_BLUE_SMALL_TOP,
 
39
    AF_LATIN_BLUE_SMALL_BOTTOM,
 
40
    AF_LATIN_BLUE_SMALL_MINOR,
 
41
 
 
42
    AF_LATIN_BLUE_MAX
 
43
  };
 
44
 
 
45
#define AF_LATIN_IS_TOP_BLUE( b )  ( (b) == AF_LATIN_BLUE_CAPITAL_TOP || \
 
46
                                     (b) == AF_LATIN_BLUE_SMALL_F_TOP || \
 
47
                                     (b) == AF_LATIN_BLUE_SMALL_TOP   )
 
48
 
 
49
#define  AF_LATIN_MAX_WIDTHS     16
 
50
#define  AF_LATIN_MAX_BLUES      AF_LATIN_BLUE_MAX
 
51
 
 
52
  enum
 
53
  {
 
54
    AF_LATIN_BLUE_ACTIVE     = (1 << 0),
 
55
    AF_LATIN_BLUE_TOP        = (1 << 1),
 
56
    AF_LATIN_BLUE_ADJUSTMENT = (1 << 2),  /* used for scale adjustment */
 
57
                                          /* optimization              */
 
58
    AF_LATIN_BLUE_FLAG_MAX
 
59
  };
 
60
 
 
61
 
 
62
  typedef struct AF_LatinBlueRec_
 
63
  {
 
64
    AF_WidthRec   ref;
 
65
    AF_WidthRec   shoot;
 
66
    FT_UInt       flags;
 
67
 
 
68
  } AF_LatinBlueRec, *AF_LatinBlue;
 
69
 
 
70
 
 
71
  typedef struct AF_LatinAxisRec_
 
72
  {
 
73
    FT_Fixed         scale;
 
74
    FT_Pos           delta;
 
75
 
 
76
    FT_UInt          width_count;
 
77
    AF_WidthRec      widths[ AF_LATIN_MAX_WIDTHS ];
 
78
    FT_Pos           edge_distance_threshold;
 
79
 
 
80
   /* ignored for horizontal metrics */
 
81
    FT_Bool          control_overshoot;
 
82
    FT_UInt          blue_count;
 
83
    AF_LatinBlueRec  blues[ AF_LATIN_BLUE_MAX ];
 
84
 
 
85
    FT_Fixed         org_scale;
 
86
    FT_Pos           org_delta;
 
87
 
 
88
  } AF_LatinAxisRec, *AF_LatinAxis;
 
89
 
 
90
 
 
91
  typedef struct AF_LatinMetricsRec_
 
92
  {
 
93
    AF_ScriptMetricsRec   root;
 
94
    FT_UInt               units_per_em;
 
95
    AF_LatinAxisRec       axis[ AF_DIMENSION_MAX ];
 
96
 
 
97
  } AF_LatinMetricsRec, *AF_LatinMetrics;
 
98
 
 
99
 
 
100
 
 
101
  FT_LOCAL( FT_Error )
 
102
  af_latin_metrics_init( AF_LatinMetrics  metrics,
 
103
                         FT_Face          face );
 
104
 
 
105
  FT_LOCAL( void )
 
106
  af_latin_metrics_scale( AF_LatinMetrics  metrics,
 
107
                          AF_Scaler        scaler );
 
108
 
 
109
 
 
110
 
 
111
 /***************************************************************************/
 
112
 /***************************************************************************/
 
113
 /*****                                                                 *****/
 
114
 /*****            L A T I N   G L Y P H   A N A L Y S I S              *****/
 
115
 /*****                                                                 *****/
 
116
 /***************************************************************************/
 
117
 /***************************************************************************/
 
118
 
 
119
  enum
 
120
  {
 
121
    AF_LATIN_HINTS_HORZ_SNAP   = (1 << 0),  /* enable stem width snapping  */
 
122
    AF_LATIN_HINTS_VERT_SNAP   = (1 << 1),  /* enable stem height snapping */
 
123
    AF_LATIN_HINTS_STEM_ADJUST = (1 << 2),  /* enable stem width/height adjustment */
 
124
    AF_LATIN_HINTS_MONO        = (1 << 3)   /* indicate monochrome rendering */
 
125
  };
 
126
 
 
127
#define  AF_LATIN_HINTS_DO_HORZ_SNAP(h) \
 
128
   AF_HINTS_TEST_OTHER(h,AF_LATIN_HINTS_HORZ_SNAP)
 
129
 
 
130
#define  AF_LATIN_HINTS_DO_VERT_SNAP(h) \
 
131
   AF_HINTS_TEST_OTHER(h,AF_LATIN_HINTS_VERT_SNAP)
 
132
 
 
133
#define  AF_LATIN_HINTS_DO_STEM_ADJUST(h)  \
 
134
   AF_HINTS_TEST_OTHER(h,AF_LATIN_HINTS_STEM_ADJUST)
 
135
 
 
136
#define  AF_LATIN_HINTS_DO_MONO(h)  \
 
137
   AF_HINTS_TEST_OTHER(h,AF_LATIN_HINTS_MONO)
 
138
 
 
139
 
 
140
 /* this shouldn't normally be exported. However, other scripts might
 
141
  * like to use this function as-is
 
142
  */
 
143
  FT_LOCAL( void )
 
144
  af_latin_hints_compute_segments( AF_GlyphHints  hints,
 
145
                                   AF_Dimension   dim );
 
146
 
 
147
 /* this shouldn't normally be exported. However, other scripts might
 
148
  * want to use this function as-is
 
149
  */
 
150
  FT_LOCAL( void )
 
151
  af_latin_hints_link_segments( AF_GlyphHints  hints,
 
152
                                AF_Dimension   dim );
 
153
 
 
154
 /* this shouldn't normally be exported. However, other scripts might
 
155
  * want to use this function as-is
 
156
  */
 
157
  FT_LOCAL( void )
 
158
  af_latin_hints_compute_edges( AF_GlyphHints  hints,
 
159
                                AF_Dimension   dim );
 
160
 
 
161
  FT_LOCAL( void )
 
162
  af_latin_hints_detect_features( AF_GlyphHints  hints,
 
163
                                  AF_Dimension   dim );
 
164
 
 
165
/* */
 
166
 
 
167
FT_END_HEADER
 
168
 
 
169
#endif /* __AFLATIN_H__ */