3 ms·
When you say “go the other way around”, it’s important to note that you still use U+0028 "(" LEFT PARENTHESIS as the opening delimiter and U+0029 ")" RIGHT PARE
by chrismorgan 3y ago
When you say “go the other way around”, it’s important to note that you still use U+0028 "(" LEFT PARENTHESIS as the opening delimiter and U+0029 ")" RIGHT PARENTHESIS as the closing one, despite their names; but when the bidirectional algorithm decides they should be rendered right-to-left, they get replaced with the opposite glyphs, according to the Unicode Bidi_Mirroring_Glyph property, and so LEFT PARENTHESIS is rendered as a right parenthesis.
See https://unicode.org/reports/tr9/#Mirroring https://unicode.org/reports/tr9/#Mirroring for description of the process, and https://www.unicode.org/Public/UCD/latest/ucd/BidiMirroring.txt https://www.unicode.org/Public/UCD/latest/ucd/BidiMirroring.... for the full list of mirrorings, including mentioning cases where there is no appropriate mirrored character defined by Unicode (like √—in fact, I think they’re all mathematical notation), and so they suggest the renderer horizontally flip the glyph instead (which isn’t perfect, as things like italic slant will be inverted).