https://bugs.freedesktop.org/show_bug.cgi?id=57652
Priority: medium
Bug ID: 57652
Assignee: [email protected]
Summary: Wrong treatment of Zero-width Word Joiner in line
breaking algorithm
Severity: normal
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: All
Status: UNCONFIRMED
Version: unspecified
Component: Writer
Product: LibreOffice
Created attachment 70734
--> https://bugs.freedesktop.org/attachment.cgi?id=70734&action=edit
Improper handling of u+2060 in line breaking algorithm
There is a discussion whether NBSP, u+00a0, should have elastic width in full
justification mode in Writer. The most significant voices vote for keeping it
rather fixed, for compatibility with some popular third-party software.
However, lack of elastic nonbreaking space in continuous justified text remains
a problem in many DTP tasks.
Instead of changing the current behaviour of the u+00a0 character, it may be
considerable to use u+2060 plus u+0020 (zero-width-word-joiner plus ordinary
space). Unfortunately, the algorithm currently implemented for placing line
breaks inside a paragraph does not cover correctly this situation.
If in the attached file one tries to add some spaces to the second line (no
matter: inside or out of a word, except the the first word), it will result in
moving additional material from the third line back to the second. That's
surprising, since line breaks (in line-by-line mode algorithm) should allow for
maximal filllling of a row.
That means, that using ZWJ-s paradoxally disturbs the normal process of
calculating free place inside a row. After removing ZWJs from the text, the
line-break points behave as usually.
This is probably because the usage of u+2060 character is considered only in
the final stage of the algorithm loop, and does not take into account the
possibility of succeeding space.
See i18npool/source/breakiterator/breakiterator_unicode.cxx file in the source
tree, method BreakIterator_Unicode::getLineBreak(), lines 405--420.
The problem is weel-know for me for years, and has been discussed many times at
users forums.
It would be also mentioned, that if once the line-break algorithm needs to be
revised, it may be worth to improve it in other ways, see e.g. adding full
paragraph-level justification -- see
https://bugs.freedesktop.org/show_bug.cgi?id=38159.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs