[Konsole-devel] Bug#41744: konsole Shows some Japanese FULLWIDTH chars as HALFWIDTH
Waldo Bastian
bastian at kde.org
Mon Apr 29 19:25:04 UTC 2002
On Friday 26 April 2002 10:52 pm, asataku at osk3.3web.ne.jp wrote:
> Package: konsole
> Version: 1.2 Preview (using KDE 3.0.5 (CVS HEAD >= 20020412))
> Severity: normal
> Installed from: compiled sources
> Compiler: gcc version 2.95.3 20010315 (release)
> OS: Linux (i686) release 2.4.18-0vl3
> OS/Compiler notes:
>
> Some of Japanese FULLWIDTH symbol chars shown as HALFWIDTH.
>
> I put example EUC-JP codec file on
> http://www.kde.gr.jp/~asaki/konsole-symbols.txt
>
> These chars are shown FULLWIDTH in kterm(Kanji-terminal).
> http://www.kde.gr.jp/~asaki/kterm.png
>
>
> And konsole shows HALFWIDTH.
> http://www.kde.gr.jp/~asaki/konsole.png
> But Japanese terminal application treats them as FULLWIDTH.
> So screen is broken.
Than you very much for your feedback. Anaysis of the problem follows.
It seems that the screen drawing methods used in konsole are inadequate for
solving this. Our functions in konsole_wterm determine for each character
whether it should be treated as half width or full width based on the
unicode-value. However, this assumes that the font that is being used
provides glyphs with corresponding half- or full width. If the width of the
glyphs does not correspond with what we assume based on the results from the
konsole_wterm functions then screen drawing will become a mess.
The characters from http://www.kde.gr.jp/~asaki/konsole-symbols.txt that are
shown fullwidth in kterm, clearly only have halfwidth glyphs available in the
selected font. I do not know how we could possibly obtain fullwidth glyphs.
A partial solution could be to change the screen-drawing from segment based to
character based. That way we can ensure, even when a glyph has a size other
than what we assume that it will have, that the next characters will be drawn
on the correct position. This would also make it possible to use
non-fixed-width fonts. Such a change would result in a loss of performance so
we might want to detect the cases where such an approach would be beneficial
(e.g. when using either non-fixed-width fonts or double-width characters)
I do not know whether konsole_wterm reports the mentioned characters as
full-width or half-width. But that should be easy to find out.
Cheers,
Waldo
--
bastian at kde.org | SuSE Labs KDE Developer | bastian at suse.com
More information about the konsole-devel
mailing list