X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2FInfoOutputDev.h;h=04e98f71ac28ea3d8f3860adcbf60b6b5b5cb658;hb=3d7393729761993b7d7e1d8db602560d339adac2;hp=532e2edc6bb9a600c0980247571bf8409ae63b5e;hpb=5f1e7e9ebbac00effaae0545c32fe9060215d125;p=swftools.git diff --git a/lib/pdf/InfoOutputDev.h b/lib/pdf/InfoOutputDev.h index 532e2ed..04e98f7 100644 --- a/lib/pdf/InfoOutputDev.h +++ b/lib/pdf/InfoOutputDev.h @@ -46,6 +46,7 @@ #include "../gfxfont.h" #define INTERNAL_FONT_SIZE 1024.0 +#define GLYPH_IS_SPACE(g) ((!(g)->line || ((g)->line->type==gfx_moveTo && !(g)->line->next)) && (g)->advance) struct GlyphInfo { @@ -58,11 +59,17 @@ struct GlyphInfo double advance_max; }; -struct FontInfo +class FontInfo { - FontInfo(); + gfxfont_t*gfxfont; + + char*id; +public: + FontInfo(char*id); ~FontInfo(); + gfxfont_t* getGfxFont(); + double lastx,lasty; int lastchar; @@ -70,7 +77,6 @@ struct FontInfo void grow(int size); - gfxfont_t*gfxfont; GfxFont*font; double max_size; int num_glyphs; @@ -78,6 +84,7 @@ struct FontInfo int*charid2glyph; SplashFont*splash_font; char seen; + int space_char; }; extern char*getFontID(GfxFont*font); @@ -89,8 +96,6 @@ class InfoOutputDev: public OutputDev GlyphInfo* currentglyph; SplashOutputDev*splash; - gfxfont_t* createGfxFont(GfxFont*xpdffont, FontInfo*src); - public: int x1,y1,x2,y2; int num_links; @@ -100,7 +105,8 @@ class InfoOutputDev: public OutputDev int num_polygons; int num_textfields; - gfxfontlist_t*fonts; + void finish(); + void dumpfonts(gfxdevice_t*dev); InfoOutputDev(XRef*xref); virtual ~InfoOutputDev(); @@ -144,6 +150,7 @@ class InfoOutputDev: public OutputDev Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap); + virtual FontInfo* getFont(char*id); };