1
/***************************************************************************/
5
/* The FreeType glyph loader (specification). */
7
/* Copyright 2002, 2003 by */
8
/* David Turner, Robert Wilhelm, and Werner Lemberg */
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. */
16
/***************************************************************************/
19
#ifndef __FTGLOADR_H__
20
#define __FTGLOADR_H__
24
#include FT_FREETYPE_H
30
/*************************************************************************/
36
/* The glyph loader is an internal object used to load several glyphs */
37
/* together (for example, in the case of composites). */
40
/* The glyph loader implementation is not part of the high-level API, */
41
/* hence the forward structure declaration. */
43
typedef struct FT_GlyphLoaderRec_* FT_GlyphLoader ;
46
#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1
47
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2
48
#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4
49
#define FT_SUBGLYPH_FLAG_SCALE 8
50
#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40
51
#define FT_SUBGLYPH_FLAG_2X2 0x80
52
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200
55
typedef struct FT_SubGlyphRec_
66
typedef struct FT_GlyphLoadRec_
68
FT_Outline outline; /* outline */
69
FT_Vector* extra_points; /* extra points table */
70
FT_UInt num_subglyphs; /* number of subglyphs */
71
FT_SubGlyph subglyphs; /* subglyphs */
73
} FT_GlyphLoadRec, *FT_GlyphLoad;
76
typedef struct FT_GlyphLoaderRec_
81
FT_UInt max_subglyphs;
85
FT_GlyphLoadRec current;
87
void* other; /* for possible future extension? */
92
/* create new empty glyph loader */
94
FT_GlyphLoader_New( FT_Memory memory,
95
FT_GlyphLoader *aloader );
97
/* add an extra points table to a glyph loader */
99
FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader );
101
/* destroy a glyph loader */
103
FT_GlyphLoader_Done( FT_GlyphLoader loader );
105
/* reset a glyph loader (frees everything int it) */
107
FT_GlyphLoader_Reset( FT_GlyphLoader loader );
109
/* rewind a glyph loader */
111
FT_GlyphLoader_Rewind( FT_GlyphLoader loader );
113
/* check that there is enough space to add `n_points' and `n_contours' */
114
/* to the glyph loader */
116
FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
118
FT_UInt n_contours );
120
/* check that there is enough space to add `n_subs' sub-glyphs to */
123
FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
126
/* prepare a glyph loader, i.e. empty the current glyph */
128
FT_GlyphLoader_Prepare( FT_GlyphLoader loader );
130
/* add the current glyph to the base glyph */
132
FT_GlyphLoader_Add( FT_GlyphLoader loader );
134
/* copy points from one glyph loader to another */
136
FT_GlyphLoader_CopyPoints( FT_GlyphLoader target,
137
FT_GlyphLoader source );
144
#endif /* __FTGLOADR_H__ */