[Issue N32570] [Qt 3.2.x Regression] Text wrap madness
Ingo Klöcker
kloecker at kde.org
Tue Oct 14 15:23:23 BST 2003
On Tuesday 14 October 2003 13:44, qt-bugs at trolltech.com wrote:
> Hi Marc,
>
> On Tuesday, 07. Oct 2003 23:45 Marc Mutz wrote:
> > Hi!
> >
> > See http://bugs.kde.org/show_bug.cgi?id=63766
> >
> > Someone decided it might be cool to break lines not only at
> > whitespace,
> > but also at (certain?) non-alnum characters. You know, I could
> > _potentially_ understand wrapping lines after hyphens. But that
> > looks fishy already, since hyphens at the end of the line typically
> > are hyphenations, but here, they're not.
> >
> > But what happened to me yesterday is _so_ mad that I do think this
> > is a bug in the implementation or simply a feature that went
> > berzerk.
> >
> > Consider: foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> > foo C+
> > + foo foo foo foo
> >
> > What I did was to type "Consider: C++ foo foo foo foo", then went
> > back to just after the colon and added foo's until the C++ would be
> > pushed in the next line. But guess what? It's wrapped _inside_ the
> > word!
>
> The thing that happened was that we thought about following a
> recommendation of the Unicode consortium (see
> http://www.unicode.org/reports/tr14/). It tries to make a line
> breaking algorithm that is general purpose and works well for most
> languages. IMO they failed in this goal (but it was not until after
> the 3.2 release that I realized this).
>
> The algorithm however is a lot better than what we had for non latin
> languages, so the code is not as mad as you might think. I think I
> fixed more or less all of the issues with latin text now (see
> attached diff against 3.2.2).
I applied your patch and recompiled Qt. But, unless I've made a stupid
mistake, long URLs are still wordwrapped after '/' which is not
acceptable for a mail client. I didn't check whether long URLs are also
wrapped after other characters which are common used in URLs. In fact
no latin1 string which consists of characters between 0x33 and 0x7F
should ever be broken into two parts.
Regards,
Ingo
More information about the kde-core-devel
mailing list