r21218 by fschmid -
scribus-commit
scribus-commit at lists.scribus.net
Tue Apr 19 20:21:58 UTC 2016
Author: fschmid
Date: Tue Apr 19 20:21:58 2016
New Revision: 21218
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21218
Log:
Fixed Bug #8594: Image Drop Caps incorrectly format especially in second column, linked text frame
Inline Frames behave now as any other char when Drop Caps is applied to them
Modified:
trunk/Scribus/scribus/pageitem_textframe.cpp
trunk/Scribus/scribus/text/boxes.cpp
trunk/Scribus/scribus/text/boxes.h
trunk/Scribus/scribus/text/screenpainter.cpp
Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21218&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Tue Apr 19 20:21:58 2016
@@ -804,7 +804,10 @@
if (run.object())
{
result = new ObjectBox(run);
- result->setAscent(run.object()->height() - run.object()->lineWidth());
+ if (run.hasFlag(ScLayout_DropCap))
+ result->setAscent((run.object()->height() - run.object()->lineWidth()) * run.glyphs().first().scaleV - run.glyphs().first().yoffset);
+ else
+ result->setAscent(run.object()->height() - run.object()->lineWidth());
result->setDescent(0);
}
else
@@ -1757,10 +1760,12 @@
if (itemHeight == 0)
itemHeight = font.height(style.charStyle().fontSize() / 10.0);
asce = currentObject->height() + currentObject->lineWidth();
+ wide = currentObject->width() + currentObject->lineWidth();
realAsce = calculateLineSpacing (style, this) * DropLines;
firstGlyph.scaleH /= firstGlyph.scaleV;
firstGlyph.scaleV = (realAsce / itemHeight);
firstGlyph.scaleH *= firstGlyph.scaleV;
+ wide *= firstGlyph.scaleH;
}
else
{
Modified: trunk/Scribus/scribus/text/boxes.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21218&path=/trunk/Scribus/scribus/text/boxes.cpp
==============================================================================
--- trunk/Scribus/scribus/text/boxes.cpp (original)
+++ trunk/Scribus/scribus/text/boxes.cpp Tue Apr 19 20:21:58 2016
@@ -655,7 +655,10 @@
const CharStyle& charStyle = style();
p->translate(x(), y() - ascent());
- p->setScale(charStyle.scaleH() / 1000.0, charStyle.scaleV() / 1000.0);
+ if (m_glyphRun.hasFlag(ScLayout_DropCap))
+ p->setScale(m_glyphRun.glyphs().first().scaleH, m_glyphRun.glyphs().first().scaleV);
+ else
+ p->setScale(charStyle.scaleH() / 1000.0, charStyle.scaleV() / 1000.0);
p->setMatrix(m_matrix);
m_item->setXPos(m_item->gXpos);
Modified: trunk/Scribus/scribus/text/boxes.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21218&path=/trunk/Scribus/scribus/text/boxes.h
==============================================================================
--- trunk/Scribus/scribus/text/boxes.h (original)
+++ trunk/Scribus/scribus/text/boxes.h Tue Apr 19 20:21:58 2016
@@ -245,7 +245,7 @@
const CharStyle& style() const { return m_glyphRun.style(); }
-private:
+protected:
GlyphRun m_glyphRun;
const StyleFlag m_effects;
};
Modified: trunk/Scribus/scribus/text/screenpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21218&path=/trunk/Scribus/scribus/text/screenpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/text/screenpainter.cpp (original)
+++ trunk/Scribus/scribus/text/screenpainter.cpp Tue Apr 19 20:21:58 2016
@@ -282,14 +282,14 @@
case PageItem::Line:
case PageItem::PolyLine:
case PageItem::Spiral:
- embedded->m_lineWidth = pws * qMin(scaleH(), scaleV());
+ // embedded->m_lineWidth = pws * qMin(scaleH(), scaleV());
embedded->DrawObj_Item(m_painter, cullingArea);
break;
default:
break;
}
- embedded->m_lineWidth = pws * qMin(scaleH(), scaleV());
+// embedded->m_lineWidth = pws * qMin(scaleH(), scaleV());
embedded->DrawObj_Post(m_painter);
embedded->m_lineWidth = pws;
More information about the scribus-commit
mailing list