]> git.donarmstrong.com Git - lilypond.git/blob - ttftool/include/proto.h
Added color names.
[lilypond.git] / ttftool / include / proto.h
1 /* Copyright (c) 1997-1998 by Juliusz Chroboczek */
2
3 struct TableDirectoryEntry *readDirectory (FILE *fd, struct OffsetTable *ot);
4 char **readNamingTable (FILE *fd);
5 void readHeadTable (FILE *fd, struct HeadTable *ht);
6 int readPostTable (FILE *fd, int nglyphs,
7                    struct PostTable *pt, struct GlyphName **gnt);
8 int readMaxpTable (FILE *fd);
9 void *readLocaTable (FILE *fd, int nglyphs, int format);
10 struct Box *readGlyfTable (FILE *fd, int nglyphs, int format, void *loca);
11 longHorMetric *readHmtxTable (FILE *fd, int nummetrics);
12 struct HheaTable *readHheaTable (FILE *fd);
13 int readKernTable (FILE *fd, int **nke, struct KernEntry0 ***ke);
14
15 void printPSFont (void * out, struct HeadTable *ht,
16                   char **strings, int nglyphs, int postType,
17                   struct PostTable *pt, struct GlyphName *gnt, FILE *fd);
18
19 void printPSHeader (void * out, struct HeadTable *ht,
20                     char **strings, struct PostTable *pt);
21 void printPSData (void * out, FILE *fd);
22 void printPSTrailer (void * out, int nglyphs,
23                      int postType, struct GlyphName *gnt);
24
25 void printAFM (FILE * afm, struct HeadTable *ht,
26                char **strings, int nglyphs, int postType,
27                struct PostTable *pt, struct GlyphName *gnt,
28                struct Box *glyf, struct HheaTable *hhea, longHorMetric * hmtx,
29                int nkern, int *nke, struct KernEntry0 **ke);
30 void printAFMHeader (FILE * afm, struct HeadTable *ht,
31                      char **strings, struct PostTable *pt);
32 void printAFMMetrics (FILE * afm, struct HeadTable *ht,
33                       int nglyphs, int postType, struct GlyphName *gnt,
34                       struct Box *bbox,
35                       struct HheaTable *hhea, longHorMetric * hmtx);
36 void printOneAFMMetric (FILE * afm,
37                         int index, int code, char *name,
38                         struct HeadTable *ht,
39                         struct Box *bbox,
40                         struct HheaTable *hhea, longHorMetric * hmtx);
41 void printAFMKerning (FILE * afm, struct HeadTable *ht,
42                       int postType, struct GlyphName *gnt,
43                       int nkern, int *nke, struct KernEntry0 **ke);
44
45 extern char *macGlyphEncoding[];
46 extern char *adobeStandardEncoding[];
47
48 void *mymalloc (size_t size);
49 void *mycalloc (size_t nelem, size_t elsize);
50 void *myrealloc (void *ptr, size_t size);
51 void ttf_error (char *string);
52 void syserror (char *string);
53 ssize_t surely_read (FILE *fildes, void *buf, size_t nbyte);
54 char *unistrncpy (char *dst, char *str, size_t length);
55 void fputpss (char *s, void * stream);
56 void surely_lseek (FILE *fildes, off_t offset, int whence);
57 unsigned hash (char *string);
58 struct hashtable *make_hashtable (int size);
59 int puthash (struct hashtable *t, char *key, int value);
60 int gethash (struct hashtable *t, char *key);
61
62 #ifdef TEST_TTFTOOL
63 #define lily_cookie_fclose fclose
64 #define lily_cookie_fprintf fprintf
65 #define lily_cookie_putc fputc
66 #else
67 #include "file-cookie.hh"
68 #endif