BidiMirrored property and ancient scripts (Was Re: Plain text custom fraction input)
frederic.grosshans at gmail.com
Fri Jul 24 04:59:23 CDT 2015
Le 23/07/2015 20:42, Richard Wordingham a écrit :
> On Thu, 23 Jul 2015 12:00:06 +0200
> Frédéric Grosshans <frederic.grosshans at gmail.com> wrote:
>> Le 23/07/2015 00:54, Richard Wordingham a écrit :
>>> Which means that Ancient Egyptian hieroglyphs are unencoded! Their
>>> default direction is right-to-left, but that's only the start of the
>>> trouble. The encoded hieroglyphs aren't Bidi-mirrored, so if I
>>> embed then in a right-to-left override, I should get retrograde
>> The text of the standard say that they should be mirrored in this
>> case. The version 7.0.0. has the following comment on Egyptian
>> hieroglyphs : (p424, p9 of pdf) :
>> “When left-to-right directionality is overridden to display
>> Egyptian hieroglyphic text right to left, the glyphs should be
>> mirrored from those shown in the code charts.”
> The UCD may trump the core specification; I'm expecting to be advised
> not to trust anything in the core specification.
Would I be wrong in saying that “which trumps which ?” is a short term
question. However, in the long term,
a disgareement between the UCD and the core specification is either a
bug to be corrected or a misunderstanding to be clarified.
>> Similar comments are present for other historic script (Italic,
>> Runic), but also Old North Arabian, which is encoded as RTL but
>> “Glyphs may be mirrored in lines whenthey have left-to-right
>> directionality”. This kind of implementation at the font level is
>> perfectly possible and is indeed done sometimes (see e.g. Andrew
>> West’s anglo-saxon runic fonts
>> The BidiMirrored property is not adapted in this case because, it is
>> for a few “characters such as parentheses” (Unicode8.0.0, §4.7
>> p180=pf 23 of ch04.pdf), and it is thought for a LTR default : it can
>> in no way consider the case of Old North Arabian.
> There had been hope until today.
Well there is still hope, if the BidiMirrored property is amended or
supplemented with another mechanism. What I meant is “The current Y/N
values of BidiMirrored cannot be used for mirroring scripts which are
RTL by default, and at lest one such script exists in Unicode 7.0.0”
>> Extending this property for whole scripts would be a lot of work, and
>> should be more than a Y/N property as currently, [...]
>> Currently a BidiMirrorred=N can mean anything of the above, and
>> BidiMirrored=Y means (1. or 4.).
> To be precise, having reread the Bidi algorithm, in particular L4 and
> 1) If resolved directionality is R and Bidi_Mirrored=Yes,
> mirroring is mandatory.
> 2) If resolved directionality is L and bidirectional type is not R
> or AL, mirroring is prohibited.
> 3) Otherwise, mirroring is optional.
Thanks for the check.
> It's odd that a font that reverses all the Hebrew letters is compliant
> with the Unicode standard.
>> he way, I think a comment should be added in the §4.7 of the
>> standard to clarify that the BidiMirrored property is not intended
>> for cases like hieroglyphs or italic.
> That is a stupid and dangerous remark.
My remark was on the BidiMirrored property itself, it was not
intended to mean “mirroring of ancient script is forbidden”. I wanted to
say “Don’t trust the BidiMirrored=N for ancient script : it does not
mean that they should not be mirrored.”
> If the hieroglyphs had had the BidiMirrored property corrected to Yes,
> one could have had, in plain text, once fonts had caught up: [...]
Agreed. But you don’t need to have the BidiMirrored property to let the
font catch up: Andrew West’s anglo-saxon runic font behave correctly
when mirrored, and are Unicode compliant.
> Once your remark has been adopted in the Unicode Standard, the only
> way to get consistently oriented Ancient Egyptian in plain text is to:
> a) Add a complete set of right-to-left hieroglyphs.
> b) Add the retrograde hieroglyphs to each set.
That would be a very bad idea !
> One hopes that Egyptian Hieroglyphs is the only script for which
> mirroring or not has meaning.
You also have mirroring in Italic, Runic, Old North Arabian and probably
many other scripts.
Let me rephrase my remark in a less “stupid and dangerous” way.
If a LTR character has the BidiMirrored=No property, it may either
be mirrored or not when typeset in RTL, depending on other factors.
Specifically, the BidiMirrored property has not been specified for
ancient LTR scripts which are mirrored when RTL or boustrephodon,
like Italic, Runic, Archaic Greek, Archaic Latin, Egyptian
Hieroglyphs. Note that some RTL script, like Old North Arabian, are
mirrored when LTR.
Is that better ? Once again, I agree that forbidding ancient Egyptian to
be mirrored when “stupid and dangerous”
I (maybe naively) thought that the BidiMirrored=No property for
hieroglyphs, runes, etc. in the UCD was volunteer. If it was not, do you
think that the unicode consortium would consider some (if not all) of
the following actions :
* accepting proposals to “BidiMirror” relevant ancient scripts with
no modern usage
* changing the BidiAlgorithm and BidiMirrored property (or
BidiMirroredv2) to take into account Mirrored RTL scripts
* Distinguish between “never mirrored” caracters (Han), and “Sometimes
mirrored, unknown mirrored” (Latin? Most Indic ? Cyrillic ?)
* Look into the security implication of all this for modern scripts
Of course, all that is a non negligible work.
More information about the Unicode