ReactOS 0.4.15-dev-7704-gc07eb9f
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-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#ifndef FTGLOADR_H_
20#define FTGLOADR_H_
21
22
23#include <ft2build.h>
24#include FT_FREETYPE_H
25
26
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 typedef struct FT_SubGlyphRec_
40 {
46
48
49
50 typedef struct FT_GlyphLoadRec_
51 {
52 FT_Outline outline; /* outline */
53 FT_Vector* extra_points; /* extra points table */
54 FT_Vector* extra_points2; /* second extra points table */
55 FT_UInt num_subglyphs; /* number of subglyphs */
56 FT_SubGlyph subglyphs; /* subglyphs */
57
59
60
61 typedef struct FT_GlyphLoaderRec_
62 {
68
71
72 void* other; /* for possible future extension? */
73
75
76
77 /* create new empty glyph loader */
80 FT_GlyphLoader *aloader );
81
82 /* add an extra points table to a glyph loader */
85
86 /* destroy a glyph loader */
87 FT_BASE( void )
89
90 /* reset a glyph loader (frees everything int it) */
91 FT_BASE( void )
93
94 /* rewind a glyph loader */
95 FT_BASE( void )
97
98 /* check that there is enough space to add `n_points' and `n_contours' */
99 /* to the glyph loader */
102 FT_UInt n_points,
103 FT_UInt n_contours );
104
105
106#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
107 ( (_count) == 0 || \
108 ( (FT_UInt)(_loader)->base.outline.n_points + \
109 (FT_UInt)(_loader)->current.outline.n_points + \
110 (FT_UInt)(_count) ) <= (_loader)->max_points )
111
112#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
113 ( (_count) == 0 || \
114 ( (FT_UInt)(_loader)->base.outline.n_contours + \
115 (FT_UInt)(_loader)->current.outline.n_contours + \
116 (FT_UInt)(_count) ) <= (_loader)->max_contours )
117
118#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \
119 ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
120 FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
121 ? 0 \
122 : FT_GlyphLoader_CheckPoints( (_loader), \
123 (FT_UInt)(_points), \
124 (FT_UInt)(_contours) ) )
125
126
127 /* check that there is enough space to add `n_subs' sub-glyphs to */
128 /* a glyph loader */
131 FT_UInt n_subs );
132
133 /* prepare a glyph loader, i.e. empty the current glyph */
134 FT_BASE( void )
136
137 /* add the current glyph to the base glyph */
138 FT_BASE( void )
140
141 /* copy points from one glyph loader to another */
145
146 /* */
147
148
150
151#endif /* FTGLOADR_H_ */
152
153
154/* END */
#define FT_BASE(x)
Definition: ftconfig.h:408
FT_GlyphLoader_Add(FT_GlyphLoader loader)
Definition: ftgloadr.c:328
FT_GlyphLoader_CopyPoints(FT_GlyphLoader target, FT_GlyphLoader source)
Definition: ftgloadr.c:365
FT_GlyphLoader_CheckPoints(FT_GlyphLoader loader, FT_UInt n_points, FT_UInt n_contours)
Definition: ftgloadr.c:201
FT_GlyphLoader_CreateExtra(FT_GlyphLoader loader)
Definition: ftgloadr.c:166
FT_GlyphLoader_Rewind(FT_GlyphLoader loader)
Definition: ftgloadr.c:88
struct FT_GlyphLoadRec_ * FT_GlyphLoad
FT_GlyphLoader_Prepare(FT_GlyphLoader loader)
Definition: ftgloadr.c:312
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:70
struct FT_GlyphLoadRec_ FT_GlyphLoadRec
FT_GlyphLoader_CheckSubGlyphs(FT_GlyphLoader loader, FT_UInt n_subs)
Definition: ftgloadr.c:281
#define FT_END_HEADER
Definition: ftheader.h:54
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
int FT_Error
Definition: fttypes.h:300
unsigned short FT_UShort
Definition: fttypes.h:209
unsigned int FT_UInt
Definition: fttypes.h:231
signed int FT_Int
Definition: fttypes.h:220
GLenum target
Definition: glext.h:7315
static char memory[1024 *256]
Definition: process.c:116
FT_SubGlyph subglyphs
Definition: ftgloadr.h:56
FT_Vector * extra_points2
Definition: ftgloadr.h:54
FT_UInt num_subglyphs
Definition: ftgloadr.h:55
FT_Vector * extra_points
Definition: ftgloadr.h:53
FT_Outline outline
Definition: ftgloadr.h:52
FT_GlyphLoadRec current
Definition: ftgloadr.h:70
FT_UInt max_subglyphs
Definition: ftgloadr.h:66
FT_Bool use_extra
Definition: ftgloadr.h:67
FT_UInt max_points
Definition: ftgloadr.h:64
FT_UInt max_contours
Definition: ftgloadr.h:65
FT_Memory memory
Definition: ftgloadr.h:63
FT_GlyphLoadRec base
Definition: ftgloadr.h:69
FT_Int arg2
Definition: ftgloadr.h:44
FT_UShort flags
Definition: ftgloadr.h:42
FT_Matrix transform
Definition: ftgloadr.h:45
FT_Int index
Definition: ftgloadr.h:41
FT_Int arg1
Definition: ftgloadr.h:43