zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
afcjk.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* afcjk.h */
4 /* */
5 /* Auto-fitter hinting routines for CJK script (specification). */
6 /* */
7 /* Copyright 2006, 2007, 2011 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 __AFCJK_H__
20 #define __AFCJK_H__
21 
22 #include "afhints.h"
23 #include "aflatin.h"
24 
25 
27 
28 
29  /* the CJK-specific script class */
30 
31  AF_DECLARE_SCRIPT_CLASS(af_cjk_script_class)
32 
33  /* CJK (global) metrics management */
34 
35  /*
36  * CJK glyphs tend to fill the square. So we have both vertical and
37  * horizontal blue zones. But some glyphs have flat bounding strokes that
38  * leave some space between neighbour glyphs.
39  */
40  enum
41  {
46 
48  };
49 
50 
51 #define AF_CJK_MAX_WIDTHS 16
52 #define AF_CJK_MAX_BLUES AF_CJK_BLUE_MAX
53 
54 
55  enum
56  {
60  AF_CJK_BLUE_ADJUSTMENT = 1 << 3, /* used for scale adjustment */
61  /* optimization */
63  };
64 
65 
66  typedef struct AF_CJKBlueRec_
67  {
69  AF_WidthRec shoot; /* undershoot */
71 
73 
74 
75  typedef struct AF_CJKAxisRec_
76  {
79 
85 
86  /* used for horizontal metrics too for CJK */
90 
93 
95 
96 
97  typedef struct AF_CJKMetricsRec_
98  {
102 
104 
105 
106  FT_LOCAL( FT_Error )
107  af_cjk_metrics_init( AF_CJKMetrics metrics,
108  FT_Face face );
109 
110  FT_LOCAL( void )
111  af_cjk_metrics_scale( AF_CJKMetrics metrics,
112  AF_Scaler scaler );
113 
114  FT_LOCAL( FT_Error )
116  AF_CJKMetrics metrics );
117 
118  FT_LOCAL( FT_Error )
120  FT_Outline* outline,
121  AF_CJKMetrics metrics );
122 
123  /* Shared. called from afindic.c */
124  FT_LOCAL( void )
125  af_cjk_metrics_check_digits( AF_CJKMetrics metrics,
126  FT_Face face );
127 
128  FT_LOCAL( void )
129  af_cjk_metrics_init_widths( AF_CJKMetrics metrics,
130  FT_Face face,
131  FT_ULong charcode );
132 
133 
134 /* */
135 
137 
138 #endif /* __AFCJK_H__ */
139 
140 
141 /* END */
AF_CJKAxisRec axis[AF_DIMENSION_MAX]
Definition: afcjk.h:101
FT_UInt blue_count
Definition: afcjk.h:88
af_cjk_metrics_check_digits(AF_CJKMetrics metrics, FT_Face face)
AF_ScriptMetricsRec root
Definition: afcjk.h:99
int FT_Error
Definition: fttypes.h:296
FT_UInt units_per_em
Definition: afcjk.h:100
unsigned long FT_ULong
Definition: fttypes.h:249
af_cjk_metrics_init(AF_CJKMetrics metrics, FT_Face face)
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:59
AF_CJKBlueRec blues[AF_CJK_BLUE_MAX]
Definition: afcjk.h:89
#define FT_END_HEADER
Definition: ftheader.h:54
struct AF_CJKMetricsRec_ * AF_CJKMetrics
af_cjk_metrics_scale(AF_CJKMetrics metrics, AF_Scaler scaler)
AF_WidthRec shoot
Definition: afcjk.h:69
af_cjk_hints_apply(AF_GlyphHints hints, FT_Outline *outline, AF_CJKMetrics metrics)
#define AF_DECLARE_SCRIPT_CLASS(script_class)
Definition: aftypes.h:314
AF_WidthRec ref
Definition: afcjk.h:68
FT_Fixed scale
Definition: afcjk.h:77
GLuint GLsizei GLsizei GLfloat * metrics
Definition: glew.h:12394
FT_Bool control_overshoot
Definition: afcjk.h:87
FT_UInt flags
Definition: afcjk.h:70
struct AF_CJKBlueRec_ * AF_CJKBlue
AF_WidthRec widths[AF_CJK_MAX_WIDTHS]
Definition: afcjk.h:81
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
FT_Pos delta
Definition: afcjk.h:78
#define FT_LOCAL(x)
Definition: ftconfig.h:466
FT_Bool extra_light
Definition: afcjk.h:84
GLenum face
Definition: gl2ext.h:1490
struct AF_CJKAxisRec_ * AF_CJKAxis
FT_Pos edge_distance_threshold
Definition: afcjk.h:82
#define AF_CJK_MAX_WIDTHS
Definition: afcjk.h:51
struct AF_CJKBlueRec_ AF_CJKBlueRec
FT_Pos org_delta
Definition: afcjk.h:92
FT_UInt width_count
Definition: afcjk.h:80
af_cjk_metrics_init_widths(AF_CJKMetrics metrics, FT_Face face, FT_ULong charcode)
signed long FT_Fixed
Definition: fttypes.h:284
unsigned int FT_UInt
Definition: fttypes.h:227
af_cjk_hints_init(AF_GlyphHints hints, AF_CJKMetrics metrics)
FT_BEGIN_HEADER struct AF_WidthRec_ AF_WidthRec
struct AF_CJKMetricsRec_ AF_CJKMetricsRec
struct AF_CJKAxisRec_ AF_CJKAxisRec
FT_Fixed org_scale
Definition: afcjk.h:91
FT_Pos standard_width
Definition: afcjk.h:83