Debian Codegraph @

texk/xdvipsk/otflib/tt_glyf.h

raw
1 /* This is xdvipsk, an eXtended version of dvips(k) by Tomas Rokicki.
2
3 Copyright (C) 2016 by VTeX Ltd (www.vtex.lt),
4 the xdvipsk project team - Sigitas Tolusis and Arunas Povilaitis.
5
6 Program original code copyright (C) 2007-2014 by Jin-Hwan Cho and
7 Shunsaku Hirata, the dvipdfmx project team.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
22 */
23
24 #ifndef _TT_GLYF_H_
25 #define _TT_GLYF_H_
26
27 struct tt_glyph_desc
28 {
29 USHORT gid;
30 USHORT ogid; /* GID in original font */
31 USHORT advw, advh;
32 SHORT lsb, tsb;
33 SHORT llx, lly, urx, ury;
34 ULONG length;
35 BYTE *data;
36 };
37
38 struct tt_glyphs
39 {
40 USHORT num_glyphs;
41 USHORT max_glyphs;
42 USHORT last_gid;
43 USHORT emsize;
44 USHORT dw; /* optimal value for DW */
45 USHORT default_advh; /* default value */
46 SHORT default_tsb; /* default value */
47 struct tt_glyph_desc *gd;
48 unsigned char *used_slot;
49 };
50
51 extern struct tt_glyphs *tt_build_init (void);
52 extern void tt_build_finish (struct tt_glyphs *g);
53
54 extern USHORT tt_add_glyph (struct tt_glyphs *g, USHORT gid, USHORT new_gid);
55 extern USHORT tt_get_index (struct tt_glyphs *g, USHORT gid);
56 extern USHORT tt_find_glyph (struct tt_glyphs *g, USHORT gid);
57
58 extern int tt_build_tables (sfnt *sfont, struct tt_glyphs *g);
59 extern int tt_get_metrics (sfnt *sfont, struct tt_glyphs *g);
60
61 #endif /* _TT_GLYF_H_ */