LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Underline "_" in Xterm invisible (http://www.linuxquestions.org/questions/slackware-14/underline-_-in-xterm-invisible-4175434364/)

markush 10-27-2012 09:44 AM

Underline "_" in Xterm invisible
 
Hi,

in my .Xresources file I have the following line
Code:

XTerm.*.faceName: Deja Vu Sans Mono:pixelsize=14:spacing=mono
which configures the font for my xterm. Unfortunately the "_" (underline) is only visible when the text is bold.

In fact I like this font, but it is very inconvenient when programming because one cannot see if for example "my_variable" is one or two words.

Is there a workaround?

Markus

dickey 10-27-2012 10:32 AM

Quote:

Originally Posted by markush (Post 4816174)
Hi,

in my .Xresources file I have the following line
Code:

XTerm.*.faceName: Deja Vu Sans Mono:pixelsize=14:spacing=mono
which configures the font for my xterm. Unfortunately the "_" (underline) is only visible when the text is bold.

The scaleHeight resource, as mentioned here: http://invisible-island.net/xterm/xt...html#xterm_276

markush 10-27-2012 11:52 AM

Hello, thanks for the answer, the sh-option seems to work, but when I use
Code:

xterm -sh 2
I get double linespace and values of 1.1 or 1.2 up to 1.9 make no difference.

Markus

dickey 10-30-2012 05:53 AM

Quote:

Originally Posted by markush (Post 4816279)
Hello, thanks for the answer, the sh-option seems to work, but when I use
Code:

xterm -sh 2
I get double linespace and values of 1.1 or 1.2 up to 1.9 make no difference.

Markus

hmm - if I can reproduce this, I can investigate. At the moment I'm not seeing this (with
Debian 6.0). On that, fc-list says I have "DejaVu Sans Mono:Bold Oblique". Running xterm
with/without the space makes no difference (underlines always show up).

markush 10-30-2012 07:10 AM

dickey, your help is very welcome, but the problem's still present.

I could now verify that this problem occurs for pixelsizes from 14 upwards.

I think I'll have to try another font.

Markus

GazL 10-30-2012 07:17 AM

Deja Vu sans mono works fine here and is my preferred font.
hinting can make a significant effect on this font though.

Code:

cd /etc/fonts/conf.d && ln -s ../conf.avail/10-autohint.conf
.Xresources:
Code:

gazl@ws1:~$ cat .Xresources
xft.antialias: true
XTerm.*.background: black
XTerm.*.foreground: lightblue
XTerm.*.faceName: Deja Vu Sans Mono
XTerm.*.metaSendsEscape: true
XTerm.*.backarrowKey: false
! Tango Color Scheme
*color0: #2e3436
*color1: #cc0000
*color2: #4e9a06
*color3: #c4a000
*color4: #3465a4
*color5: #75507b
*color6: #0b939b
*color7: #d3d7cf
*color8: #555753
*color9: #ef2929
*color10: #8ae234
*color11: #fce94f
*color12: #729fcf
*color13: #ad7fa8
*color14: #00f5e9
*color15: #eeeeec


markush 10-30-2012 07:54 AM

No difference. Gazl, it seems my .Xresources file is very similar to your's.

Where is a detailed documentation about the fonts in X?

Markus

fgcl2k 10-30-2012 08:29 AM

Quote:

Originally Posted by markush (Post 4816279)
Hello, thanks for the answer, the sh-option seems to work, but when I use
Code:

xterm -sh 2
I get double linespace and values of 1.1 or 1.2 up to 1.9 make no difference.

When you get double linespace can you see the "_" character?

GazL 10-30-2012 08:30 AM

I don't think there is one source of information for this stuff. It's all rather messy and certain bits have evolved or been obsoleted over time. Best just to google for 'X' and 'fonts' and start there.


The desktop environments such as kde/xfce have their own hinting settings which can have a major effect. if you're using one of those desktops then perhaps try playing with the settings. You may also want to try using a minimal window-manager based desktop (which is what I use) which won't interfere with the font rendering.

Other than that, the only other thing I can think of that might cause your underscore to go missing would be if your X display is not running at the native resolution of your screen (assuming lcd panel).

Other than the above, I can't think of any other suggestions.

markush 10-30-2012 08:30 AM

Quote:

Originally Posted by fgcl2k (Post 4818127)
When you get double linespace can you see the "_" character?

Yes, then it is visible.

Markus

markush 10-30-2012 08:48 AM

Gazl, I had an idea and tried other WMs, normally I use Xmonad. The problem with xterm is the same with fluxbox and blackbox, XFCE has completely other settings for xterm.

Now I am using Terminal from XFCE and this works fine.

Markus

GazL 10-30-2012 09:05 AM

Very odd that we get different results. I've tried xterm with font sizes from tiny->huge and they all display just fine (though when I use xmag it does look like the underscore is only a single pixel high when rendered so it would be susceptible to obliteration by any errant rendering.

Just out of interest. If you run xmag -mag 16 and select the area where the missing underscore is, do you see it in the magnification

markush 10-30-2012 09:09 AM

Quote:

Originally Posted by GazL (Post 4818159)
...

Just out of interest. If you run xmag -mag 16 and select the area where the missing underscore is, do you see it in the magnification

No, even in the magnification it is invisible.

Markus

dickey 10-31-2012 04:47 AM

Quote:

Originally Posted by GazL (Post 4818159)
Very odd that we get different results.

Not so odd, considering that a lot of the hinting configuration is installed automatically (and not consistently from one platform to another). Given a specific version and configuration, it's (usually...) possible to isolate the problem.

GazL 12-12-2012 06:06 PM

Don't know whether you got anywhere with this Markus, but I just thought you'd be interested to know that when I just tried the latest nouveau and libdrm version from git on my system, my underscores disappeared too, so you're not alone in this. I swapped back to using the nvidia blob.


All times are GMT -5. The time now is 08:41 PM.