[Konsole-devel] [Bug 156071] Thai Support for Konsole

Robert Knight robertknight at gmail.com
Fri Jan 18 04:41:13 UTC 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=156071         
robertknight gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      everconfirmed|0                           |1



------- Additional Comments From robertknight gmail com  2008-01-18 05:41 -------
Hello, thank-you for the patch, I have some comments and questions on it.  

+  // force combining character at column 0 to always take the first cell
+  if (w == 0 && cuX == 0)
+    w = 1;

I don't understand the comment here.  Could you clarify what this does?

+  //Set CharSequence
+  ushort u_char_combind[5];

Where does the '5' come from?

+  if (w == 0 && cuX > 0) {
+    if (screenLines[cuY][cuX-1].rendition & RE_EXTENDED_CHAR)
+    {

Looking at the table in konsole_wcwidth.cpp, it seems that w can be 0 when the character is not a combining character, for example the null character and there are two other cases which I don't understand.  Do we need to check the value of QChar::category(c) here to be sure this is the right kind of character to build an extended char sequence?      

+        if (extendedCharLength > 5)
+            return;

Is it possible for extendedCharLength to be above 5 in normal use or can that only happen if there is a bug?

+void TerminalDisplay::drawCharSequence(   QPainter& painter,const QRect& rect, const QString& str, 
+                                    const Character* attributes)
+{ 
+    painter.drawText(rect,str[0]);
+    Qt::BGMode bgMode = painter.backgroundMode();
+    painter.setBackgroundMode(Qt::TransparentMode);
+    for (int i = 1; i < str.length(); i++)
+        painter.drawText(rect,str[i]);
+    painter.setBackgroundMode(bgMode);
+}

Character-by-character text drawing is very slow.  Complete strings should be drawn if at all possible.  What is the background mode change here for?

+            {   
+                // Do not try to even peek screen buffer. The real text buffer
+                // owner is the process that runs on konsole, not konsole
+                // itself. Trying to do so would cause text input in remote
+                // sessions to depend on konsole's response, which can block
+                // one from typing continuously without waiting the characters
+                // to appear on screen, for instance.
+                return QString();

How will this affect languages other than Thai?  Is this also a problem with Chinese or Japanese text for example?



More information about the konsole-devel mailing list