[kde-linux] konsole/bash/htop use bold characters and make characters unreadables

Duncan 1i5t5.duncan at cox.net
Sun Aug 22 07:14:39 UTC 2010


christophe posted on Fri, 20 Aug 2010 12:06:56 +0200 as excerpted:

> Le Thursday 19 August 2010 06:38:57 Duncan, vous avez écrit :
>> As
>> I can't answer /what/ might be readable at a font size of 3 on your
>> system.  But, what I /can/ say is that (on a more normal system) the
>> font I mentioned has two sizes, 6 and 12.
> 
> Actually, i said "size 3" because it's what konsole says. For exemple, i
> use opensuse 11.1, now. I use kde 3.5.10. And i am writing you with
> kmail 1.9.10 and i use this "Misc Fixed" in size 5. And in konsole, i
> use this "Misc Fixed" font in size 3. And it just "works" fine.

OK, I just discovered that konsole (4.x) actually has two font 
adjustments, which I didn't realize before.  See below for the 
implications, but you said you're learning from this exchange; I'm 
learning too...

>> The question is, are you /really/ using a 3 pt font, which is too small
>> to be practical, 3/8/B must be at least 5 px high or there's no space
>> between two of the horizontal strokes and they're merging, and at the
>> 96 dpi standard, 3 pt is 4 px, or is it simply that your system
>> calibration is seriously screwed up, so a 3 pt size font is what you
>> have to set it to, to get reasonably small text?
> 
> In opensuse 11.1 with kde 3.5.10 , i look into /usr/share/font/misc/,
> and i find that the most little font is 4x6.pcf.gz . When opened by
> kfontview, it is said to be Misc Fixed [6 pixels] . And when i compare
> with konsole using this so called "Misc Fixed size 3", it appears to be
> the same as what kfontview calls "Misc Fixed [6 pixels]" . So that's one
> mistery solved.

OK. I'm familiar with that font as I used to use it here, on the text 
console when I was using the kernel's vgacon, before I switched to the 
framebuffer and then kms with its framebuffer.  That's the one I mentioned.

I don't know if you can see it at the resolution you use, but here, in 
your screenshots, when I view them at actual size (pixel-wise, they're 
slightly larger here as my pixels are), I can see the individual pixels.  
They are actually the 5 px high (3 px wide) I mentioned as the minimum 
practical.  The additional px is the space between lines (leading in print 
terms) and between letters, making each character 4x6 px incl the spacing 
pixels.

>>[...]
>> What I suspect is happening is that you're registering an impractically
>> small dpi, likely less than 48 (half the standard 96),

>> 1) Fixing it "correctly" will mean figuring out what the real setting
>> should be, then putting it in xorg.conf.  That'll take some work and
>> several rounds of posts back and forth.  To start off with, what
>> version of xorg-server are you running,
> 
> Opensuse 11.3, where i have the font size problem, is supposed to be
> shipped with xorg server version 1.8 .

Great!  I was hoping a 1.8, as it's easier to configure, using as you 
mention, xorg.conf.d, now.  I wish they'd have done this long ago instead 
of screwing with that hal stuff, but oh, well, at least we have it now! 
=:^)

But as it turns out, xorg might be fine after all...

>> and either what brand and model of monitor (preferred as the official
>> numbers can then be googled), or what size and either native resolution
>> or native aspect ratio.  And if you have the xdpyinfo command
>> installed, what does 'xdpyinfo | grep resolution' return?
> 
> The monitor is embodied in the laptop, and i know its exact model since
> i have changed it myself a few month ago : it's a LG PHILIPS LP171WU1
> (TL)(A6), 1920x1200 pixels, 17 inches .

OK, google says that's native resolution and indeed 17 inches.  (BTW, 
google.com/linux already has your post as a hit. =:^)

16:10 ratio.  14.4"x9.0" rectangular (both googled and calculated)

1200px/9" ~= 133 dpi

> [--christophe at myhost 12:00:45 ~] xdpyinfo |grep resolution
>   resolution:    131x132 dots per inch

Close enough...

So you /do/ have one of the ultra-high resolution monitors, and X is 
indeed correctly detecting dpi from the DDC/EDID. =:^)

OK, at that sort of dpi, a 3 pt font (1/24" as mentioned) is 5.5 px.  So a 
4x6 px font... pretty close (there's probably some rounding somewhere).

But you have /excellent/ eyes if you're able to see it, ultra-high 
resolution or no ultra-high resolution! =:^)

> With xorg 1.8, there is no need for xorg.conf and i found none in
> /etc/X11 . I have already edited many xorg.conf, in the 10 years i have
> used linux, now shall i create one or edit some of the files in the
> /etc/X11/xorg.conf/ directory, to change dpi ??

It actually seems you're fine.  You /could/ tell kde to force 120 dpi if 
you like, just to get something near standard, but if you're actually 
comfortable at 3 pt... which **IS** 3 pt, the math demonstrates it so...

> I have tried to tweak the kde systemsettings dpi, tried idfferent
> settings, logged off and in, but to no avail.
> 
> This conversation is interseting and i am learning a lot.

As I said above, I'm learning too. =:^)

Now, back to konsole (4.x):

As I mentioned above, it actually has two font size settings, the actual 
font picker with the size settings there, and the slider, allowing to 
resize the given font (I assume you've figured out already that you 
configure profiles and edit profile for the current one to change settings 
in konsole 4.x, and have seen the font size slider on the appearance 
tab).  For bitmap fonts like the 4x6 you mentioned, when you move the 
slider to a size that exactly matches a pre-defined bitmap, it uses that.  
When it can't use that, because it's in-between pre-defined sizes, I'm not 
sure exactly what it does -- whether it uses a fall-back font, or whether 
it tries to scale the chosen font somehow.  But whatever it does, playing 
with the slider a bit, it was obvious when it hit a pre-defined size as 
the rendering was MARKEDLY better than whatever it was doing between pre-
defined sizes.

Meanwhile, I learned something else.  The font I use (that shipped with 
kde3) is the standard bitmapped 8x8 and 8x16 px size that the kernel 
defaults to if you've specifically chosen another default.  As such, while 
at my 96 dpi (forced to standard, my LCDs are actually 101 or 103 dpi 
native, so I figured close enough and forced standard) it's 6 and 12 pt, 
at your much higher dpi resolution, it's going to appear as... ~4.5 and 9 
point (4.36 and 8.72, by calculation using 132 dpi, but as we've seen 
there's a bit of rounding, apparently).  

So while it's not the 3 pt you're talking, for you, it's not the 6 pt I 
mentioned, either, but roughly half way between the two.

OK, now for the final bit, and I expect this setting to actually be your 
problem.  If so, toggling it will very possibly solve the problem for you, 
WITHOUT having to mess with fonts or dpis or...! =:^)  I actually just 
spotted this setting myself, too.  As I said, I'm learning too! =:^)

Again on that appearance tab, when editing the current konsole profile, 
down at the bottom, notice the checkbox for "Draw intense colors in bold 
font".  Try unchecking it and applying, etc.  See if that gets rid of the 
bold-font anomalies you mention!

I was a bit puzzled early on as the ANSI font attributes I mentioned have 
bright (translated as flashing on some terminals), underline, etc, but not 
bold.  So I wondered if there was a bold attribute I was missing, or what, 
pretty much assuming so.  But when I saw that checkbox, I was pretty sure 
I knew what was happening:  The bright attribute was being translated to 
bold, which unfortunately screwed up your font.  If I were a betting man, 
now that I spotted that setting, I'd place money on that it being checked, 
causing your whole problem! =:^\

If so, well, I've discovered the fix now, for the next time someone 
reports the problem! And it seems we both learned a decent bit from all 
this, too.  =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




More information about the kde-linux mailing list