beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / font / tt_glyf.h
bloba16cfbc9f0535d5eede7711c4c71f0a64db79052
1 /* tt_glyf.h
3 Copyright 2002 by Jin-Hwan Cho and Shunsaku Hirata,
4 the dvipdfmx project team <dvipdfmx@project.ktug.or.kr>
5 Copyright 2006-2008 Taco Hoekwater <taco@luatex.org>
7 This file is part of LuaTeX.
9 LuaTeX is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 2 of the License, or (at your
12 option) any later version.
14 LuaTeX is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License along
20 with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
23 #ifndef _TT_GLYF_H_
24 # define _TT_GLYF_H_
26 struct tt_glyph_desc {
27 USHORT gid;
28 USHORT ogid; /* GID in original font */
29 USHORT advw, advh;
30 SHORT lsb, tsb;
31 SHORT llx, lly, urx, ury;
32 ULONG length;
33 BYTE *data;
36 struct tt_glyphs {
37 USHORT num_glyphs;
38 USHORT max_glyphs;
39 USHORT last_gid;
40 USHORT emsize;
41 USHORT dw; /* optimal value for DW */
42 USHORT default_advh; /* default value */
43 SHORT default_tsb; /* default value */
44 struct tt_glyph_desc *gd;
45 unsigned char *used_slot;
48 extern struct tt_glyphs *tt_build_init(void);
49 extern void tt_build_finish(struct tt_glyphs *g);
51 extern USHORT tt_add_glyph(struct tt_glyphs *g, USHORT gid, USHORT new_gid);
52 extern USHORT tt_get_index(struct tt_glyphs *g, USHORT gid);
53 extern USHORT tt_find_glyph(struct tt_glyphs *g, USHORT gid);
55 extern int tt_build_tables(sfnt * sfont, struct tt_glyphs *g);
56 extern int tt_get_metrics(sfnt * sfont, struct tt_glyphs *g);
58 #endif /* _TT_GLYF_H_ */