/[freetype]/freetype2/src/autofit/aflatin.h
ViewVC logotype

Diff of /freetype2/src/autofit/aflatin.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26