[GSoC] Character border, 6. week

Zolnai Tamás zolnaitamas2000 at gmail.com
Mon Jul 29 03:09:53 PDT 2013


Hi all,

   The previous week I don't make the progress that I planed, but learnt a
lot about the character attributes, font construction and portion handling.
So I say this week was useful.

   The most time of the week I spent with border merging, which makes
neighbouring text portions' border connected, when they has same border and
same height, even if they have different font. This problem was make me to
look through the whole working flow of character attributes, from attribute
sets and stacks to building portions.
    Finally I use SwAttrIter, which constructs the font from the character
attributes and makes enable it for other codes. This solution is useful
because text portions are handled by different classes (painting ->
SwTxtPainter, size -> SwTxtFormatter, text cursor -> SwTxtCursor) and the
only connection point of them is the generated font. On the other hand,
line break makes distinct text portions with same underlining character
attributes, so I have to solve this case in an other way.

Besides this I fix two bugs connected to the code, which I look into :
1, Text cursor skipped the last character of the line, so when user click
into the right margin than the cursor were placed before the last character
and not after it. In general the last character is a space and that's why
this is skipped, but there are some extreme case (e.g. link, long word in a
short line) when no reason to skip the last character.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=c8b4ffc2adcc744c0d7d5e68944439238828692b
2. Drop caps background were shifted upward. This bug is really visible for
example with Q letter, because this letter have big part hanging into the
descender area.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=1f47b46959267a25195d4f3f5602ca638bb14c58

Best Regards,
Tamás
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130729/18e4827b/attachment.html>


More information about the LibreOffice mailing list