PHP Classes
elePHPant
Icontem

File: application/libraries/dompdf/lib/ttf2ufm/src/other/dmpf.c

Recommend this page to a friend!
  Classes of harold rita  >  PHP Thesis Proposal Hub  >  application/libraries/dompdf/lib/ttf2ufm/src/other/dmpf.c  >  Download  
File: application/libraries/dompdf/lib/ttf2ufm/src/other/dmpf.c
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Thesis Proposal Hub
Store and publish research thesis documents
Author: By
Last change:
Date: 1 year ago
Size: 877 bytes
 

 

Contents

Class file image Download
/*
 * 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\n", 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\n", chr, chr,
			isprint(chr) ? chr : ' ');
		printmap(stdout);
		resetmap();
	}

	printf("All done!\n");
}