| 1 |
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. |
| 2 |
|
| 3 |
Copyright (C) 2002-2020 by Jin-Hwan Cho and Shunsaku Hirata, |
| 4 |
the dvipdfmx project team. |
| 5 |
|
| 6 |
This program is free software; you can redistribute it and/or modify |
| 7 |
it under the terms of the GNU General Public License as published by |
| 8 |
the Free Software Foundation; either version 2 of the License, or |
| 9 |
(at your option) any later version. |
| 10 |
|
| 11 |
This program is distributed in the hope that it will be useful, |
| 12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
GNU General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with this program; if not, write to the Free Software |
| 18 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
| 19 |
*/ |
| 20 |
|
| 21 |
#ifndef _TT_GLYF_H_ |
| 22 |
#define _TT_GLYF_H_ |
| 23 |
|
| 24 |
struct tt_glyph_desc |
| 25 |
{ |
| 26 |
USHORT gid; |
| 27 |
USHORT ogid; /* GID in original font */ |
| 28 |
USHORT advw, advh; |
| 29 |
SHORT lsb, tsb; |
| 30 |
SHORT llx, lly, urx, ury; |
| 31 |
ULONG length; |
| 32 |
BYTE *data; |
| 33 |
}; |
| 34 |
|
| 35 |
struct tt_glyphs |
| 36 |
{ |
| 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; |
| 46 |
}; |
| 47 |
|
| 48 |
extern struct tt_glyphs *tt_build_init (void); |
| 49 |
extern void tt_build_finish (struct tt_glyphs *g); |
| 50 |
|
| 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); |
| 54 |
|
| 55 |
extern int tt_build_tables (sfnt *sfont, struct tt_glyphs *g); |
| 56 |
extern int tt_get_metrics (sfnt *sfont, struct tt_glyphs *g); |
| 57 |
|
| 58 |
#endif /* _TT_GLYF_H_ */ |