r21586 by jghali - fix display issue with automatic hyphens on Windows
scribus-commit
scribus-commit at lists.scribus.net
Mon Dec 5 13:07:53 UTC 2016
Author: jghali
Date: Mon Dec 5 13:07:53 2016
New Revision: 21586
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21586
Log:
fix display issue with automatic hyphens on Windows
Modified:
trunk/Scribus/scribus/scpainter.cpp
trunk/Scribus/scribus/scpainter.h
trunk/Scribus/scribus/text/screenpainter.cpp
Modified: trunk/Scribus/scribus/scpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21586&path=/trunk/Scribus/scribus/scpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/scpainter.cpp (original)
+++ trunk/Scribus/scribus/scpainter.cpp Mon Dec 5 13:07:53 2016
@@ -1772,7 +1772,7 @@
cairo_set_antialias(m_cr, CAIRO_ANTIALIAS_DEFAULT);
}
-void ScPainter::setupPolygon(FPointArray *points, bool closed)
+void ScPainter::setupPolygon(const FPointArray *points, bool closed)
{
bool nPath = true;
bool first = true;
@@ -1814,7 +1814,7 @@
cairo_close_path( m_cr );
}
-void ScPainter::setupSharpPolygon(FPointArray *points, bool closed)
+void ScPainter::setupSharpPolygon(const FPointArray *points, bool closed)
{
bool nPath = true;
bool first = true;
Modified: trunk/Scribus/scribus/scpainter.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21586&path=/trunk/Scribus/scribus/scpainter.h
==============================================================================
--- trunk/Scribus/scribus/scpainter.h (original)
+++ trunk/Scribus/scribus/scpainter.h Mon Dec 5 13:07:53 2016
@@ -89,8 +89,8 @@
virtual void setClipPath();
virtual void drawImage( QImage *image);
- virtual void setupPolygon(FPointArray *points, bool closed = true);
- virtual void setupSharpPolygon(FPointArray *points, bool closed = true);
+ virtual void setupPolygon(const FPointArray *points, bool closed = true);
+ virtual void setupSharpPolygon(const FPointArray *points, bool closed = true);
virtual void sharpLineHelper(FPoint &pp);
virtual void sharpLineHelper(QPointF &pp);
virtual void drawPolygon();
Modified: trunk/Scribus/scribus/text/screenpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21586&path=/trunk/Scribus/scribus/text/screenpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/text/screenpainter.cpp (original)
+++ trunk/Scribus/scribus/text/screenpainter.cpp Mon Dec 5 13:07:53 2016
@@ -217,11 +217,17 @@
double scaleH = gc.scaleH() * fontSize() / 10.0;
double scaleV = gc.scaleV() * fontSize() / 10.0;
m_painter->scale(scaleH, scaleV);
+
QVector<FPointArray> outlines = gc.glyphClusterOutline();
- foreach (FPointArray outline, outlines) {
+ 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->setupPolygon(&outline, true);
if (outline.size() > 3)
m_painter->fillPath();
+ m_painter->translate(gl.xadvance, 0);
}
}
m_painter->setFillRule(fr);
More information about the scribus-commit
mailing list