summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpdf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qpdf.cpp')
-rw-r--r--src/gui/painting/qpdf.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 86f176bc99..02f9be197f 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1561,6 +1561,7 @@ void QPdfEnginePrivate::embedFont(QFontSubset *font)
int toUnicode = requestObject();
QFontEngine::Properties properties = font->fontEngine->properties();
+ QByteArray postscriptName = properties.postscriptName.replace(' ', '_');
{
qreal scale = 1000/properties.emSquare.toReal();
@@ -1574,7 +1575,7 @@ void QPdfEnginePrivate::embedFont(QFontSubset *font)
s << (char)('A' + (tag % 26));
tag /= 26;
}
- s << '+' << properties.postscriptName << "\n"
+ s << '+' << postscriptName << "\n"
"/Flags " << 4 << "\n"
"/FontBBox ["
<< properties.boundingBox.x()*scale
@@ -1617,7 +1618,7 @@ void QPdfEnginePrivate::embedFont(QFontSubset *font)
QPdf::ByteStream s(&cid);
s << "<< /Type /Font\n"
"/Subtype /CIDFontType2\n"
- "/BaseFont /" << properties.postscriptName << "\n"
+ "/BaseFont /" << postscriptName << "\n"
"/CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >>\n"
"/FontDescriptor " << fontDescriptor << "0 R\n"
"/CIDToGIDMap /Identity\n"
@@ -1641,7 +1642,7 @@ void QPdfEnginePrivate::embedFont(QFontSubset *font)
QPdf::ByteStream s(&font);
s << "<< /Type /Font\n"
"/Subtype /Type0\n"
- "/BaseFont /" << properties.postscriptName << "\n"
+ "/BaseFont /" << postscriptName << "\n"
"/Encoding /Identity-H\n"
"/DescendantFonts [" << cidfont << "0 R]\n"
"/ToUnicode " << toUnicode << "0 R"