X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=lib%2Fxpdf%2FGFXOutputDev.cc;h=cddffd2218b9dfc9328ba1866f8beedcf110deee;hb=b76b027984afbadc9e060477a783a4d71f426298;hp=c412a8db6dc66104a61e6d37c0d1182718219d49;hpb=7698e805046e0f7c99813b916df2539408fdad4f;p=swftools.git diff --git a/lib/xpdf/GFXOutputDev.cc b/lib/xpdf/GFXOutputDev.cc index c412a8d..cddffd2 100644 --- a/lib/xpdf/GFXOutputDev.cc +++ b/lib/xpdf/GFXOutputDev.cc @@ -253,8 +253,9 @@ static char*getFontName(GfxFont*font) Ref*r=font->getID(); sprintf(buf, "UFONT%d", r->num); fontid = strdup(buf); + } else { + fontid = strdup(fname); } - fontid = strdup(fname); char*fontname= 0; char* plus = strchr(fontid, '+'); @@ -1716,6 +1717,10 @@ int GFXOutputDev::setGfxFont(char*id, char*name, char*filename, double maxSize) msg(" Loading %s...", filename); font = gfxfont_load(id, filename, quality); + if(!font) { + msg(" Couldn't load Font %s (%s)", filename, id); + return 0; + } msg(" Font %s (%s) loaded successfully", filename, id); l = new fontlist_t; @@ -2218,8 +2223,6 @@ void GFXOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool inlineImg) { - if(states[statepos].textRender & 4) //clipped - return; msg(" drawImageMask %dx%d, invert=%d inline=%d", width, height, invert, inlineImg); drawGeneralImage(state,ref,str,width,height,0,invert,inlineImg,1, 0, 0,0,0,0, 0); } @@ -2228,9 +2231,6 @@ void GFXOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg) { - if(states[statepos].textRender & 4) //clipped - return; - msg(" drawImage %dx%d, %s, %s, inline=%d", width, height, colorMap?"colorMap":"no colorMap", maskColors?"maskColors":"no maskColors", @@ -2247,9 +2247,6 @@ void GFXOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert) { - if(states[statepos].textRender & 4) //clipped - return; - msg(" drawMaskedImage %dx%d, %s, %dx%d mask", width, height, colorMap?"colorMap":"no colorMap", maskWidth, maskHeight); @@ -2266,9 +2263,6 @@ void GFXOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap) { - if(states[statepos].textRender & 4) //clipped - return; - msg(" drawSoftMaskedImage %dx%d, %s, %dx%d mask", width, height, colorMap?"colorMap":"no colorMap", maskWidth, maskHeight);