Commit 60b0c9d breaks bidi rendering, essentialy making all spaces
hard L2R characters, instead of neutral.

The deleted mostly does not do anything - it groups a
sequence of space which would be grouped anyway.

The problem is the break at the end, which exits the outer loop so
stops grouping after any sequence of space.

It "works" by having more groups, thus the rendering is closer to
rendering each character in its place, mitigating somewhat the issue
caused by non-fixed fonts (fallback to a font with different width).
wilder
Matan Ziv-Av 4 years ago committed by Tomaz Canabrava
parent 25f49b723d
commit 92a6d45a57
  1. 18
      src/terminalDisplay/TerminalPainter.cpp

@ -145,24 +145,6 @@ void TerminalPainter::drawContents(Character *image,
break;
}
// Group spaces following any non-wide character with the character. This allows for
// rendering ambiguous characters with wide glyphs without clipping them.
// NOTE: This happens in the else case too, but we need it here as well.
if (!doubleWidth && next_char.character == ' ' && char_value.equalsFormat(next_char)) {
univec << next_char.character;
len++;
while (isInsideDrawArea(x + len)) {
const Character next_char_gp = image[m_parentDisplay->loc(x + len, y)];
if (next_char_gp.character == ' ' && char_value.hasSameColors(next_char_gp) && char_value.hasSameRendition(next_char_gp)) {
univec << next_char_gp.character;
len++;
} else {
break;
}
}
break;
}
const uint c = next_char.character;
if ((next_char.rendition & RE_EXTENDED_CHAR) != 0) {
// sequence of characters

Loading…
Cancel
Save