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:
7564cb2
)
fonts with 0 characters were parsed incorrectly.
author
kramm
<kramm>
Thu, 6 Jun 2002 10:06:09 +0000
(10:06 +0000)
committer
kramm
<kramm>
Thu, 6 Jun 2002 10:06:09 +0000
(10:06 +0000)
lib/modules/swftext.c
patch
|
blob
|
history
diff --git
a/lib/modules/swftext.c
b/lib/modules/swftext.c
index
5ebe89f
..
28ebc15
100644
(file)
--- a/
lib/modules/swftext.c
+++ b/
lib/modules/swftext.c
@@
-208,11
+208,15
@@
int swf_FontExtract_DefineFont2(int id,SWFFONT * font,TAG * tag)
if(flags1&8) { // wide offsets
for(t=0;t<glyphcount;t++)
swf_GetU32(tag); //offset[t]
if(flags1&8) { // wide offsets
for(t=0;t<glyphcount;t++)
swf_GetU32(tag); //offset[t]
- swf_GetU32(tag); // fontcodeoffset
+
+ if(glyphcount) /* this _if_ is not in the specs */
+ swf_GetU32(tag); // fontcodeoffset
} else {
for(t=0;t<glyphcount;t++)
swf_GetU16(tag); //offset[t]
} else {
for(t=0;t<glyphcount;t++)
swf_GetU16(tag); //offset[t]
- swf_GetU16(tag); // fontcodeoffset
+
+ if(glyphcount) /* this _if_ is not in the specs */
+ swf_GetU16(tag); // fontcodeoffset
}
for(t=0;t<glyphcount;t++)
swf_GetSimpleShape(tag,&(font->glyph[t].shape));
}
for(t=0;t<glyphcount;t++)
swf_GetSimpleShape(tag,&(font->glyph[t].shape));
@@
-254,8
+258,10
@@
int swf_FontExtract_DefineFont2(int id,SWFFONT * font,TAG * tag)
swf_ResetReadBits(tag);
swf_GetRect(tag, font->layout->bounds);
}
swf_ResetReadBits(tag);
swf_GetRect(tag, font->layout->bounds);
}
+
kerningcount = swf_GetU16(tag);
font->layout->kerningcount = kerningcount;
kerningcount = swf_GetU16(tag);
font->layout->kerningcount = kerningcount;
+
font->layout->kerning = (SWFKERNING*)malloc(sizeof(SWFKERNING)*kerningcount);
if(kerningcount) {
font->layout->kerning =
font->layout->kerning = (SWFKERNING*)malloc(sizeof(SWFKERNING)*kerningcount);
if(kerningcount) {
font->layout->kerning =