X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswftext.c;h=55fe65997651bd195048c8a5a561e9f9a30c96a9;hb=ea142ad9cabaf19232f5e18753e6b994a0226b45;hp=90e44cb385ee1e3766ec7ac6955d09fc214efe71;hpb=3b11b2e60fd1335bb81d9a55ec05d1d4cd2ad0b0;p=swftools.git diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index 90e44cb..55fe659 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -896,7 +896,7 @@ void swf_WriteFont(SWFFONT*font, char* filename) swf_FontSetDefine2(t,font); } - if(storeGlyphNames) + if(storeGlyphNames && font->glyphnames) { int c; t = swf_InsertTag(t,ST_GLYPHNAMES); @@ -1201,11 +1201,12 @@ void swf_DrawText(drawer_t*draw, SWFFONT*font, char*text) while(*s) { SHAPE*shape; SHAPE2*shape2; + SHAPELINE*l; U32 c = readUTF8char(&s); int g = font->ascii2glyph[c]; shape = font->glyph[g].shape; shape2 = swf_ShapeToShape2(shape); - SHAPELINE*l = shape2->lines; + l = shape2->lines; while(l) { if(l->type == moveTo) { FPOINT to;