ReactOS  0.4.14-dev-1034-g1e60116
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-2018 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 
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  {
59 
60  } PS_Hint_Type;
61 
62 
63  /* hint flags */
64 #define PS_HINT_FLAG_GHOST 1U
65 #define PS_HINT_FLAG_BOTTOM 2U
66 
67 
68  /* hint descriptor */
69  typedef struct PS_HintRec_
70  {
74 
75  } PS_HintRec;
76 
77 
78 #define ps_hint_is_active( x ) ( (x)->flags & PS_HINT_FLAG_ACTIVE )
79 #define ps_hint_is_ghost( x ) ( (x)->flags & PS_HINT_FLAG_GHOST )
80 #define ps_hint_is_bottom( x ) ( (x)->flags & PS_HINT_FLAG_BOTTOM )
81 
82 
83  /* hints table descriptor */
84  typedef struct PS_Hint_TableRec_
85  {
89 
91 
92 
93  /* hint and counter mask descriptor */
94  typedef struct PS_MaskRec_
95  {
100 
101  } PS_MaskRec, *PS_Mask;
102 
103 
104  /* masks and counters table descriptor */
105  typedef struct PS_Mask_TableRec_
106  {
110 
112 
113 
114  /* dimension-specific hints descriptor */
115  typedef struct PS_DimensionRec_
116  {
120 
122 
123 
124  /* glyph hints descriptor */
125  /* dimension 0 => X coordinates + vertical hints/stems */
126  /* dimension 1 => Y coordinates + horizontal hints/stems */
127  typedef struct PS_HintsRec_
128  {
131  FT_UInt32 magic;
134 
135  } PS_HintsRec, *PS_Hints;
136 
137  /* */
138 
139  /* initialize hints recorder */
140  FT_LOCAL( void )
142  FT_Memory memory );
143 
144  /* finalize hints recorder */
145  FT_LOCAL( void )
147 
148  /* initialize Type1 hints recorder interface */
149  FT_LOCAL( void )
151 
152  /* initialize Type2 hints recorder interface */
153  FT_LOCAL( void )
155 
156 
157 #ifdef DEBUG_HINTER
158  extern PS_Hints ps_debug_hints;
159  extern int ps_debug_no_horz_hints;
160  extern int ps_debug_no_vert_hints;
161 #endif
162 
163  /* */
164 
165 
167 
168 
169 #endif /* PSHREC_H_ */
170 
171 
172 /* END */
namespace GUID const ADDRINFOEXW * hints
Definition: sock.c:80
FT_UInt num_bits
Definition: pshrec.h:96
int FT_Error
Definition: fttypes.h:300
typedefFT_BEGIN_HEADER struct PS_HintRec_ * PS_Hint
Definition: pshrec.h:52
t1_hints_funcs_init(T1_Hints_FuncsRec *funcs)
Definition: pshrec.c:1141
FT_Int pos
Definition: pshrec.h:71
FT_UInt max_masks
Definition: pshrec.h:108
#define FT_END_HEADER
Definition: ftheader.h:54
signed int FT_Int
Definition: fttypes.h:220
t2_hints_funcs_init(T2_Hints_FuncsRec *funcs)
Definition: pshrec.c:1207
struct PS_Hint_TableRec_ * PS_Hint_Table
struct PS_Mask_TableRec_ * PS_Mask_Table
struct PS_MaskRec_ PS_MaskRec
static char memory[1024 *256]
Definition: process.c:116
FT_Int len
Definition: pshrec.h:72
unsigned char FT_Byte
Definition: fttypes.h:154
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
FT_UInt32 magic
Definition: pshrec.h:131
#define FT_LOCAL(x)
Definition: ftconfig.h:387
struct PS_HintsRec_ * PS_Hints
FT_UInt num_hints
Definition: pshrec.h:86
struct PS_HintsRec_ PS_HintsRec
struct PS_MaskRec_ * PS_Mask
PS_Hint_TableRec hints
Definition: pshrec.h:117
FT_UInt num_masks
Definition: pshrec.h:107
PS_Hint_Type hint_type
Definition: pshrec.h:132
ps_hints_done(PS_Hints hints)
Definition: pshrec.c:804
static struct __wine_debug_functions funcs
Definition: debug.c:59
PS_Mask_TableRec masks
Definition: pshrec.h:118
FT_Error error
Definition: pshrec.h:130
FT_UInt flags
Definition: pshrec.h:73
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
PS_Mask_TableRec counters
Definition: pshrec.h:119
PS_Hint_Type_
Definition: pshrec.h:55
FT_Memory memory
Definition: pshrec.h:129
FT_UInt end_point
Definition: pshrec.h:99
struct PS_Hint_TableRec_ PS_Hint_TableRec
enum PS_Hint_Type_ PS_Hint_Type
struct PS_Mask_TableRec_ PS_Mask_TableRec
struct PS_DimensionRec_ * PS_Dimension
struct PS_HintRec_ PS_HintRec
FT_UInt max_hints
Definition: pshrec.h:87
ps_hints_init(PS_Hints hints, FT_Memory memory)
Definition: pshrec.c:818
FT_Byte * bytes
Definition: pshrec.h:98
unsigned int FT_UInt
Definition: fttypes.h:231
PS_Hint hints
Definition: pshrec.h:88
FT_UInt max_bits
Definition: pshrec.h:97
struct PS_DimensionRec_ PS_DimensionRec
PS_DimensionRec dimension[2]
Definition: pshrec.h:133
PS_Mask masks
Definition: pshrec.h:109