diff options
Diffstat (limited to 'showfond.c')
-rw-r--r-- | showfond.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -70,7 +70,7 @@ static FOND *BuildFondList(FILE *f,long rlistpos,int subcnt,long rdata_pos, int ch1, ch2; int i, j, k, l, ch, rlen, cnt; FOND *head=NULL, *cur; - long widoff, kernoff, styleoff, bboff, offsetstart; + long widoff, kernoff, styleoff, bboff, offsetstart, glyphenc; fseek(f,rlistpos,SEEK_SET); for ( i=0; i<subcnt; ++i ) { @@ -220,7 +220,7 @@ static FOND *BuildFondList(FILE *f,long rlistpos,int subcnt,long rdata_pos, if ( class&0x80 ) printf( " 0x80 No auto-condense\n" ); if ( class&0x100 ) printf( " 0x100 No auto-expand\n" ); if ( class&0x200 ) printf( " 0x200 Needs some other encoding scheme\n" ); - printf( " Glyph encoding offset: %d\n", getlong(f)); /* offset from start of table */ + printf( " Glyph encoding offset: %d\n", glyphenc = getlong(f)); /* offset from start of table */ /* reserved = */ getlong(f); /* 48 (byte) indeces into the name table */ printf( "Plain index is: %d\n", getc(f)); @@ -258,6 +258,18 @@ static FOND *BuildFondList(FILE *f,long rlistpos,int subcnt,long rdata_pos, /* then load that string, the bytes in the string tell you what */ /* other strings to concatenate to the base font name to get the */ /* PS fontname for this style */ + if ( glyphenc!=0 ) { + fseek(f,styleoff+glyphenc,SEEK_SET); + printf( "Postscript glyph-name cnt: %d\n", cnt = getushort(f)); + for ( l=1; l<=cnt; ++l ) { + printf( " Map encoding 0x%02x to '", getc(f)); + k = getc(f); + for ( j=0; j<k; ++j) + putchar(getc(f)); + putchar('\''); + putchar('\n'); + } + } } fseek(f,here,SEEK_SET); } |