[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-bidi] mirroring of glyphs
From: |
Eli Zaretskii |
Subject: |
Re: [emacs-bidi] mirroring of glyphs |
Date: |
Fri, 16 Nov 2001 11:49:58 +0200 |
> From: Alex Schroeder <address@hidden>
> Date: Thu, 15 Nov 2001 21:57:40 +0100
>
> "Eli Zaretskii" <address@hidden> writes:
>
> > Not at this time, but the table you need is very short; see the file
> > BidiMirroring.txt in the Unicode data base.
>
> I just found it a few minutes ago. :) What would be an appropriate
> data structure for this information? I don't think the
> category-tables are appropriate. I guess I'll just keep the data in a
> list for the moment (140 elements).
The actual length is much less, about 100, since those marked
"[BEST FIT]" should not be used, IMHO.
Here's the C implementation, for your entertainment. It only supports
ASCII characters (since most of the others aren't supported by Mule
yet anyway).
int
bidi_mirror_char (int c)
{
static const char mirrored_pairs[] = "()<>[]{}";
const char *p = strchr (mirrored_pairs, c);
if (p)
{
size_t i = p - mirrored_pairs;
if ((i & 1) == 0)
return mirrored_pairs[i + 1];
else
return mirrored_pairs[i - 1];
}
return c;
}
- Re: [emacs-bidi] debugging visual-to-logical, (continued)
- Re: [emacs-bidi] mirroring of glyphs, Behdad Esfahbod, 2001/11/19
- Re: [emacs-bidi] mirroring of glyphs, Eli Zaretskii, 2001/11/20
- Re: [emacs-bidi] mirroring of glyphs, Roozbeh Pournader, 2001/11/20
- Re: [emacs-bidi] mirroring of glyphs, Behdad Esfahbod, 2001/11/20
- Re: [emacs-bidi] mirroring of glyphs, Eli Zaretskii, 2001/11/20
- Re: [emacs-bidi] mirroring of glyphs, Behdad Esfahbod, 2001/11/20
- Re: [emacs-bidi] mirroring of glyphs,
Eli Zaretskii <=
- Re: [emacs-bidi] mirroring of glyphs, Ehud Karni, 2001/11/16
- Re: [emacs-bidi] mirroring of glyphs, Eli Zaretskii, 2001/11/17
- Re: [emacs-bidi] mirroring of glyphs, Alex Schroeder, 2001/11/17
- Re: [emacs-bidi] mirroring of glyphs, Eli Zaretskii, 2001/11/17
- Re: [emacs-bidi] testing bidi.el with the pgba tests, Alex Schroeder, 2001/11/15
- Re: [emacs-bidi] Where do I start?, Alex Schroeder, 2001/11/15
- Re: [emacs-bidi] Where do I start?, Behdad Esfahbod, 2001/11/19
- Re: [emacs-bidi] Where do I start?, Alex Schroeder, 2001/11/19