[Konsole-devel] Bug#38077: konsole is completely broken for multibyte languages

ynakai at redhat.com ynakai at redhat.com
Thu Feb 14 06:58:46 UTC 2002


Package: konsole
Version: 1.1 beta2 (using KDE 2.9.2 )
Severity: normal
Installed from:    Compiled From Sources
Compiler:          gcc version 3.1 20020205 (Red Hat Linux Rawhide 3.1-0.21)
OS:                Linux
OS/Compiler notes: Not Specified

konsole in KDE 2.x/KDE3.x is far
from i18n.

It recognize multibyte chars,
but doesn't double width chars.

This patch is not enough but
a trivial part of the patch by
Japan KDE Users Group.

In Japanese, font width should
not be always maxWidth. You
must use the max width of alpha-
numeric chars for the normal char width, and use twice of it for double-width char like Japanese Kanji.

Konsole is a core application
of KDE, so this bug means all
KDE are sucks for Japanese/Korean/Chinese users.
Yes, it is FATAL.

--- TEWidget.cpp.orig   Wed Feb 13 19:50:23 2002
+++ TEWidget.cpp        Thu Feb 14 15:29:20 2002
@@ -225,16 +225,19 @@
 {
   QFontMetrics fm(font());
   font_h = fm.height() + m_lineSpacing;
-  font_w = fm.maxWidth();
-  if (!font_w)
-     font_w = fm.width('W');
+  int fw;
+  font_w = 0;
+  for(int i=0;i<128;i++) {
+    if( isprint(i) && font_w < (fw = fm.width(i)))
+      font_w = fw;
+  }
   if (!font_w)
      font_w = 1;
   font_a = fm.ascent();


(Submitted via bugs.kde.org)




More information about the konsole-devel mailing list