Commit 94ff722f authored by Mariusz Glebocki's avatar Mariusz Glebocki Committed by Kurt Hindenburg
Browse files

Malayalam support: primitive PoC

https://invent.kde.org/mglebocki/konsole complex-scripts-support
CCBUG: 401094
parent f3fa5c77
......@@ -1590,6 +1590,11 @@ void TerminalDisplay::drawContents(QPainter& paint, const QRect& rect)
const RenditionFlags currentRendition = _image[loc(x, y)].rendition;
const bool rtl = isRtl(_image[loc(x, y)]);
const auto malayalam = [&](int column) {
return _image[loc(column, y)].character >= 0x0D00
&& _image[loc(column, y)].character <= 0x0D7F;
};
const auto isInsideDrawArea = [&](int column) { return column <= rect.right(); };
const auto hasSameColors = [&](int column) {
return _image[loc(column, y)].foregroundColor == currentForeground
......@@ -1604,7 +1609,7 @@ void TerminalDisplay::drawContents(QPainter& paint, const QRect& rect)
return (_image[characterLoc].character == 0) == doubleWidth;
};
const auto canBeGrouped = [&](int column) {
return _image[loc(column, y)].character <= 0x7e || rtl;
return _image[loc(column, y)].character <= 0x7e || rtl || malayalam(column);
};
if (canBeGrouped(x)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment