Strange linebreaking when long hyphenated words appear in table cells
The attached file demonstrates the problem. The test in the first paragraph easily linebreaks to fit the width of the window because of the potential linebreaks after each hyphen. The same text inside of a table cell forces the cell to be almost as wide as the unbroken text, although some line breaking does happen. My guess is that Dillo calculates the minimum width of the table cell without accounting for potential linebreaks after hyphens in the text. However, when it later fills the cell with the text it does allow linebreaks after hyphens. If that is correct then I think Dillo should account for potential linebreaks after hyphens both when calculating the minimum width of the cell and when filling the cell with text. The current situation is inconsistent and can deliver very poor results. Regards, Jeremy Henty
On Fr, Nov 14, 2014, Jeremy Henty wrote:
The attached file demonstrates the problem. The test in the first paragraph easily linebreaks to fit the width of the window because of the potential linebreaks after each hyphen. The same text inside of a table cell forces the cell to be almost as wide as the unbroken text, although some line breaking does happen.
My guess is that Dillo calculates the minimum width of the table cell without accounting for potential linebreaks after hyphens in the text. However, when it later fills the cell with the text it does allow linebreaks after hyphens.
This is correct. There are several reasons for ignoring hyphenation (both implicit and explicit, as here) when calculating the minimal width. First, it would make hyphenation of all words necessary, not (as now) the ones around feasible line breaks. Furthermore, there are problems with layout tables (altough becoming more and more extinct); there has been some discussion on this list, IIRC.
If that is correct then I think Dillo should account for potential linebreaks after hyphens both when calculating the minimum width of the cell
See above.
and when filling the cell with text.
This is actually done, as you see. The long "aaaaa-aaaaa-..." is broken, within the width which has been calculated before for the table cell width.
The current situation is inconsistent and can deliver very poor results.
Changing one of the above (minimal width, or hyphenation within table cells) will probably do more harm than good, so I'd leave it as it is, unless there are really severe reasons, as real-world web pages which are unreadable. Sebastian
participants (2)
-
onepoint@starurchin.org
-
sgeerken@dillo.org