From c4afc1bc9a91cee83287a150d08af9272dcfc3b2 Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 16 Aug 2004 08:37:13 +0000 Subject: [PATCH] added call to swf_SetLoadFontParameters() in order to set full_unicode to 1. --- pdf2swf/swfoutput.cc | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } -- 1.7.10.4