/* config */
static double caplinewidth = 3.0;
static int zoom = 72; /* xpdf: 86 */
+static int forceType0Fonts = 0;
static void printInfoString(Dict *infoDict, char *key, char *fmt);
static void printInfoDate(Dict *infoDict, char *key, char *fmt);
}
void SWFOutputDev::getDimensions(int*x1,int*y1,int*x2,int*y2)
{
- return swfoutput_getdimensions(&output, x1,y2,x2,y2);
+ return swfoutput_getdimensions(&output, x1,y1,x2,y2);
}
static char*getFontID(GfxFont*font)
}
#ifdef XPDF_101
Type1CFontFile *cvt = new Type1CFontFile(fontBuf, fontLen);
+ if(!cvt) return 0;
cvt->convertToType1(f);
#else
FoFiType1C *cvt = FoFiType1C::make(fontBuf, fontLen);
+ if(!cvt) return 0;
cvt->convertToType1(NULL, gTrue, FoFiWrite, f);
#endif
//cvt->convertToCIDType0("test", f);
fontname = "Times-Roman";
}
filename = searchFont(fontname);
+ if(!filename) {
+ msg("<error> Couldn't find font %s- did you install the default fonts?");
+ return 0;
+ }
if(substitutepos>=sizeof(substitutesource)/sizeof(char*)) {
msg("<fatal> Too many fonts in file.");
if(embedded &&
(gfxFont->getType() == fontType1 ||
gfxFont->getType() == fontType1C ||
- //gfxFont->getType() == fontCIDType0C ||
+ (gfxFont->getType() == fontCIDType0C && forceType0Fonts) ||
gfxFont->getType() == fontTrueType ||
gfxFont->getType() == fontCIDType2
))
caplinewidth = atof(value);
} else if(!strcmp(name, "zoom")) {
zoom = atoi(value);
+ } else if(!strcmp(name, "forceType0Fonts")) {
+ forceType0Fonts = atoi(value);
} else if(!strcmp(name, "fontdir")) {
pdfswf_addfontdir(value);
} else if(!strcmp(name, "languagedir")) {