summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Kjernaasen <trond@trolltech.com>2009-10-26 12:24:13 (GMT)
committerTrond Kjernaasen <trond@trolltech.com>2009-10-26 12:28:01 (GMT)
commit085a994122afc05b0e94c1d035cfcd6d82bdf136 (patch)
tree1a85ca5ec5ad7659baaa01c2b2d8e0e2e8231a66
parent27d4a7e457b1e40e7cd19a179d3d932b1618b4fa (diff)
downloadQt-085a994122afc05b0e94c1d035cfcd6d82bdf136.zip
Qt-085a994122afc05b0e94c1d035cfcd6d82bdf136.tar.gz
Qt-085a994122afc05b0e94c1d035cfcd6d82bdf136.tar.bz2
Fixed PDF generation for Windows.
Font names were not retrieved correctly after the QT_WA removal patch. The old code always used the GetTextOutlineA() API, except for WinCE, even when a Unicode compatible Windows platform was used. Reviewed-by: Kim
-rw-r--r--src/gui/text/qfontengine_win.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index fd34d0f..6c367ab 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -208,7 +208,7 @@ void QFontEngineWin::getCMap()
unitsPerEm = otm->otmEMSquare;
x_height = (int)otm->otmsXHeight;
loadKerningPairs(designToDevice);
- _faceId.filename = (char *)otm + (int)otm->otmpFullName;
+ _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFullName)).toLatin1();
lineWidth = otm->otmsUnderscoreSize;
fsType = otm->otmfsType;
free(otm);
@@ -987,8 +987,8 @@ QFontEngine::Properties QFontEngineWin::properties() const
Properties p;
p.emSquare = unitsPerEm;
p.italicAngle = otm->otmItalicAngle;
- p.postscriptName = (char *)otm + (int)otm->otmpFamilyName;
- p.postscriptName += (char *)otm + (int)otm->otmpStyleName;
+ p.postscriptName = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFamilyName)).toLatin1();
+ p.postscriptName += QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpStyleName)).toLatin1();
#ifndef QT_NO_PRINTER
p.postscriptName = QPdf::stripSpecialCharacters(p.postscriptName);
#endif
@@ -1110,7 +1110,7 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin
ih + 2 * margin + 4,
QNativeImage::systemFormat(), !qt_cleartype_enabled);
- /*If cleartype is enabled we use the standard system format even on Windows CE
+ /*If cleartype is enabled we use the standard system format even on Windows CE
and not the special textbuffer format we have to use if cleartype is disabled*/
ni->image.fill(0xffffffff);