Summary: | [testcase] Hyphen not rendered at soft-hyphen (­) linebreak | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Daniel Richard G. <skunk> |
Component: | khtml | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andresaule, finex, germain, james, karl, kde, lemma, pacchiarini |
Priority: | NOR | ||
Version: | 3.5 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Simple test case
Demo patch |
Description
Daniel Richard G.
2007-05-12 08:44:56 UTC
Created attachment 20545 [details]
Simple test case
For what it's worth, Opera handles this one correctly.
It's not a regression. It used to be handled as merely a hyphen. tested on konqueror 4 which correctly render the page. No hyphens shown on 3.5.9 or 4.0.3. Firefox 3 beta 5 shows hyphens. I can't reproduce this bug on 3.5.9, however trunk r799198 shows the reported misbehaviour. Still reproducible in r832239 (4.1 branch) 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. 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. 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. 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. 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.
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. 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 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 |