git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow a pdf file to have broken pages
[swftools.git]
/
lib
/
pdf
/
InfoOutputDev.h
diff --git
a/lib/pdf/InfoOutputDev.h
b/lib/pdf/InfoOutputDev.h
index
532e2ed
..
66958da
100644
(file)
--- a/
lib/pdf/InfoOutputDev.h
+++ b/
lib/pdf/InfoOutputDev.h
@@
-44,8
+44,10
@@
#include "../gfxdevice.h"
#include "../gfxtools.h"
#include "../gfxfont.h"
#include "../gfxdevice.h"
#include "../gfxtools.h"
#include "../gfxfont.h"
+#include "../q.h"
#define INTERNAL_FONT_SIZE 1024.0
#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
{
struct GlyphInfo
{
@@
-58,26
+60,35
@@
struct GlyphInfo
double advance_max;
};
double advance_max;
};
-struct FontInfo
+class FontInfo
{
{
- FontInfo();
+ gfxfont_t*gfxfont;
+
+ char*id;
+public:
+ FontInfo(char*id);
~FontInfo();
~FontInfo();
+ gfxfont_t* getGfxFont();
+
double lastx,lasty;
int lastchar;
double lastx,lasty;
int lastchar;
+ int lastadvance;
double ascender,descender;
void grow(int size);
double ascender,descender;
void grow(int size);
- gfxfont_t*gfxfont;
GfxFont*font;
double max_size;
int num_glyphs;
GlyphInfo**glyphs;
GfxFont*font;
double max_size;
int num_glyphs;
GlyphInfo**glyphs;
- int*charid2glyph;
+ dict_t**kerning;
+
SplashFont*splash_font;
char seen;
SplashFont*splash_font;
char seen;
+ int space_char;
+ float average_advance;
};
extern char*getFontID(GfxFont*font);
};
extern char*getFontID(GfxFont*font);
@@
-89,8
+100,6
@@
class InfoOutputDev: public OutputDev
GlyphInfo* currentglyph;
SplashOutputDev*splash;
GlyphInfo* currentglyph;
SplashOutputDev*splash;
- gfxfont_t* createGfxFont(GfxFont*xpdffont, FontInfo*src);
-
public:
int x1,y1,x2,y2;
int num_links;
public:
int x1,y1,x2,y2;
int num_links;
@@
-100,7
+109,7
@@
class InfoOutputDev: public OutputDev
int num_polygons;
int num_textfields;
int num_polygons;
int num_textfields;
- gfxfontlist_t*fonts;
+ void dumpfonts(gfxdevice_t*dev);
InfoOutputDev(XRef*xref);
virtual ~InfoOutputDev();
InfoOutputDev(XRef*xref);
virtual ~InfoOutputDev();
@@
-144,6
+153,7
@@
class InfoOutputDev: public OutputDev
Stream *maskStr,
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap);
Stream *maskStr,
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap);
+
virtual FontInfo* getFont(char*id);
};
virtual FontInfo* getFont(char*id);
};