Blame view
sources/3rdparty/phpdocx/pdf/lib/ttf2ufm/src/other/dmpf.c
877 Bytes
|
31b7f2792
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
/*
* see COPYRIGHT
*/
#include <stdio.h>
#include <ctype.h>
#include "t1lib.h"
/*
* Dump a rasterizarion of the font at small size
*/
#define PROGNAME "dmpf"
#include "bmpfont.h"
main(ac, av)
int ac;
char **av;
{
int fontid1, fontid2;
GLYPH *g1, *g2;
int chr, size, diff, offset;
if(ac!=2) {
fprintf(stderr,"Use: %s font
", PROGNAME);
exit(1);
}
chkneg(T1_SetBitmapPad(MYPAD));
chkneg(T1_InitLib(NO_LOGFILE|IGNORE_CONFIGFILE|IGNORE_FONTDATABASE));
chkneg(fontid1=T1_AddFont(av[1]));
resetmap();
for(chr=0; chr<256; chr++) {
for(size=MAXSIZE; size>=MINSIZE; size--) {
chknull( g1=T1_CopyGlyph(T1_SetChar( fontid1, chr, (float)size, NULL)) );
drawglyf(size, g1);
chkneg(T1_FreeGlyph(g1));
}
printf("*** Glyph %d==0x%x %c
", chr, chr,
isprint(chr) ? chr : ' ');
printmap(stdout);
resetmap();
}
printf("All done!
");
}
|