Back to index

texmacs  1.0.7.15
tt_glyf.h
Go to the documentation of this file.
00001 /*  $Header: /home/cvsroot/dvipdfmx/src/tt_glyf.h,v 1.1 2004/09/11 14:50:29 hirata Exp $
00002     
00003     This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
00004 
00005     Copyright (C) 2002 by Jin-Hwan Cho and Shunsaku Hirata,
00006     the dvipdfmx project team <dvipdfmx@project.ktug.or.kr>
00007     
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012     
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU General Public License for more details.
00017     
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00021 */
00022 
00023 #ifndef _TT_GLYF_H_
00024 #define _TT_GLYF_H_
00025 
00026 struct tt_glyph_desc
00027 {
00028   USHORT gid;
00029   USHORT ogid; /* GID in original font */
00030   USHORT advw, advh;
00031   SHORT  lsb, tsb;
00032   SHORT  llx, lly, urx, ury;
00033   ULONG  length;
00034   BYTE  *data;
00035 };
00036 
00037 struct tt_glyphs
00038 {
00039   USHORT num_glyphs;
00040   USHORT max_glyphs;
00041   USHORT last_gid;
00042   USHORT emsize;
00043   USHORT dw;           /* optimal value for DW */
00044   USHORT default_advh; /* default value */
00045   SHORT  default_tsb;  /* default value */
00046   struct tt_glyph_desc *gd;
00047   unsigned char *used_slot;
00048 };
00049 
00050 extern struct tt_glyphs *tt_build_init (void);
00051 extern void   tt_build_finish (struct tt_glyphs *g);
00052 
00053 extern USHORT tt_add_glyph  (struct tt_glyphs *g, USHORT gid, USHORT new_gid);
00054 extern USHORT tt_get_index  (struct tt_glyphs *g, USHORT gid);
00055 extern USHORT tt_find_glyph (struct tt_glyphs *g, USHORT gid);
00056 
00057 extern int    tt_build_tables (sfnt *sfont, struct tt_glyphs *g);
00058 extern int    tt_get_metrics  (sfnt *sfont, struct tt_glyphs *g);
00059 
00060 #endif /* _TT_GLYF_H_ */