From: theAdib Date: Tue, 26 Dec 2006 13:53:56 +0000 (+0000) Subject: fix for [ 1597605 ] Fontnames containing spaces are incorrectly written to PS X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e846aa16c518e90fb7844a8e871cabf5f24a1500;p=inkscape.git fix for [ 1597605 ] Fontnames containing spaces are incorrectly written to PS --- diff --git a/src/extension/internal/ps.cpp b/src/extension/internal/ps.cpp index ea446afea..dc03e142a 100644 --- a/src/extension/internal/ps.cpp +++ b/src/extension/internal/ps.cpp @@ -69,6 +69,7 @@ #include #include #include + using namespace std; namespace Inkscape { @@ -1335,10 +1336,16 @@ PrintPS::text(Inkscape::Extension::Print *mod, char const *text, NR::Point p, "definefont} def\n"; // create the new font and leave it on the stack, define the proc _newlatin1font_proc_defined = true; } - os << "/" << fn << "-ISOLatin1 /" << fn << " newlatin1font\n"; + if(strchr(fn, ' ') == NULL) + os << "/" << fn << "-ISOLatin1 /" << fn << " newlatin1font\n"; + else + os << "(/" << fn << "-ISOLatin1) (/" << fn << ") newlatin1font\n"; _latin1_encoded_fonts.insert(fn); } else - os << "/" << fn << "-ISOLatin1 findfont\n"; + if(strchr(fn, ' ') == NULL) + os << "/" << fn << "-ISOLatin1 findfont\n"; + else + os << "(/" << fn << "-ISOLatin1) findfont\n"; } os << style->font_size.computed << " scalefont\n"; os << "setfont\n";