FDK/Tools/Programs/makeotf/source/cb.c
/* Determine font type and convert font to CFF */
Determine font type and convert font to CFF
Determine font type and convert font to CFF
static char *psConvFont(cbCtx h, int flags, char *filename, int *psinfo, hotReadFontOverrides *fontOverrides)
	{
	int b0;
	int b1;
	char *FontName;
	fileOpen(&h->ps.file, h, filename, "rb");
	b0 = read1(h);
	b1 = read1(h);
	if (b0 == '%' && b1 == '!')
		h->ps.refill = CIDRefill;
	else if (b0 == 128 && b1 == 1)
		h->ps.refill = PFBRefill;
	else
		cbFatal(h, "unknown file type [%s]\n", filename);
	fileSeek(&h->ps.file, 0, SEEK_SET);
	h->ps.left = 0;
	FontName = hotReadFont(h->hot.ctx, flags, psinfo, fontOverrides);
	fileClose(&h->ps.file);
	return FontName;
	}
static char * psConvFont ( cbCtx h , int flags , char * filename , int * psinfo , hotReadFontOverrides * fontOverrides ) { int b0 ; int b1 ; char * FontName ; fileOpen ( & h -> ps . file , h , filename , " " ) ; b0 = read1 ( h ) ; b1 = read1 ( h ) ; if ( b0 == ' ' && b1 == ' ' ) h -> ps . refill = CIDRefill ; else if ( b0 == 128 && b1 == 1 ) h -> ps . refill = PFBRefill ; else cbFatal ( h , " \n " , filename ) ; fileSeek ( & h -> ps . file , 0 , SEEK_SET ) ; h -> ps . left = 0 ; FontName = hotReadFont ( h -> hot . ctx , flags , psinfo , fontOverrides ) ; fileClose ( & h -> ps . file ) ; return FontName ; }
Determine font type and convert font to CFF
Determine font type and convert font to CFF
/* Determine font file type */ /* CIDFont */ /* PFB */ /* Seek back to beginning */