X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fswfoutput.cc;h=f84ebee32795b465c8875141bffa4fe1095f857d;hb=00d2709df63c37a3467c36f6090a6ea5e449bb6b;hp=2353efe8aa416bf371ab988a5238052163806c13;hpb=ff6eab9880aba3d04d852cfa5b7cef01895db124;p=swftools.git diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 2353efe..f84ebee 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -519,7 +519,9 @@ SWFFont::SWFFont(char*name, int id, char*filename) outline = (T1_OUTLINE**)malloc(t*sizeof(T1_OUTLINE*)); charname = (char**)malloc(t*sizeof(char*)); - memset(charname, t*sizeof(char*), 0); + width = (int*)malloc(t*sizeof(int)); + memset(width, 0, t*sizeof(int)); + memset(charname, 0, t*sizeof(char*)); used = (char*)malloc(t*sizeof(char)); char2swfcharid = (U16*)malloc(t*2); swfcharid2char = (U16*)malloc(t*2); @@ -554,6 +556,7 @@ SWFFont::SWFFont(char*name, int id, char*filename) for(s=0;soutline[outlinepos] = T1_CopyOutline(T1_GetCharOutline(id, s, 100.0, 0)); + this->width[outlinepos] = T1_GetCharWidth(id, s); this->charname[outlinepos] = strdup(T1_GetCharName(id, s)); outlinepos++; } @@ -645,6 +648,7 @@ SWFFont::~SWFFont() for(t=0;t