From ce609b2766561441e5d59f31a48957330eeea932 Mon Sep 17 00:00:00 2001 From: kramm Date: Sat, 20 Oct 2001 19:00:28 +0000 Subject: [PATCH] removed the embedded cache, as the swfoutput font cache now does the job, too. --- pdf2swf/SWFOutputDev.cc | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index 17eecb2..bc0fadf 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -804,11 +804,6 @@ char*writeEmbeddedFontToFile(GfxFont*font) return fileName; } -int embeddedids[128]; -int embeddedt1ids[128]; -int embedded_mappos = 0; -int embedded_maxpos = 128; - char* gfxFontName(GfxFont* gfxFont) { GString *gstr; @@ -851,35 +846,20 @@ void SWFOutputDev::updateFont(GfxState *state) Ref embRef; GBool embedded = gfxFont->getEmbeddedFontID(&embRef); if(embedded) { - int t; - for(t=0;tis16Bit() && - (gfxFont->getType() == fontType1 || - gfxFont->getType() == fontType1C)) { - - fileName = writeEmbeddedFontToFile(gfxFont); - if(!fileName) - return ; - } - else { - showFontError(gfxFont,0); - return ; - } + if (!gfxFont->is16Bit() && + (gfxFont->getType() == fontType1 || + gfxFont->getType() == fontType1C)) { - t1id = T1_AddFont(fileName); - embeddedids[embedded_mappos] = embRef.num; - embeddedt1ids[embedded_mappos] = t1id; - if(embedded_mappos < embedded_maxpos-1) - embedded_mappos++; + fileName = writeEmbeddedFontToFile(gfxFont); + if(!fileName) + return ; } - else - { - t1id = embeddedt1ids[t]; + else { + showFontError(gfxFont,0); + return ; } + + t1id = T1_AddFont(fileName); } else { fontname = NULL; if(gfxFont->getName()) { -- 1.7.10.4