The
OT spec says:
When an OpenType text layout engine applies the Unicode bidi algorithm
and gets to the point where mirroring needs to be performed . . . The engine applies the ‘rtla’ feature to the entire RTL run.
I'm working on a font that supports the Old Italic range of Unicode. These characters are strongly LTR, but are sometimes used for RTL text. The usual recommendation is to insert a right to left override, terminated by a pop directional format. Assuming that the application respects these bidi controls (not all do, but that's another discussion), is the presence of the RLO enough to get the layout engine to apply the rtla feature? One would hope so, but . . . . If adding a RLO doesn't work, is there any way to get this feature applied without users doing it manually? Thanks!
Comments
Testing was on Win7 using Notepad and Word 2016, both of which do respect the RLO and PDF control characters. LibreOffice Writer just ignores the bidi controls, unfortunately, but did allow me to apply the rtla feature manually. It did work, so the substitution seems to be constructed properly.
TextEdit and Nisus Writer both work correctly, respecting the RLO and automatically applyiing rtla. I suspect that other Mac apps that use the text services provided by OS X, rather than doing their own thing, will work too. Scribus 1.5.3 also is good.
As on Windows, Word 2016 implements the RLO but does not apply rtla, and LO Writer 5.3.3 does neither but will let me apply rtla manually.
Mellel and InDesign CC 2015 don't work at all.
I’ll be happy to test; give me a day to update my experimental font.
Meanwhile, I’d appreciate it if someone could clarify when rtlm is appropriate vs rtla. According to this page (see item 2 at the very bottom), rtlm seems intended to cover characters with the mirrored property (pairs of brackets and such, I believe) that were added after Unicode 5.1, while rtla is for other characters. That's why I originally started testing with rtla. But the actual descriptions of the features here are not so clear. I’ve reread this stuff a couple of times and am still unsure what is most appropriate for the Old Italic letters. Nor am I clear about why two separate features needed to added in the first place.
https://www.microsoft.com/typography/otspec/TTOCHAP1.htm
There are characters that should be flipped horizontally when text direction changes, which can be interpreted as individually mirrored. And then there are characters that belong to pairs that should be swapped when text direction changes, e.g. opening and closing parentheses, which can be interpreted as mirroring each other. I think this is where font makers get a bit confused as to whether to use <rtlm> or <rtla>, because we're not sure what meaning of 'mirrored' is implied. Should <rtlm> be used only for glyphs with mirroring pairs, or also for individually mirrored (horizontally flipped) glyphs? Or, more precisely, should <rtlm> be used only for characters that have Unicode mirroring properties, but that are not in the OMPL list, and <rtla> should be used for all others (e.g. my Greek boustrophedon variants)?
Additionally, I tested using XeLaTeX, which (not surprisingly) behaved just fine, applying <rtlm> automatically after a RLO. I assume plain XeTeX will work as well and that Xe(La)TeX will give the same results on Mac or Linux -- it always has in my experience.
The bug you mentioned is interesting for those of us who work with historic scripts -- an historic RTL script used for a language that now is written LRT. No wonder the software got confused. I don't know of any parallel case.