bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22786: 25.1.50; eww arabic rendering


From: Eli Zaretskii
Subject: bug#22786: 25.1.50; eww arabic rendering
Date: Mon, 29 Feb 2016 17:37:22 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: mohamed.hibti@gmail.com,  22786@debbugs.gnu.org
> Date: Mon, 29 Feb 2016 15:35:54 +1100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > That paragraph is in a separate frame.  That frame could have a forced
> > left-to-right base direction.
> 
> I'm not sure what you mean by "frame" here.  DOM element?

Probably.  Forget it, I ws mistaken: there are no frames on that page.

> Anyway, I looked at the Wikipedia source again, and it specifies "ltr"
> as the direction.  And since shr respects those settings (now), perhaps
> we should just remove the hardcoded left-to-right default in eww now,
> and just let it be nil?  Then the aljazeera site would work
> automatically.
> 
> There might be pages that render less well, though, but we'd be
> following the Unicode recommendations (more)...

Removing the hardcoded value is probably a good idea (but maybe use it
as fallback if the HTML tag doesn't specify anything?).

However, note that support for this in shr is currently incomplete.
First, there's a 3rd value, "auto", which is unsupported -- it should
set bidi-paragraph-direction to nil.  Moreover, a document can use
several directives -- 'dir', 'bdi', and 'bdo' -- on the element level,
and that is entirely unsupported now.  What it means is that a page
that specifies special paragraph directions for some of its
paragraphs, and also mixes R2L and L2R text marked with 'bdi', will
not generally render correctly.

So I think for best results we should add support for the remaining
bidi directives.  Adding support for "dir=auto" in the HTML tag is
almost trivial.  To support the rest of the directives you need to add
bidirectional formatting control characters before and/or around the
text that is marked with these directives.  (If needed, I can provide
the details about the controls you need to insert in each case.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]