Bug 351380 - Ubuntu Mono. Unicode + color => truncate last character.
Summary: Ubuntu Mono. Unicode + color => truncate last character.
Status: RESOLVED DUPLICATE of bug 297390
Alias: None
Product: konsole
Classification: Applications
Component: font (show other bugs)
Version: 2.13.2
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL: http://i.imgur.com/peqm9ti.png
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-16 22:48 UTC by Konstantin
Modified: 2015-09-04 20:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin 2015-08-16 22:48:29 UTC
font: Ubuntu Mono.
Print string with unicode characters and terminal colors.
Last character is truncated.

Without colors it works well. Without unicode chars too.
Any other font works fine.

See screenshot for details.

Reproducible: Always

Steps to Reproduce:
1. Set up konsole font to Ubuntu Mono
2. Into konsole:
    > RED='\033[31m'
    > NC='\033[0m'
    > printf "${RED}✕ it should be less than 3${NC}\n"     # copy-paste, it is not X.
try
    > printf "✕ it should be less than 3\n"
try
    > printf "${RED} it should be less than 3${NC}\n"
3. Change font and see.

Actual Results:  
Last character of string ugly truncated. Moving the cursor through this string is hard.

Expected Results:  
All should work fine=)

Sorry for my English.
Comment 1 Alexander Kowalski 2015-08-17 09:38:15 UTC
I think this is a duplicate of bug 297390.
I will add some new details there.

Also, the color of the wide letter itself doesn't change anything; I think that the letters are cut on every boundary between e.g. different colors.
If you try
printf "✕ it should be less than 3${RED} ${NC}\n"
it will still cut off part of the three, and if you try
printf "✕ it should${RED} ${NC}be less than 3\n"
it will cut off part of the d instead.
(Tested on konsole 15.08.0)
Comment 2 Konstantin 2015-08-17 13:29:41 UTC
Result for v 2.13.2 just the same. The letters cut on every boundary between colorized text and not colorized. For example:
> GREEN='\033[32m'
> printf "✕ it should${RED} be ${GREEN}less ${NC}than 3\n"
>> ✕ it shoul(cut) beless than 3

Also, moving the curson through the string without any colors is hard. Try this
> printf "✕ it should be less than 3\n"  # copy-paste and try to edit the string

Also:
Fonts with problems:
 - Ubuntu Mono
 - TlwgMono
 - Tlwg Typo
 - Oxygen Mono
 - Droid Sans Mono
- Courier 10 Pitch

Fonts without problems:
- Liberation Mono
- DejaVu Sans Mono
- Andale Mono
- Monospace
Courier New
FreeMono
Comment 3 Konstantin 2015-08-17 14:20:04 UTC
Fix a typo. There are two colors, but only one letter is cut.
> GREEN='\033[32m'
> printf "✕ it should${RED} be ${GREEN}less ${NC}than 3\n"
>> ✕ it shoul(cut) be less than 3
Comment 4 Kurt Hindenburg 2015-09-04 20:46:28 UTC
Yes the first X messes up the formatting of the rest of the characters.   The color doesn't seem to make any difference.

Even my vim doesn't handle it well

U+2715	✕	e2 9c 95
Comment 5 Kurt Hindenburg 2015-09-04 20:55:32 UTC

*** This bug has been marked as a duplicate of bug 297390 ***