[scribus-dev] RTL dropCap
fahad.alsaidi at gmail.com
Tue Aug 9 06:15:16 UTC 2016
Right now I am working on fixing RTL dropcap bug, the details here:
My finding as following:
I find from debugging in pageitem_textframe::layout():
in line 2741 when it adds a new line, it increase current.xPos with maximum
DropCap X (maxDX) if any. This applies only to lines after the line that
has DropCap letter.
This doesn't work for RTL text because dropcap letter is in the end of line
not in beginning ( The drawing text starts form left to right ). When we
break lines, we need to count (EndX - maxDX ) to set space for DropCap
However, I do that by adding:
if (style.direction() == ParagraphStyle::RTL && DropLinesCount >= 1)
EndX = current.endOfLine(m_availableRegion,
current.rightMargin + maxDX, regionMinY, regionMaxY);
and here a screen shot how the result looks like:
Now, there is a problem in DropLinesCount bigger than 1, unlike with mono
fonts, the characters are cramping and I didn't find why or how to fix it.
please see second text frame.
Any suggestion ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scribus-dev