git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e0a7027
)
protect against broken fonts
author
kramm
<kramm>
Tue, 2 Dec 2008 17:09:37 +0000
(17:09 +0000)
committer
kramm
<kramm>
Tue, 2 Dec 2008 17:09:37 +0000
(17:09 +0000)
lib/pdf/InfoOutputDev.cc
patch
|
blob
|
history
diff --git
a/lib/pdf/InfoOutputDev.cc
b/lib/pdf/InfoOutputDev.cc
index
a10f4bd
..
d9336b2
100644
(file)
--- a/
lib/pdf/InfoOutputDev.cc
+++ b/
lib/pdf/InfoOutputDev.cc
@@
-165,8
+165,12
@@
void InfoOutputDev::updateFont(GfxState *state)
state->setFont(font, 1024.0);
splash->doUpdateFont(state);
currentfont->splash_font = splash->getCurrentFont();
state->setFont(font, 1024.0);
splash->doUpdateFont(state);
currentfont->splash_font = splash->getCurrentFont();
- currentfont->ascender = currentfont->splash_font->ascender;
- currentfont->descender = currentfont->splash_font->descender;
+ if(currentfont->splash_font) {
+ currentfont->ascender = currentfont->splash_font->ascender;
+ currentfont->descender = currentfont->splash_font->descender;
+ } else {
+ currentfont->ascender = currentfont->descender = 0;
+ }
free(id);
}
free(id);
}