Hebrew in markup
Eli Zaretskii
eliz at gnu.org
Sun Apr 5 11:48:35 IDT 2015
> Date: Sun, 5 Apr 2015 11:20:41 +0300
> From: Dov Grobgeld <dov.grobgeld at gmail.com>
> Cc: "Nadav Har'El" <nyh at math.technion.ac.il>, Dotan Cohen <dotancohen at gmail.com>,
> linux-il <linux-il at cs.huji.ac.il>
>
> I admit that I have very little knowledge about how font selection and
> reordering logic works in emacs.
Font selection has absolutely no bearing on this discussion. The
visual order is decided based on the characters' properties, not on
how they will be drawn on the glass. For example, they will be
reordered even if they have no glyphs in any available font, or if you
set up a display table to, say, display Hebrew letters as upper-case
Latin letters.
As to reordering, it happens at display time. The mechanism that
generates data structures used to draw font glyphs on the screen
produces visual order from the logical order, so that those data
structures hold the text already reordered.
> One way of carrying out reordering of <h1>שלום!</h1> would be if the emacs
> major mode was be able to inject the FSI...PDI characters before the text is
> passed to the paragraph direction determining logic. Is this possible?
No. The logic that determines base paragraph direction is part of the
reordering code which produces visual order from logical order. That
code runs as part of redisplay, and examines only the text that is in
the buffer. So the FSI..PDI embeddings must be present in buffer text
to do what you want.
If something like what you want is required without changing buffer
text, there could be special text properties on some portions of
buffer text, that would be interpreted by the display code. But that
isn't implemented, mainly because no one expressed any special
interest in that, let alone presented a worked-out set of requirements
for it.
More information about the Linux-il
mailing list