Re: Proposal: Introduction of Neutral Override Character
Behdad Esfahbod <[email protected]>
| Newsgroups | gmane.comp.internationalization.fribidi |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 23 Jul 2004, Dov Grobgeld wrote:
> Hi Behdad,
Hello. Sorry for the delay.
> I agree that it makes sens to bump the embedding level by 2 for
> the NO character.
Oh, thinking again, that really makes things complicated. These
two characters are easier to describe, not to implement. Just
think about it yourself and you see what I mean...
> I just looked at the pango and gtk sources and they both find
> the base direction through a call to:
>
> pango_find_base_dir(char *text, int len)
>
> There would be no problem at all changing this to be a wrapper
> to fribidi_find_base_dir() (the wrapper is needed as Owen doesn't
> want to expose the fribidi API outside of pango). All this function
> does it to find the first strong character. It is trivial to change
> this to ignore characters between NO and PDF.
Yeah. The hard part now is to handle the character in NO/PDF and
NE/PDF...
> Btw, a related display problem that would be solved by the use of
> the NO/PDF pairs is within an HTML editor.
>
> Trying to achive the same thing through markup would be a lot
> messier.
The problem is that, more I think about it, more I believe that
it belongs to markup. Lets ask ourselve a question: should the
embedded paragraph get the direction from the parent paragraph or
find it's own direction? Should the direction from embedded
paragraph get propagated to parent paragraph if parent paragraph
is neutral otherwise? Questions like these form different
combinations that are all useful in one case or another.
Handling them using bidi marks is a nightmare, and definitely not
plain text.
CSS has something along the same lines:
http://www.w3.org/TR/CSS21/visuren.html#direction
but definitely with no auto-direction.
Hummm... We need to do this in plain text too, even if in Gtk+,
using markup is easier...
> I agree with you that NE is needed as well but has a different
> purpose. Within an HTML editor this might be used in parallel to
> "" within tags. E.g.
>
> SHE LOOKED LIKE {NO}<img src="her.jpg"
> alt="{NE}SHE IS PRETTY!{PDF}">{PDF}
>
> The question still remains how to get the editor to insert those
> marks...
Regular expressions really make it easy. Right now if we go on
and implement the stuff using Pango markup, doing this in
gtksourceview is not really hard. Wanna try? I believe that
using markup is easier in this case, since you don't need to
worry about "cursor positions" around your inserted characters!
> Regards,
> Dov
Lets continue and see what turns out.
--behdad
behdad.org