zenilib: zenilib/jni/external/freetype2/src/pshinter/pshrec.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
pshrec.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* pshrec.h */
4 /* */
5 /* Postscript (Type1/Type2) hints recorder (specification). */
6 /* */
7 /* Copyright 2001, 2002, 2003, 2006, 2008 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 /**************************************************************************/
20 /* */
21 /* The functions defined here are called from the Type 1, CID and CFF */
22 /* font drivers to record the hints of a given character/glyph. */
23 /* */
24 /* The hints are recorded in a unified format, and are later processed */
25 /* by the `optimizer' and `fitter' to adjust the outlines to the pixel */
26 /* grid. */
27 /* */
28 /**************************************************************************/
29
30
31 #ifndef __PSHREC_H__
32 #define __PSHREC_H__
33
34
35 #include <ft2build.h>
36 #include FT_INTERNAL_POSTSCRIPT_HINTS_H
37 #include "pshglob.h"
38
39
40 FT_BEGIN_HEADER
41
42
43 /*************************************************************************/
44 /*************************************************************************/
45 /***** *****/
46 /***** GLYPH HINTS RECORDER INTERNALS *****/
47 /***** *****/
48 /*************************************************************************/
49 /*************************************************************************/
50
51 /* handle to hint record */
52 typedef struct PS_HintRec_* PS_Hint;
53
54 /* hint types */
55 typedef enum PS_Hint_Type_
56 {
57 PS_HINT_TYPE_1 = 1,
58 PS_HINT_TYPE_2 = 2
59
60 } PS_Hint_Type;
61
62
63 /* hint flags */
64 typedef enum PS_Hint_Flags_
65 {
66 PS_HINT_FLAG_GHOST = 1,
67 PS_HINT_FLAG_BOTTOM = 2
68
69 } PS_Hint_Flags;
70
71
72 /* hint descriptor */
73 typedef struct PS_HintRec_
74 {
75 FT_Int pos;
76 FT_Int len;
77 FT_UInt flags;
78
79 } PS_HintRec;
80
81
82 #define ps_hint_is_active( x ) ( (x)->flags & PS_HINT_FLAG_ACTIVE )
83 #define ps_hint_is_ghost( x ) ( (x)->flags & PS_HINT_FLAG_GHOST )
84 #define ps_hint_is_bottom( x ) ( (x)->flags & PS_HINT_FLAG_BOTTOM )
85
86
87 /* hints table descriptor */
88 typedef struct PS_Hint_TableRec_
89 {
90 FT_UInt num_hints;
91 FT_UInt max_hints;
92 PS_Hint hints;
93
94 } PS_Hint_TableRec, *PS_Hint_Table;
95
96
97 /* hint and counter mask descriptor */
98 typedef struct PS_MaskRec_
99 {
100 FT_UInt num_bits;
101 FT_UInt max_bits;
102 FT_Byte* bytes;
103 FT_UInt end_point;
104
105 } PS_MaskRec, *PS_Mask;
106
107
108 /* masks and counters table descriptor */
109 typedef struct PS_Mask_TableRec_
110 {
111 FT_UInt num_masks;
112 FT_UInt max_masks;
113 PS_Mask masks;
114
115 } PS_Mask_TableRec, *PS_Mask_Table;
116
117
118 /* dimension-specific hints descriptor */
119 typedef struct PS_DimensionRec_
120 {
121 PS_Hint_TableRec hints;
122 PS_Mask_TableRec masks;
123 PS_Mask_TableRec counters;
124
125 } PS_DimensionRec, *PS_Dimension;
126
127
128 /* glyph hints descriptor */
129 /* dimension 0 => X coordinates + vertical hints/stems */
130 /* dimension 1 => Y coordinates + horizontal hints/stems */
131 typedef struct PS_HintsRec_
132 {
133 FT_Memory memory;
134 FT_Error error;
135 FT_UInt32 magic;
136 PS_Hint_Type hint_type;
137 PS_DimensionRec dimension[2];
138
139 } PS_HintsRec, *PS_Hints;
140
141 /* */
142
143 /* initialize hints recorder */
144 FT_LOCAL( FT_Error )
145 ps_hints_init( PS_Hints hints,
146 FT_Memory memory );
147
148 /* finalize hints recorder */
149 FT_LOCAL( void )
150 ps_hints_done( PS_Hints hints );
151
152 /* initialize Type1 hints recorder interface */
153 FT_LOCAL( void )
154 t1_hints_funcs_init( T1_Hints_FuncsRec* funcs );
155
156 /* initialize Type2 hints recorder interface */
157 FT_LOCAL( void )
158 t2_hints_funcs_init( T2_Hints_FuncsRec* funcs );
159
160
161 #ifdef DEBUG_HINTER
162 extern PS_Hints ps_debug_hints;
163 extern int ps_debug_no_horz_hints;
164 extern int ps_debug_no_vert_hints;
165 #endif
166
167 /* */
168
169
170 FT_END_HEADER
171
172
173 #endif /* __PS_HINTER_RECORD_H__ */
174
175
176 /* END */
PS_HintsRec_::hint_type
PS_Hint_Type hint_type
Definition: pshrec.h:136
FT_Error
int FT_Error
Definition: fttypes.h:296
PS_HINT_FLAG_BOTTOM
Definition: pshrec.h:67
PS_Hint
typedefFT_BEGIN_HEADER struct PS_HintRec_ * PS_Hint
Definition: pshrec.h:52
PS_Mask_TableRec_::masks
PS_Mask masks
Definition: pshrec.h:113
pshglob.h
T1_Hints_FuncsRec_
Definition: pshints.h:342
PS_HintsRec_::magic
FT_UInt32 magic
Definition: pshrec.h:135
FT_END_HEADER
#define FT_END_HEADER
Definition: ftheader.h:54
PS_HintsRec_
Definition: pshrec.h:131
PS_HintsRec_::memory
FT_Memory memory
Definition: pshrec.h:133
FT_Int
signed int FT_Int
Definition: fttypes.h:216
PS_MaskRec_
Definition: pshrec.h:98
PS_Hint_TableRec_::max_hints
FT_UInt max_hints
Definition: pshrec.h:91
PS_Hint_Table
struct PS_Hint_TableRec_ * PS_Hint_Table
PS_HINT_FLAG_GHOST
Definition: pshrec.h:66
PS_Mask_Table
struct PS_Mask_TableRec_ * PS_Mask_Table
PS_MaskRec_::end_point
FT_UInt end_point
Definition: pshrec.h:103
ps_hints_init
ps_hints_init(PS_Hints hints, FT_Memory memory)
Definition: pshrec.c:800
PS_MaskRec
struct PS_MaskRec_ PS_MaskRec
PS_MaskRec_::num_bits
FT_UInt num_bits
Definition: pshrec.h:100
PS_HINT_TYPE_1
Definition: pshrec.h:57
PS_DimensionRec_::hints
PS_Hint_TableRec hints
Definition: pshrec.h:121
PS_Hint_Flags
enum PS_Hint_Flags_ PS_Hint_Flags
FT_Byte
unsigned char FT_Byte
Definition: fttypes.h:150
FT_BEGIN_HEADER
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
FT_LOCAL
#define FT_LOCAL(x)
Definition: ftconfig.h:466
PS_Hints
struct PS_HintsRec_ * PS_Hints
PS_HintsRec_::dimension
PS_DimensionRec dimension[2]
Definition: pshrec.h:137
ps_hints_done
ps_hints_done(PS_Hints hints)
Definition: pshrec.c:786
PS_Hint_TableRec_::num_hints
FT_UInt num_hints
Definition: pshrec.h:90
PS_HintRec_
Definition: pshrec.h:73
PS_HintsRec
struct PS_HintsRec_ PS_HintsRec
PS_Mask
struct PS_MaskRec_ * PS_Mask
T2_Hints_FuncsRec_
Definition: pshints.h:656
PS_HintRec_::len
FT_Int len
Definition: pshrec.h:76
PS_Mask_TableRec_
Definition: pshrec.h:109
PS_DimensionRec_::counters
PS_Mask_TableRec counters
Definition: pshrec.h:123
t2_hints_funcs_init
t2_hints_funcs_init(T2_Hints_FuncsRec *funcs)
Definition: pshrec.c:1211
FT_Memory
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
PS_Hint_Type_
PS_Hint_Type_
Definition: pshrec.h:55
PS_HintRec_::flags
FT_UInt flags
Definition: pshrec.h:77
PS_Mask_TableRec_::max_masks
FT_UInt max_masks
Definition: pshrec.h:112
PS_MaskRec_::max_bits
FT_UInt max_bits
Definition: pshrec.h:101
PS_Hint_TableRec
struct PS_Hint_TableRec_ PS_Hint_TableRec
PS_Hint_Type
enum PS_Hint_Type_ PS_Hint_Type
PS_Mask_TableRec
struct PS_Mask_TableRec_ PS_Mask_TableRec
PS_Dimension
struct PS_DimensionRec_ * PS_Dimension
t1_hints_funcs_init
t1_hints_funcs_init(T1_Hints_FuncsRec *funcs)
Definition: pshrec.c:1145
ft2build.h
PS_Hint_Flags_
PS_Hint_Flags_
Definition: pshrec.h:64
PS_HintRec
struct PS_HintRec_ PS_HintRec
PS_DimensionRec_::masks
PS_Mask_TableRec masks
Definition: pshrec.h:122
PS_DimensionRec_
Definition: pshrec.h:119
FT_UInt
unsigned int FT_UInt
Definition: fttypes.h:227
PS_HintsRec_::error
FT_Error error
Definition: pshrec.h:134
PS_HintRec_::pos
FT_Int pos
Definition: pshrec.h:75
PS_HINT_TYPE_2
Definition: pshrec.h:58
PS_Hint_TableRec_
Definition: pshrec.h:88
PS_Hint_TableRec_::hints
PS_Hint hints
Definition: pshrec.h:92
PS_DimensionRec
struct PS_DimensionRec_ PS_DimensionRec
PS_Mask_TableRec_::num_masks
FT_UInt num_masks
Definition: pshrec.h:111
PS_MaskRec_::bytes
FT_Byte * bytes
Definition: pshrec.h:102