From: Matthias Kramm Date: Wed, 17 Mar 2010 23:14:36 +0000 (-0700) Subject: don't drop empty glyphs in poly2bitmap X-Git-Tag: version-0-9-1~82 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=297bdc42a1fa0988faed0e3281d5bbe6ed8c6f1e don't drop empty glyphs in poly2bitmap --- diff --git a/lib/pdf/BitmapOutputDev.cc b/lib/pdf/BitmapOutputDev.cc index 282b7d7..9db530e 100644 --- a/lib/pdf/BitmapOutputDev.cc +++ b/lib/pdf/BitmapOutputDev.cc @@ -1445,27 +1445,23 @@ void BitmapOutputDev::drawChar(GfxState *state, double x, double y, int x1 = (int)x, x2 = (int)x+1, y1 = (int)y, y2 = (int)y+1; SplashFont*font = clip0dev->getCurrentFont(); SplashPath*path = font?font->getGlyphPath(code):NULL; - - if(!path) { - if(code) - msg(" couldn't create outline for char %d", code); - return; - } x-=originX; y-=originY; - path->offset((SplashCoord)x, (SplashCoord)y); - int t; - for(t=0;tgetLength();t++) { - double xx,yy; - Guchar f; - path->getPoint(t,&xx,&yy,&f); - state->transform(xx,yy,&xx,&yy); - if(xx=x2) x2=(int)xx+1; - if(yy>=y2) y2=(int)yy+1; + if(path) { + path->offset((SplashCoord)x, (SplashCoord)y); + int t; + for(t=0;tgetLength();t++) { + double xx,yy; + Guchar f; + path->getPoint(t,&xx,&yy,&f); + state->transform(xx,yy,&xx,&yy); + if(xx=x2) x2=(int)xx+1; + if(yy>=y2) y2=(int)yy+1; + } + delete(path);path=0; } - delete(path);path=0; /* if this character is affected somehow by the various clippings (i.e., it looks different on a device without clipping), then draw it on the bitmap, not as