ReactOS 0.4.16-dev-2357-g35d0dfe
ftgloadr.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * ftgloadr.h
4 *
5 * The FreeType glyph loader (specification).
6 *
7 * Copyright (C) 2002-2020 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 <freetype/freetype.h>
24
25
27
28
29 /**************************************************************************
30 *
31 * @struct:
32 * FT_GlyphLoader
33 *
34 * @description:
35 * The glyph loader is an internal object used to load several glyphs
36 * together (for example, in the case of composites).
37 */
38 typedef struct FT_SubGlyphRec_
39 {
45
47
48
49 typedef struct FT_GlyphLoadRec_
50 {
51 FT_Outline outline; /* outline */
52 FT_Vector* extra_points; /* extra points table */
53 FT_Vector* extra_points2; /* second extra points table */
54 FT_UInt num_subglyphs; /* number of subglyphs */
55 FT_SubGlyph subglyphs; /* subglyphs */
56
58
59
60 typedef struct FT_GlyphLoaderRec_
61 {
67
70
71 void* other; /* for possible future extension? */
72
74
75
76 /* create new empty glyph loader */
79 FT_GlyphLoader *aloader );
80
81 /* add an extra points table to a glyph loader */
84
85 /* destroy a glyph loader */
86 FT_BASE( void )
88
89 /* reset a glyph loader (frees everything int it) */
90 FT_BASE( void )
92
93 /* rewind a glyph loader */
94 FT_BASE( void )
96
97 /* check that there is enough space to add `n_points' and `n_contours' */
98 /* to the glyph loader */
101 FT_UInt n_points,
102 FT_UInt n_contours );
103
104
105#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
106 ( (_count) == 0 || \
107 ( (FT_UInt)(_loader)->base.outline.n_points + \
108 (FT_UInt)(_loader)->current.outline.n_points + \
109 (FT_UInt)(_count) ) <= (_loader)->max_points )
110
111#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
112 ( (_count) == 0 || \
113 ( (FT_UInt)(_loader)->base.outline.n_contours + \
114 (FT_UInt)(_loader)->current.outline.n_contours + \
115 (FT_UInt)(_count) ) <= (_loader)->max_contours )
116
117#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \
118 ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
119 FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
120 ? 0 \
121 : FT_GlyphLoader_CheckPoints( (_loader), \
122 (FT_UInt)(_points), \
123 (FT_UInt)(_contours) ) )
124
125
126 /* check that there is enough space to add `n_subs' sub-glyphs to */
127 /* a glyph loader */
130 FT_UInt n_subs );
131
132 /* prepare a glyph loader, i.e. empty the current glyph */
133 FT_BASE( void )
135
136 /* add the current glyph to the base glyph */
137 FT_BASE( void )
139
140
142
143#endif /* FTGLOADR_H_ */
144
145
146/* END */
#define FT_BASE(x)
FT_GlyphLoader_Add(FT_GlyphLoader loader)
Definition: ftgloadr.c:340
FT_GlyphLoader_CheckPoints(FT_GlyphLoader loader, FT_UInt n_points, FT_UInt n_contours)
Definition: ftgloadr.c:205
FT_GlyphLoader_CreateExtra(FT_GlyphLoader loader)
Definition: ftgloadr.c:166
FT_GlyphLoader_Rewind(FT_GlyphLoader loader)
Definition: ftgloadr.c:87
struct FT_GlyphLoadRec_ * FT_GlyphLoad
FT_GlyphLoader_Prepare(FT_GlyphLoader loader)
Definition: ftgloadr.c:324
FT_GlyphLoader_Done(FT_GlyphLoader loader)
Definition: ftgloadr.c:128
struct FT_GlyphLoaderRec_ FT_GlyphLoaderRec
FT_BEGIN_HEADER struct FT_SubGlyphRec_ FT_SubGlyphRec
FT_GlyphLoader_Reset(FT_GlyphLoader loader)
Definition: ftgloadr.c:105
struct FT_GlyphLoaderRec_ * FT_GlyphLoader
FT_GlyphLoader_New(FT_Memory memory, FT_GlyphLoader *aloader)
Definition: ftgloadr.c:69
struct FT_GlyphLoadRec_ FT_GlyphLoadRec
FT_GlyphLoader_CheckSubGlyphs(FT_GlyphLoader loader, FT_UInt n_subs)
Definition: ftgloadr.c:293
#define FT_END_HEADER
Definition: ftheader.h:57
#define FT_BEGIN_HEADER
Definition: ftheader.h:37
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
int FT_Error
Definition: fttypes.h:299
unsigned short FT_UShort
Definition: fttypes.h:209
unsigned int FT_UInt
Definition: fttypes.h:231
signed int FT_Int
Definition: fttypes.h:220
static char memory[1024 *256]
Definition: process.c:122
FT_SubGlyph subglyphs
Definition: ftgloadr.h:55
FT_Vector * extra_points2
Definition: ftgloadr.h:53
FT_UInt num_subglyphs
Definition: ftgloadr.h:54
FT_Vector * extra_points
Definition: ftgloadr.h:52
FT_Outline outline
Definition: ftgloadr.h:51
FT_GlyphLoadRec current
Definition: ftgloadr.h:69
FT_UInt max_subglyphs
Definition: ftgloadr.h:65
FT_Bool use_extra
Definition: ftgloadr.h:66
FT_UInt max_points
Definition: ftgloadr.h:63
FT_UInt max_contours
Definition: ftgloadr.h:64
FT_Memory memory
Definition: ftgloadr.h:62
FT_GlyphLoadRec base
Definition: ftgloadr.h:68
FT_Int arg2
Definition: ftgloadr.h:43
FT_UShort flags
Definition: ftgloadr.h:41
FT_Matrix transform
Definition: ftgloadr.h:44
FT_Int index
Definition: ftgloadr.h:40
FT_Int arg1
Definition: ftgloadr.h:42