all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22786@debbugs.gnu.org, mohamed.hibti@gmail.com
Subject: bug#22786: 25.1.50; eww arabic rendering
Date: Tue, 01 Mar 2016 10:56:38 +1100	[thread overview]
Message-ID: <87bn6z5avd.fsf@gnus.org> (raw)
In-Reply-To: <83ziuj8r4d.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 29 Feb 2016 17:37:22 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

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

That's what it currently does.  I think I'm going to just have it
default to nil, and we'll see whether this makes things render badly in
practice.  My uninformed guess is that pages that mix scripts (like
Wikipedia) will explicitly say that the paragraph direction is
left-to-right, while pages with (mostly) only left-to-right (most pages)
and right-to-left (Al Jazeera) are the ones that leave out the spec, so
things should work out fine.

But we'll see.

> 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.

I've now added this to shr.

> 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.)

I think I remember the control characters from past discussions.  But is
the dir attribute used much in practice?  I've tried to be very, very
restrictive in what features I add to the common paths in shr.  It's
already slow enough, and each new line of code in the common paths add
some slow down.  It's death by a thousand cuts.  :-) I don't oppose
adding support for this if it's really used a lot in the wild, but if
not, I'd rather not.

(The "dir" attribute can apply to (almost) any HTML element, so the code
to detect and react to it would go into `shr-descend', which is called
once for every single HTML node in the document.)

However, adding support for the <bdi> and <bdo> elements should be
trivial, and will cause no slowdown, so I'll add them now...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2016-02-29 23:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 22:50 bug#22786: 25.1.50; eww arabic rendering Mohamed Hibti
2016-02-24  1:07 ` Lars Ingebrigtsen
2016-02-24 10:16   ` Mohamed Hibti
2016-02-24 17:37     ` Eli Zaretskii
2016-02-24 18:18       ` Mohamed Hibti
2016-02-24 18:24       ` Mohamed Hibti
2016-02-24 19:11         ` Eli Zaretskii
2016-02-25  5:35     ` Lars Ingebrigtsen
2016-02-25 11:08       ` Mohamed Hibti
2016-02-25 15:55       ` Eli Zaretskii
2016-02-26  5:45         ` Lars Ingebrigtsen
2016-02-26  8:59           ` Eli Zaretskii
2016-02-28  4:13             ` Lars Ingebrigtsen
2016-02-28 15:41               ` Eli Zaretskii
2016-02-28 16:07                 ` Eli Zaretskii
2016-02-29  2:34                   ` Lars Ingebrigtsen
2016-02-29  3:38                     ` Eli Zaretskii
2016-02-29  4:36                       ` Lars Ingebrigtsen
2016-02-29 15:38                         ` Eli Zaretskii
2016-03-01  0:31                           ` Lars Ingebrigtsen
2016-03-01  8:55                             ` Mohamed HIBTI
2016-02-29  2:33                 ` Lars Ingebrigtsen
2016-02-29  3:36                   ` Eli Zaretskii
2016-02-29  4:35                     ` Lars Ingebrigtsen
2016-02-29 15:37                       ` Eli Zaretskii
2016-02-29 23:56                         ` Lars Ingebrigtsen [this message]
2016-03-01 16:44                           ` Eli Zaretskii
2016-03-02 17:01                             ` Lars Ingebrigtsen
2016-03-02 19:33                               ` Eli Zaretskii
2016-03-01  0:26                         ` Lars Ingebrigtsen
2016-03-01 16:49                           ` Eli Zaretskii
2016-03-02 17:08                             ` Lars Ingebrigtsen
2016-03-02 19:38                               ` Eli Zaretskii
2016-03-03  5:38                                 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bn6z5avd.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=22786@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=mohamed.hibti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.