Hi Jorge, On Wed, Sep 05, 2012 at 02:30:32PM -0300, Jorge Arellano Cid wrote:
On Tue, Sep 04, 2012 at 08:55:19PM +0200, Johannes Hofmann wrote:
On Tue, Sep 04, 2012 at 06:46:30PM +0200, Sebastian Geerken wrote:
On Tue, Sep 04, Johannes Hofmann wrote:
On Tue, Sep 04, 2012 at 02:36:29PM +0200, Sebastian Geerken wrote:
I'm mostly finished with cleaning up the calculation of extremes (used for tables). This should already work now, please test it again.
Just pushed some more changes; should be complete now. Please test thoroughly.
Several sites I visit don't trigger hyphenation because they lack the "lang" attribute. I'm experimenting with a very simple language guess routine, to get an idea of how it could help in this regard.
@Johannes, This function samples text from the parser, and it may fall anywhere on the CSS tree. How can I set it for the HTML element so it is inherited from there?
Fancy! Unfortunately you probabely only know the language of an element, after you've seen text from it. That's too late. You would need to do the setNonCssHint() before the first call to getStyle() on that element. So basically you would need to somehow remember the language for each element and then reload and set the appropriate language for the element - but I agree that that's not really elegant.
I've tried:
html->styleEngine->setNonCssHint( PROPERTY_X_LANG, CSS_TYPE_STRING, html->lang);
which seems to set it for the current element only.
and
html->styleEngine->restyle ();
with no good result.
Yeah, I fear restyle() does not what you need here. For now we could simply expose x-lang to the css parser, so you can at least set a reasonable default (e.g. body { x-lang:"en" } )in your ~/.dillo/style.css (see attached patch against dillo_hyphenation). Cheers, Johannes