1 /* Copyright (c) 1997-1998 by Juliusz Chroboczek */
5 struct TableDirectoryEntry *readDirectory (int fd, struct OffsetTable *ot);
6 char **readNamingTable (int fd);
7 void readHeadTable (int fd, struct HeadTable *ht);
8 int readPostTable (int fd, int nglyphs,
9 struct PostTable *pt, struct GlyphName **gnt);
10 int readMaxpTable (int fd);
11 void *readLocaTable (int fd, int nglyphs, int format);
12 struct Box *readGlyfTable (int fd, int nglyphs, int format, void *loca);
13 longHorMetric *readHmtxTable (int fd, int nummetrics);
14 struct HheaTable *readHheaTable (int fd);
15 int readKernTable (int fd, int **nke, struct KernEntry0 ***ke);
17 void printPSFont (FILE * out, struct HeadTable *ht,
18 char **strings, int nglyphs, int postType,
19 struct PostTable *pt, struct GlyphName *gnt, int fd);
21 void printPSHeader (FILE * out, struct HeadTable *ht,
22 char **strings, struct PostTable *pt);
23 void printPSData (FILE * out, int fd);
24 void printPSTrailer (FILE * out, int nglyphs,
25 int postType, struct GlyphName *gnt);
26 void printAFM (FILE * afm, struct HeadTable *ht,
27 char **strings, int nglyphs, int postType,
28 struct PostTable *pt, struct GlyphName *gnt,
29 struct Box *glyf, struct HheaTable *hhea, longHorMetric * hmtx,
30 int nkern, int *nke, struct KernEntry0 **ke);
31 void printAFMHeader (FILE * afm, struct HeadTable *ht,
32 char **strings, struct PostTable *pt);
33 void printAFMMetrics (FILE * afm, struct HeadTable *ht,
34 int nglyphs, int postType, struct GlyphName *gnt,
36 struct HheaTable *hhea, longHorMetric * hmtx);
37 void printOneAFMMetric (FILE * afm,
38 int index, int code, char *name,
41 struct HheaTable *hhea, longHorMetric * hmtx);
42 void printAFMKerning (FILE * afm, struct HeadTable *ht,
43 int postType, struct GlyphName *gnt,
44 int nkern, int *nke, struct KernEntry0 **ke);
46 extern char *macGlyphEncoding[];
47 extern char *adobeStandardEncoding[];
49 void *mymalloc (size_t size);
50 void *mycalloc (size_t nelem, size_t elsize);
51 void *myrealloc (void *ptr, size_t size);
52 void error (char *string);
53 void syserror (char *string);
54 ssize_t surely_read (int fildes, void *buf, size_t nbyte);
55 char *unistrncpy (char *dst, char *str, size_t length);
56 void fputpss (char *s, FILE * stream);
57 off_t surely_lseek (int fildes, off_t offset, int whence);
58 unsigned hash (char *string);
59 struct hashtable *make_hashtable (int size);
60 int puthash (struct hashtable *t, char *key, int value);
61 int gethash (struct hashtable *t, char *key);