Bug 145335 - [testcase] Hyphen not rendered at soft-hyphen (­) linebreak
Summary: [testcase] Hyphen not rendered at soft-hyphen (­) linebreak
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 3.5
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
Depends on:
Reported: 2007-05-12 08:44 UTC by Daniel Richard G.
Modified: 2009-05-23 04:57 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:

Simple test case (1.05 KB, text/html)
2007-05-12 08:48 UTC, Daniel Richard G.
Demo patch (1.33 KB, patch)
2009-04-11 15:06 UTC, Allan Sandfeld

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Richard G. 2007-05-12 08:44:56 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Compiled From Sources
OS:                Linux

Konqueror is correctly breaking lines at ­ when necessary. However, when it breaks the line in two, it is not rendering the required hyphen at the end of the first one.

I've reviewed the past bug reports relating to soft hyphenation, and am assuming this to be a regression, as it appears to have been working correctly in the past.
Comment 1 Daniel Richard G. 2007-05-12 08:48:59 UTC
Created attachment 20545 [details]
Simple test case

For what it's worth, Opera handles this one correctly.
Comment 2 Maksim Orlovich 2007-05-12 15:30:11 UTC
It's not a regression. It used to be handled as merely a hyphen.
Comment 3 FiNeX 2008-04-21 12:22:00 UTC
tested on konqueror 4 which correctly render the page.
Comment 4 James Spahlinger 2008-04-23 00:27:08 UTC
No hyphens shown on 3.5.9 or 4.0.3. Firefox 3 beta 5 shows hyphens.
Comment 5 Michael Leupold 2008-04-23 00:52:51 UTC
I can't reproduce this bug on 3.5.9, however trunk r799198 shows the reported misbehaviour.
Comment 6 Michael Leupold 2008-07-16 13:25:53 UTC
Still reproducible in r832239 (4.1 branch)
Comment 7 Karl Ove Hufthammer 2008-08-12 18:37:26 UTC
Still reproducible in latest KDE 4.1 branch.

This is a very serious bug for languages that use long compound words (such as German and Norwegian), which need soft hyphens to properly display these words in narrow columns.
Comment 8 Karl Ove Hufthammer 2008-08-12 18:41:11 UTC
FYI: Bug #33855 apparently had fixed this for KDE 3, with a backport from WebCore, but this fix seems to have been lost in KDE 4.
Comment 9 Andres 2009-01-22 20:17:50 UTC
The bug exists in Konqueror 4.1.3 KDE for Windows and Konqueror 4.0.4 on OpenSUSE 11 for VMWare. In both cases, Konqueror breaks the lines but does not show the hyphen sign. (Serious bug for the Estonian language.)

In Konqueror 3.5.5 on OpenSUSE 10.2 for VMWare, the soft hyphens are rendered correctly.
Comment 10 Allan Sandfeld 2009-04-11 15:03:41 UTC
The Qt4 painter does not draw soft-hyphens, so we need to replace shown soft-hyphens with ordinary hyphens before sending the string to Qt.

OTOH we could also simplify the code now, since we don't need to cut blocks of text around soft-hyphens to hide them.
Comment 11 Allan Sandfeld 2009-04-11 15:06:32 UTC
Created attachment 32760 [details]
Demo patch

A patch demonstrating the solution.

Note that it is not a real patch since it only handles all ordinary cases.
Comment 12 Germain Garand 2009-05-22 06:36:18 UTC
Thanks for the hint Allan ; it's simpler however to keep the soft-hyphen cutting code, because it ensures any soft-hyphen found at end of a run handed to Font::drawText is indeed intended to be rendered.
Comment 13 Germain Garand 2009-05-22 06:43:41 UTC
SVN commit 971237 by ggarand:

adapt to change in soft-hyphen rendering strategy in Qt 4
diagnosed by Allan.

BUG: 145335

 M  +4 -2      bidi.cpp  
 M  +4 -0      font.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=971237
Comment 14 Germain Garand 2009-05-23 04:57:51 UTC
SVN commit 971657 by ggarand:

automatically merged revision 971237:
adapt to change in soft-hyphen rendering strategy in Qt 4
diagnosed by Allan.

BUG: 145335

 M  +4 -2      bidi.cpp  
 M  +4 -0      font.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=971657