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 (parent:
7c32d87
)
fixed text extraction if the font doesn't have a (working) glyph2ascii
author
kramm
<kramm>
Wed, 7 Dec 2005 19:41:32 +0000
(19:41 +0000)
committer
kramm
<kramm>
Wed, 7 Dec 2005 19:41:32 +0000
(19:41 +0000)
src/swfdump.c
patch
|
blob
|
history
diff --git
a/src/swfdump.c
b/src/swfdump.c
index
a74c453
..
5da07fc
100644
(file)
--- a/
src/swfdump.c
+++ b/
src/swfdump.c
@@
-275,8
+275,12
@@
void textcallback(void*self, int*glyphs, int*ypos, int nr, int fontid, int fonts
if(glyphs[t] >= fonts[font]->numchars /*glyph is in range*/
|| !fonts[font]->glyph2ascii /* font has ascii<->glyph mapping */
) a = glyphs[t];
if(glyphs[t] >= fonts[font]->numchars /*glyph is in range*/
|| !fonts[font]->glyph2ascii /* font has ascii<->glyph mapping */
) a = glyphs[t];
- else
- a = fonts[font]->glyph2ascii[glyphs[t]];
+ else {
+ if(fonts[font]->glyph2ascii[glyphs[t]])
+ a = fonts[font]->glyph2ascii[glyphs[t]];
+ else
+ a = glyphs[t];
+ }
} else {
a = glyphs[t];
}
} else {
a = glyphs[t];
}