zenilib: zenilib/jni/external/freetype2/include/freetype/internal/ftgloadr.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
ftgloadr.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* ftgloadr.h */
4 /* */
5 /* The FreeType glyph loader (specification). */
6 /* */
7 /* Copyright 2002, 2003, 2005, 2006 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 __FTGLOADR_H__
20 #define __FTGLOADR_H__
21
22
23 #include <ft2build.h>
24 #include FT_FREETYPE_H
25
26
27 FT_BEGIN_HEADER
28
29
30 /*************************************************************************/
31 /* */
32 /* <Struct> */
33 /* FT_GlyphLoader */
34 /* */
35 /* <Description> */
36 /* The glyph loader is an internal object used to load several glyphs */
37 /* together (for example, in the case of composites). */
38 /* */
39 /* <Note> */
40 /* The glyph loader implementation is not part of the high-level API, */
41 /* hence the forward structure declaration. */
42 /* */
43 typedef struct FT_GlyphLoaderRec_* FT_GlyphLoader ;
44
45
46 #if 0 /* moved to freetype.h in version 2.2 */
47 #define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1
48 #define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2
49 #define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4
50 #define FT_SUBGLYPH_FLAG_SCALE 8
51 #define FT_SUBGLYPH_FLAG_XY_SCALE 0x40
52 #define FT_SUBGLYPH_FLAG_2X2 0x80
53 #define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200
54 #endif
55
56
57 typedef struct FT_SubGlyphRec_
58 {
59 FT_Int index;
60 FT_UShort flags;
61 FT_Int arg1;
62 FT_Int arg2;
63 FT_Matrix transform;
64
65 } FT_SubGlyphRec;
66
67
68 typedef struct FT_GlyphLoadRec_
69 {
70 FT_Outline outline; /* outline */
71 FT_Vector* extra_points; /* extra points table */
72 FT_Vector* extra_points2; /* second extra points table */
73 FT_UInt num_subglyphs; /* number of subglyphs */
74 FT_SubGlyph subglyphs; /* subglyphs */
75
76 } FT_GlyphLoadRec, *FT_GlyphLoad;
77
78
79 typedef struct FT_GlyphLoaderRec_
80 {
81 FT_Memory memory;
82 FT_UInt max_points;
83 FT_UInt max_contours;
84 FT_UInt max_subglyphs;
85 FT_Bool use_extra;
86
87 FT_GlyphLoadRec base;
88 FT_GlyphLoadRec current;
89
90 void* other; /* for possible future extension? */
91
92 } FT_GlyphLoaderRec;
93
94
95 /* create new empty glyph loader */
96 FT_BASE( FT_Error )
97 FT_GlyphLoader_New( FT_Memory memory,
98 FT_GlyphLoader *aloader );
99
100 /* add an extra points table to a glyph loader */
101 FT_BASE( FT_Error )
102 FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader );
103
104 /* destroy a glyph loader */
105 FT_BASE( void )
106 FT_GlyphLoader_Done( FT_GlyphLoader loader );
107
108 /* reset a glyph loader (frees everything int it) */
109 FT_BASE( void )
110 FT_GlyphLoader_Reset( FT_GlyphLoader loader );
111
112 /* rewind a glyph loader */
113 FT_BASE( void )
114 FT_GlyphLoader_Rewind( FT_GlyphLoader loader );
115
116 /* check that there is enough space to add `n_points' and `n_contours' */
117 /* to the glyph loader */
118 FT_BASE( FT_Error )
119 FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
120 FT_UInt n_points,
121 FT_UInt n_contours );
122
123
124 #define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
125 ( (_count) == 0 || ((_loader)->base.outline.n_points + \
126 (_loader)->current.outline.n_points + \
127 (unsigned long)(_count)) <= (_loader)->max_points )
128
129 #define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
130 ( (_count) == 0 || ((_loader)->base.outline.n_contours + \
131 (_loader)->current.outline.n_contours + \
132 (unsigned long)(_count)) <= (_loader)->max_contours )
133
134 #define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours ) \
135 ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
136 FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
137 ? 0 \
138 : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) )
139
140
141 /* check that there is enough space to add `n_subs' sub-glyphs to */
142 /* a glyph loader */
143 FT_BASE( FT_Error )
144 FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
145 FT_UInt n_subs );
146
147 /* prepare a glyph loader, i.e. empty the current glyph */
148 FT_BASE( void )
149 FT_GlyphLoader_Prepare( FT_GlyphLoader loader );
150
151 /* add the current glyph to the base glyph */
152 FT_BASE( void )
153 FT_GlyphLoader_Add( FT_GlyphLoader loader );
154
155 /* copy points from one glyph loader to another */
156 FT_BASE( FT_Error )
157 FT_GlyphLoader_CopyPoints( FT_GlyphLoader target,
158 FT_GlyphLoader source );
159
160 /* */
161
162
163 FT_END_HEADER
164
165 #endif /* __FTGLOADR_H__ */
166
167
168 /* END */
FT_SubGlyphRec
struct FT_SubGlyphRec_ FT_SubGlyphRec
FT_Error
int FT_Error
Definition: fttypes.h:296
FT_GlyphLoaderRec_::max_points
FT_UInt max_points
Definition: ftgloadr.h:82
FT_GlyphLoaderRec_::use_extra
FT_Bool use_extra
Definition: ftgloadr.h:85
FT_GlyphLoaderRec_::max_contours
FT_UInt max_contours
Definition: ftgloadr.h:83
FT_SubGlyphRec_
Definition: ftgloadr.h:57
FT_END_HEADER
#define FT_END_HEADER
Definition: ftheader.h:54
FT_Int
signed int FT_Int
Definition: fttypes.h:216
FT_GlyphLoaderRec_::current
FT_GlyphLoadRec current
Definition: ftgloadr.h:88
FT_Matrix_
Definition: fttypes.h:381
FT_SubGlyphRec_::arg1
FT_Int arg1
Definition: ftgloadr.h:61
FT_GlyphLoaderRec_::max_subglyphs
FT_UInt max_subglyphs
Definition: ftgloadr.h:84
FT_Outline_
Definition: ftimage.h:383
FT_GlyphLoadRec_::outline
FT_Outline outline
Definition: ftgloadr.h:70
FT_GlyphLoader_New
FT_GlyphLoader_New(FT_Memory memory, FT_GlyphLoader *aloader)
Definition: ftgloadr.c:69
FT_GlyphLoader_CopyPoints
FT_GlyphLoader_CopyPoints(FT_GlyphLoader target, FT_GlyphLoader source)
Definition: ftgloadr.c:360
FT_SubGlyphRec_::index
FT_Int index
Definition: ftgloadr.h:59
FT_SubGlyphRec_::flags
FT_UShort flags
Definition: ftgloadr.h:60
FT_Bool
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
FT_GlyphLoader_CreateExtra
FT_GlyphLoader_CreateExtra(FT_GlyphLoader loader)
Definition: ftgloadr.c:165
FT_GlyphLoader_Reset
FT_GlyphLoader_Reset(FT_GlyphLoader loader)
Definition: ftgloadr.c:104
FT_GlyphLoaderRec
struct FT_GlyphLoaderRec_ FT_GlyphLoaderRec
FT_GlyphLoader
typedefFT_BEGIN_HEADER struct FT_GlyphLoaderRec_ * FT_GlyphLoader
Definition: ftgloadr.h:43
FT_BEGIN_HEADER
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
FT_SubGlyphRec_::transform
FT_Matrix transform
Definition: ftgloadr.h:63
target
EGLContext EGLenum target
Definition: eglext.h:87
FT_GlyphLoader_Add
FT_GlyphLoader_Add(FT_GlyphLoader loader)
Definition: ftgloadr.c:323
FT_GlyphLoader_Done
FT_GlyphLoader_Done(FT_GlyphLoader loader)
Definition: ftgloadr.c:127
FT_GlyphLoaderRec_::memory
FT_Memory memory
Definition: ftgloadr.h:81
FT_GlyphLoader_CheckSubGlyphs
FT_GlyphLoader_CheckSubGlyphs(FT_GlyphLoader loader, FT_UInt n_subs)
Definition: ftgloadr.c:276
FT_GlyphLoadRec_::extra_points
FT_Vector * extra_points
Definition: ftgloadr.h:71
FT_Vector_
Definition: ftimage.h:75
FT_Memory
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_GlyphLoaderRec_
Definition: ftgloadr.h:79
ft2build.h
FT_GlyphLoad
struct FT_GlyphLoadRec_ * FT_GlyphLoad
FT_UInt
unsigned int FT_UInt
Definition: fttypes.h:227
FT_GlyphLoadRec_
Definition: ftgloadr.h:68
FT_GlyphLoader_Rewind
FT_GlyphLoader_Rewind(FT_GlyphLoader loader)
Definition: ftgloadr.c:87
FT_SubGlyphRec_::arg2
FT_Int arg2
Definition: ftgloadr.h:62
FT_GlyphLoadRec_::num_subglyphs
FT_UInt num_subglyphs
Definition: ftgloadr.h:73
FT_GlyphLoadRec_::subglyphs
FT_SubGlyph subglyphs
Definition: ftgloadr.h:74
FT_GlyphLoader_Prepare
FT_GlyphLoader_Prepare(FT_GlyphLoader loader)
Definition: ftgloadr.c:307
FT_GlyphLoaderRec_::base
FT_GlyphLoadRec base
Definition: ftgloadr.h:87
FT_GlyphLoaderRec_::other
void * other
Definition: ftgloadr.h:90
FT_GlyphLoadRec
struct FT_GlyphLoadRec_ FT_GlyphLoadRec
FT_BASE
#define FT_BASE(x)
Definition: ftconfig.h:478
FT_UShort
unsigned short FT_UShort
Definition: fttypes.h:205
source
GLsizei GLsizei GLchar * source
Definition: gl2ext.h:994
FT_GlyphLoadRec_::extra_points2
FT_Vector * extra_points2
Definition: ftgloadr.h:72
FT_GlyphLoader_CheckPoints
FT_GlyphLoader_CheckPoints(FT_GlyphLoader loader, FT_UInt n_points, FT_UInt n_contours)
Definition: ftgloadr.c:200