source: branches/2.2/filemanager/tp/dompdf/lib/ttf2ufm/ttf2ufm-src/other/dmpf.c @ 3019

Revision 3019, 877 bytes checked in by amuller, 14 years ago (diff)

Ticket #1135 - Corrigindo CSS e adicionando filemanager

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