r21710 by jghali - fix subscript/superscript display issue on Windows
scribus-commit
scribus-commit at lists.scribus.net
Sun Jan 8 15:26:27 UTC 2017
Author: jghali
Date: Sun Jan 8 15:26:27 2017
New Revision: 21710
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21710
Log:
fix subscript/superscript display issue on Windows
Modified:
trunk/Scribus/scribus/text/screenpainter.cpp
Modified: trunk/Scribus/scribus/text/screenpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21710&path=/trunk/Scribus/scribus/text/screenpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/text/screenpainter.cpp (original)
+++ trunk/Scribus/scribus/text/screenpainter.cpp Sun Jan 8 15:26:27 2017
@@ -213,23 +213,21 @@
}
else
{
- m_painter->translate(0, -(fontSize() * gc.scaleV()));
double sizeFactor = fontSize() / 10.0;
- double scaleH = gc.scaleH() * sizeFactor;
- double scaleV = gc.scaleV() * sizeFactor;
- m_painter->scale(scaleH, scaleV);
-
QVector<FPointArray> outlines = gc.glyphClusterOutline();
const QList<GlyphLayout>& glyphs = gc.glyphs();
for (int i = 0; i < glyphs.count(); ++i)
{
const FPointArray& outline = outlines.at(i);
const GlyphLayout& gl = glyphs.at(i);
- m_painter->translate(gl.xoffset / sizeFactor, 0);
+ m_painter->save();
+ m_painter->translate(gl.xoffset, - (fontSize() * gl.scaleV) + gl.yoffset);
+ m_painter->scale(gl.scaleH * sizeFactor, gl.scaleV * sizeFactor);
m_painter->setupPolygon(&outline, true);
if (outline.size() > 3)
m_painter->fillPath();
- m_painter->translate(gl.xadvance - gl.xoffset / sizeFactor, 0);
+ m_painter->restore();
+ m_painter->translate(gl.xadvance, 0.0);
}
}
m_painter->setFillRule(fr);
More information about the scribus-commit
mailing list