From bd77e840e2e8bffee0b4cfdb7b006219e823af99 Mon Sep 17 00:00:00 2001 From: kramm Date: Thu, 18 Oct 2001 17:52:09 +0000 Subject: [PATCH] swfoutput_setfont now takes the font id as parameter --- pdf2swf/SWFOutputDev.cc | 7 ++++--- pdf2swf/swfoutput.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index 766bd6b..7563762 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -562,7 +562,7 @@ void SWFOutputDev::beginString(GfxState *state, GString *s) state->getFontTransMat(&m11, &m12, &m21, &m22); m11 *= state->getHorizScaling(); m21 *= state->getHorizScaling(); - swfoutput_setfontmatrix(&output,m11,-m12,m21,-m22); + swfoutput_setfontmatrix(&output, m11, -m12, m21, -m22); } int charcounter = 0; @@ -789,7 +789,8 @@ void SWFOutputDev::updateStrokeColor(GfxState *state) (char)(rgb.b*255), (char)(opaq*255)); } -void SWFOutputDev::updateFont(GfxState *state) { +void SWFOutputDev::updateFont(GfxState *state) +{ double m11, m12, m21, m22; char * fontname = 0; GfxFont*gfxFont = state->getFont(); @@ -934,7 +935,7 @@ void SWFOutputDev::updateFont(GfxState *state) { } } - swfoutput_setfont(&output,t1id); + swfoutput_setfont(&output,gfxFont->getID().num,t1id); } void SWFOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, diff --git a/pdf2swf/swfoutput.h b/pdf2swf/swfoutput.h index 9792fd2..6583015 100644 --- a/pdf2swf/swfoutput.h +++ b/pdf2swf/swfoutput.h @@ -46,7 +46,7 @@ void swfoutput_setprotected(); //write PROTECT tag void swfoutput_newpage(struct swfoutput*); - int swfoutput_setfont(struct swfoutput*, int t1font); + int swfoutput_setfont(struct swfoutput*, int fontid, int t1font); void swfoutput_setdrawmode(struct swfoutput*, int drawmode); void swfoutput_setfillcolor(struct swfoutput*, unsigned char r, unsigned char g, unsigned char b, unsigned char a); void swfoutput_setstrokecolor(struct swfoutput*, unsigned char r, unsigned char g, unsigned char b, unsigned char a); -- 1.7.10.4