| 1 |
/* tt_glyf.h |
| 2 |
|
| 3 |
Copyright 2002 by Jin-Hwan Cho and Shunsaku Hirata, |
| 4 |
the dvipdfmx project team <[email protected]> |
| 5 |
Copyright 2006-2008 Taco Hoekwater <[email protected]> |
| 6 |
|
| 7 |
This file is part of LuaTeX. |
| 8 |
|
| 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. |
| 13 |
|
| 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. |
| 18 |
|
| 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/>. */ |
| 21 |
|
| 22 |
|
| 23 |
#ifndef _TT_GLYF_H_ |
| 24 |
# define _TT_GLYF_H_ |
| 25 |
|
| 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; |
| 34 |
}; |
| 35 |
|
| 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; |
| 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, fd_entry * fd); |
| 56 |
extern int tt_get_metrics(sfnt * sfont, struct tt_glyphs *g); |
| 57 |
|
| 58 |
#endif /* _TT_GLYF_H_ */ |