From 6d6d81bc572e98080d341ee57fc90913202695e4 Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 4 Nov 2001 21:46:02 +0000 Subject: [PATCH] write fontinfo tags --- pdf2swf/swfoutput.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 9624d2d..07969d9 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -27,6 +27,8 @@ extern "C" { #include "../lib/log.h" #include "../lib/rfxswf.h" } +#define standardEncodingSize 335 +extern char *standardEncodingNames[standardEncodingSize]; int opennewwindow=0; int ignoredraworder=0; @@ -601,6 +603,22 @@ SWFFont::~SWFFont() fill = lastfill; swf_ShapeSetEnd(ftag); } + ftag = swf_InsertTag(ftag,ST_DEFINEFONTINFO); + swf_SetU16(ftag, this->swfid); + swf_SetU8(ftag, strlen(this->fontid)); + swf_SetBlock(ftag, (U8*)this->fontid, strlen(this->fontid)); + swf_SetU8(ftag, 0); + for(t=0;tcharname[this->swfcharid2char[t]]; + for(s=0;s<256;s++) { + if(standardEncodingNames[s] && + !strcasecmp(name,standardEncodingNames[s])) + break; + } + swf_SetU8(ftag, (U8)s); + } } free(ptr); -- 1.7.10.4