From: kramm Date: Mon, 16 Aug 2004 08:37:13 +0000 (+0000) Subject: added call to swf_SetLoadFontParameters() in order to set full_unicode X-Git-Tag: xpdf-1-01-latest~20 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=c4afc1bc9a91cee83287a150d08af9272dcfc3b2 added call to swf_SetLoadFontParameters() in order to set full_unicode to 1. --- diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 6ed1c31..2dc9f45 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1046,6 +1046,13 @@ int getCharID(SWFFONT *font, int charnr, char *charname, int u) return charnr; } + /* the following is technically wrong, and only works if the font encoding + is US-ASCII based. It's needed for fonts which return broken unicode + indices */ +/* if(charnr>=0 && charnrmaxascii && font->ascii2glyph[charnr]>=0) { + return font->ascii2glyph[charnr]; + }*/ + return -1; } @@ -1077,6 +1084,7 @@ void swfoutput_setfont(struct swfoutput*obj, char*fontid, char*filename) return; } + swf_SetLoadFontParameters(0,/*skip unused*/0,/*full unicode*/1); SWFFONT*swffont = swf_LoadFont(filename); if(swffont == 0) { @@ -1307,6 +1315,7 @@ static void endshape() tag = tag->prev; swf_DeleteTag(todel); } else { + /* TODO: fix bounding box */ tag = swf_InsertTag(tag,ST_PLACEOBJECT2); swf_ObjectPlace(tag,shapeid,/*depth*/depth++,NULL,NULL,NULL); }