Bug 158201 - colored text gets truncated with "Luxi Mono" font
Summary: colored text gets truncated with "Luxi Mono" font
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-22 04:11 UTC by Gabe Yoder
Modified: 2008-02-23 18:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
colored / noncolored comparison (108.23 KB, image/png)
2008-02-22 21:59 UTC, Gabe Yoder
Details
hightlighted colored text (44.54 KB, image/png)
2008-02-22 22:01 UTC, Gabe Yoder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabe Yoder 2008-02-22 04:11:48 UTC
Version:            (using KDE 4.0.1)
Installed from:    Compiled From Sources
Compiler:          gcc 4.2.2 
OS:                Linux

I'm consistently getting clipped text for any colored text in the terminal window.  For instance, if I use "ls --color=auto", any of the file names which are displayed with a special color have a certain amount of the right side of the word cut off, however all of the plain words are displayed correctly.  The amount of text that is cut off from a colored word appears to be proportional to the length of the word.  I've also seen this with my colored bash prompt.  After closely comparing a colored prompt versus a plain prompt of the same text, it appears that the colored text has wider characters than the plain text and the colored text gets cut off at whatever length would have been sufficient for the plain text.
Comment 1 Robert Knight 2008-02-22 14:27:16 UTC
Hello,

Can you attach a screenshot showing the bug please?  Can I also ask which font you are using and whether the bug still appears when using different fonts?

I'm not sure why colored text would be wider.  Perhaps it is the difference between bold and non-bold text which causes the problem?
Comment 2 Gabe Yoder 2008-02-22 21:59:23 UTC
Created attachment 23672 [details]
colored / noncolored comparison

This image shows the clipped text in the top window, and the unclipped
equivalent text in the bottom window.
Comment 3 Gabe Yoder 2008-02-22 22:01:46 UTC
Created attachment 23673 [details]
hightlighted colored text

Here's another variation in the bug.  This is the same window as the previous
snapshot, but I double clicked on my bash prompt and this is what happened to
the text.
Comment 4 Gabe Yoder 2008-02-22 22:12:49 UTC
The font I am using is 10 point Monospace (the font is actually named Monospace).  The bold vs. non-bold seems to be related to the problem.  I went into the edit profile dialog and changed the font from regular to bold.  The colored text was the same size in both, but after changing to bold, it wasn't being clipped anymore.
Comment 5 Robert Knight 2008-02-22 22:27:30 UTC
Can you post the output of running "fc-match Monospace" in a terminal?
Comment 6 Gabe Yoder 2008-02-22 23:33:58 UTC
Here's what I got:

luximr.ttf: "Luxi Mono" "Regular"
Comment 7 Robert Knight 2008-02-23 02:39:11 UTC
I can reproduce this using the Luxi Mono font ('Monospace' isn't a real font, it supposedly maps to the system fixed-width font)

The reason is that Luxi Mono isn't really a monospace font and some characters are indeed wider than others.  If you open the font list inside Konsole (Settings -> Edit Current Profile -> Appearance -> Edit Font...) you can see that "Luxi Mono" is not listed because it doesn't meet this criteria.  Konsole is only designed to work with actual monospace fonts - any shown in that list should work.

What distribution are you using?  It is unusual for the "Monospace" font to map to something like Luxi.  One reason being that Luxi is not shipped out of the box on Debian/Ubuntu etc. for some licensing reason.
Comment 8 Gabe Yoder 2008-02-23 18:43:13 UTC
I have a custom system that is based on LFS.  Apparently I needed to rerun fc-cache since most of my fonts were not appearing in any font dialog (whether for konsole or under system settings).  "Monospace" was the only font that appeared under the category of monospaced fonts.  Now that I can select a real monospace font, everything seems to be working fine.  So I guess this was more of a PEBKAC than a real bug.