Flip < and > in RTL too

This commit is contained in:
Pk11
2021-01-23 14:42:44 -06:00
parent dd9f8cd54c
commit c71e6ff946
+22 -8
View File
@@ -287,14 +287,28 @@ ITCM_CODE void Font::print(std::u16string_view text, int x, int y, bool top, int
// Brackets are flipped in RTL
if(rtl) {
if(*it == '(')
index = charIndex(')');
else if(*it == ')')
index = charIndex('(');
else if(*it == '[')
index = charIndex(']');
else if(*it == ']')
index = charIndex('[');
switch(*it) {
case '(':
index = getCharIndex(')');
break;
case ')':
index = getCharIndex('(');
break;
case '[':
index = getCharIndex(']');
break;
case ']':
index = getCharIndex('[');
break;
case '<':
index = getCharIndex('>');
break;
case '>':
index = getCharIndex('<');
break;
default:
break;
}
}
if(sprite) {