summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/ps.cpp
diff options
context:
space:
mode:
authortheAdib <theAdib@users.sourceforge.net>2006-12-26 13:53:56 +0000
committertheAdib <theAdib@users.sourceforge.net>2006-12-26 13:53:56 +0000
commit22d2a59301288368bedcb987c8419d2bff847e1e (patch)
tree2d5cd88e6e02c00709b7859d929a80e65dad1374 /src/extension/internal/ps.cpp
parentincluded inkview into new win32 build system btool (diff)
downloadinkscape-22d2a59301288368bedcb987c8419d2bff847e1e.tar.gz
inkscape-22d2a59301288368bedcb987c8419d2bff847e1e.zip
fix for [ 1597605 ] Fontnames containing spaces are incorrectly written to PS
(bzr r2103)
Diffstat (limited to 'src/extension/internal/ps.cpp')
-rw-r--r--src/extension/internal/ps.cpp11
1 files changed, 9 insertions, 2 deletions
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 <string>
#include <iostream>
#include <fstream>
+
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";