Bug 186826

Summary: Calculation of character width is buggy. Selecting some character will make text shift.
Product: [Applications] konsole Reporter: jarauh
Component: fontAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: adaptee
Priority: NOR    
Version: 2.2.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: underline under a link shifted to the left
amharic text
same text, but first letter selected.
better example: unselected thai, from the same file
same text, with some selection
UTF-8-demo.txt

Description jarauh 2009-03-11 00:23:48 UTC
Version:           2.2.1 (using 4.2.1 (KDE 4.2.1), Gentoo)
Compiler:          i686-pc-linux-gnu-gcc
OS:                Linux (i686) release 2.6.25-gentoo-r7

Two problems that may be related:
- When selecting text that contains UTF-8 characters the text moves.
- The line under the link is shifted to the left.

My font is: Deja Vue Sans Mono, size 10. "smooth fonts" is enabled.
Comment 1 jarauh 2009-03-11 00:25:26 UTC
Created attachment 32011 [details]
underline under a link shifted to the left

Note: The mouse pointer is not visible in this screenshot (made by GIMP). It should be above the underlined link.
Comment 2 jarauh 2009-03-11 00:27:16 UTC
Created attachment 32012 [details]
amharic text

The file is UTF-8-demo.txt (available via google :-))
Comment 3 jarauh 2009-03-11 00:33:51 UTC
Created attachment 32014 [details]
same text, but first letter selected.

Well - I guess I should have taken more care when croping the images. If the two images are aligned properly (e.g. two windows of eog) one can see that the letters behind the selected letter move.
Comment 4 jarauh 2009-03-11 00:44:57 UTC
Created attachment 32015 [details]
better example: unselected thai, from the same file
Comment 5 jarauh 2009-03-11 00:47:33 UTC
Created attachment 32016 [details]
same text, with some selection

One can clearly see that the text moves. Moreover, a space appears between the selected letters and the unselected letters. Interestingly the selection highlighting is larger than the selected text. Maybe the font width calculation is only wrong for the highlighting?
Comment 6 Jekyll Wu 2011-08-19 04:04:48 UTC
Created attachment 62967 [details]
UTF-8-demo.txt

Can't reproduce the second problem, but the first problem can still be reproduced in konsole-2.7.999

The attachment is the UTF-8-demo.txt from http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt