sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
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-2025 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
23
#ifndef FTGLOADR_H_
24
#define FTGLOADR_H_
25
26
27
#include <
freetype/freetype.h
>
28
29
#include "
compiler-macros.h
"
30
31
FT_BEGIN_HEADER
32
33
34
/**************************************************************************
35
*
36
* @struct:
37
* FT_GlyphLoader
38
*
39
* @description:
40
* The glyph loader is an internal object used to load several glyphs
41
* together (for example, in the case of composites).
42
*/
43
typedef
struct
FT_SubGlyphRec_
44
{
45
FT_Int index;
46
FT_UShort flags;
47
FT_Int arg1;
48
FT_Int arg2;
49
FT_Matrix transform;
50
51
} FT_SubGlyphRec;
52
53
54
typedef
struct
FT_GlyphLoadRec_
55
{
56
FT_Outline outline;
/* outline */
57
FT_Vector* extra_points;
/* extra points table */
58
FT_Vector* extra_points2;
/* second extra points table */
59
FT_UInt num_subglyphs;
/* number of subglyphs */
60
FT_SubGlyph subglyphs;
/* subglyphs */
61
62
} FT_GlyphLoadRec, *FT_GlyphLoad;
63
64
65
typedef
struct
FT_GlyphLoaderRec_
66
{
67
FT_Memory memory;
68
FT_UInt max_points;
69
FT_UInt max_contours;
70
FT_UInt max_subglyphs;
71
FT_Bool use_extra;
72
73
FT_GlyphLoadRec base;
74
FT_GlyphLoadRec current;
75
76
void
* other;
/* for possible future extension? */
77
78
} FT_GlyphLoaderRec, *FT_GlyphLoader;
79
80
81
/* create new empty glyph loader */
82
FT_BASE( FT_Error )
83
FT_GlyphLoader_New( FT_Memory memory,
84
FT_GlyphLoader *aloader );
85
86
/* add an extra points table to a glyph loader */
87
FT_BASE( FT_Error )
88
FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader );
89
90
/* destroy a glyph loader */
91
FT_BASE(
void
)
92
FT_GlyphLoader_Done( FT_GlyphLoader loader );
93
94
/* reset a glyph loader (frees everything int it) */
95
FT_BASE(
void
)
96
FT_GlyphLoader_Reset( FT_GlyphLoader loader );
97
98
/* rewind a glyph loader */
99
FT_BASE(
void
)
100
FT_GlyphLoader_Rewind( FT_GlyphLoader loader );
101
102
/* check that there is enough space to add `n_points' and `n_contours' */
103
/* to the glyph loader */
104
FT_BASE( FT_Error )
105
FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
106
FT_UInt n_points,
107
FT_UInt n_contours );
108
109
110
#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
111
( (_count) == 0 || \
112
( (FT_UInt)(_loader)->base.outline.n_points + \
113
(FT_UInt)(_loader)->current.outline.n_points + \
114
(FT_UInt)(_count) ) <= (_loader)->max_points )
115
116
#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
117
( (_count) == 0 || \
118
( (FT_UInt)(_loader)->base.outline.n_contours + \
119
(FT_UInt)(_loader)->current.outline.n_contours + \
120
(FT_UInt)(_count) ) <= (_loader)->max_contours )
121
122
#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \
123
( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
124
FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
125
? 0 \
126
: FT_GlyphLoader_CheckPoints( (_loader), \
127
(FT_UInt)(_points), \
128
(FT_UInt)(_contours) ) )
129
130
131
/* check that there is enough space to add `n_subs' sub-glyphs to */
132
/* a glyph loader */
133
FT_BASE( FT_Error )
134
FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
135
FT_UInt n_subs );
136
137
/* prepare a glyph loader, i.e. empty the current glyph */
138
FT_BASE(
void
)
139
FT_GlyphLoader_Prepare( FT_GlyphLoader loader );
140
141
/* add the current glyph to the base glyph */
142
FT_BASE(
void
)
143
FT_GlyphLoader_Add( FT_GlyphLoader loader );
144
145
146
FT_END_HEADER
147
148
#endif
/* FTGLOADR_H_ */
149
150
151
/* END */
compiler-macros.h
freetype.h
FT_GlyphLoadRec_
Definition
ftgloadr.h:55
FT_GlyphLoaderRec_
Definition
ftgloadr.h:66
FT_SubGlyphRec_
Definition
ftgloadr.h:44
freetype
include
freetype
internal
ftgloadr.h
Generated by
1.18.0