OSDN Git Service

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