Re: Strange linebreaking when long hyphenated words appear in table cells

"Sebastian Geerken" <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
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

_______________________________________________
Dillo-dev mailing list
[email protected]
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
signature.asc (application/pgp-signature, 490 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJUbH+6AAoJEAw7+YHB+ZL6UQkIALBc5YGCQOaa+HDmohlGgaL7
B3ENpJt+Xvpq5Hjr6rp/2gn6ovBtRNFSzJiTqKHbS3eDxHOrFa3EmYijlNrJ83+n
gyFHFBYl0N2ECnXfyAeQJmdHOUev9cf6Zakqs8ur2hs0lnbmlco23HfbIlH0EJMZ
M6/OyjP1yzbzCfcv8ngY/a6VZpdwIHK9Gd9w9P2NCq1CUOUDR7tpnXrlXrwftW6V
Ahdve4JGc5lWMioUEiasfVcey0StMsJ9sEWhXZN7As7gN71ifzPqad0LS25UbzAI
cn9iNk1danKrS8THAhPRg7GhpMXFFPQo5+aT1L+7lkXhQwwJXI/7HQvLfcin2Lk=
=Mmi/
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.