#858142 xterm: ASCII underscore does not render when using -fa DejaVuSansMono-14

Package:
xterm
Source:
xterm
Description:
X terminal emulator
Submitter:
Branden Robinson
Date:
2019-10-10 18:24:05 UTC
Severity:
normal
#858142#5
Date:
2017-03-18 20:37:08 UTC
From:
To:
Observe screenshot.  Wouldn't surprise me in the least if the problem is
really with libxft2, but "xfd -fa FreeMono-14" works fine, so I figured
I would start with xterm.

#858142#10
Date:
2017-03-18 22:35:22 UTC
From:
To:
I mentioned running the command in the subject in my initial report, but
did not provide a screenshot.

Here it is, in the event it's of interest or use.

#858142#15
Date:
2017-03-20 16:58:27 UTC
From:
To:
Probably it's something else (Xresources? video driver?), because…

…I cannot reproduce your problem.  See the attached screenshot, where
the underscore is rendered just fine.

Cheers,
       Sven

#858142#20
Date:
2017-03-20 17:05:30 UTC
From:
To:
Your screenshot does not depict the FreeMono font; your screenshot has
serifs all over the glyphs; FreeMono (or at least the font resolved by
the name "FreeMono" on my system) is a sans-serif font.

#858142#25
Date:
2017-03-20 17:17:42 UTC
From:
To:
Which font would that be, and which package do I need to install to get
it?  I am a total noob when it comes to fonts.

Cheers,
       Sven

#858142#30
Date:
2017-03-20 17:33:11 UTC
From:
To:
I apologize; the name FreeMono is a bit of a red herring.  I carried the
name over via a dotfile from a different machine.  If you run the xfd
command shown above, it identifies the "matching" font[1] as

DejaVu Sans Mono-14

...which I'm betting comes from the following file:

/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf

in the following package:

fonts-dejavu-core

Does this help you repro the problem?

I'll retitle the bug separately.  I haven't talked to the control bot in
years and half-expect to suffer an impedance mismatch.  I fear I may
even be forced to use "kthxbye". :-|

Thanks for the prompt follow-up!

[1] On my Debian Stretch system installed freshly as of Friday, 17 March,
"matching" is a generous term.  "xfd -fa X-14" also brings up DejaVu
Sans Mono-14.  Frustratingly, "fc-list $pattern" as documented in the
fc-list(1) manpage seems to be useless, returning no matches no matter
what $pattern is.  But that's a bug for a different package...

Regards,
Branden

#858142#37
Date:
2017-03-20 18:24:55 UTC
From:
To:
Thanks, this is a package already installed on my system.

No, attached is a screenshot of "xterm -fa DejaVuSansMono -fs 14".

Apparently fc-match gives better results than fc-list.  On my system it
revealed that FreeMono is best matched by FreeMono.ttf coming from the
fonts-freefont-ttf package, followed by DejaVuSansMono.ttf.

Cheers,
       Sven

#858142#42
Date:
2017-03-20 18:42:21 UTC
From:
To:
I think you may be getting FreeMono.ttf instead of DejaVuSansMono.ttf.
fc-match tells me:

$ fc-match FreeMono
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

Can you repro the problem if you temporarily uninstall fonts-freefont-ttf?

(Or override fontconfig/Xft's resolution order to force DejaVuSansMono.ttf to be
found first, but I don't know how to do that?)

Regards,
Branden

#858142#47
Date:
2017-03-20 19:02:29 UTC
From:
To:
I don't think so, the screenshot I included in
<8760j3hklk.fsf@turtle.gmx.de> very much looks like DejaVuSansMono to
me.  At least it's notably different from the screenshot in my first
reply <87wpbjholo.fsf@turtle.gmx.de>.

Tried it, but saw no difference.

Cheers,
       Sven

#858142#52
Date:
2017-03-20 19:18:33 UTC
From:
To:
Agreed.  I installed fonts-freefont-ttf and that (FreeMono.ttf) is
definitely a Courier/typewriter-like font[1].  It also doesn't make the
underscore invisible at a size of 14 points.

I'm at a loss, then.  As you originally suspected, maybe it is a
graphics driver issue.  Attaching Xorg.log[2].

Regards,
Branden

[1] "xfd -fa FreeMono" turns over a new rock with fonts-freefont-ttf
installed, though.  Obviously something is corrupted or being
misinterpreted.  Attaching a screenshot of that, too.

[2] ...a truncated form of it since it's choked with 104 megabytes and
counting of:
(WW) modeset(0): flip queue failed: Device or resource busy
(WW) modeset(0): Page flip failed: Device or resource busy
(EE) modeset(0): present flip failed
Sigh.

#858142#57
Date:
2017-03-20 19:56:58 UTC
From:
To:
Apparently you have an Intel GPU and use the modesetting(4) driver (the
default).  You could try to disable acceleration
(Option "AccelMethod" "none" in xorg.conf) or use the intel driver
(cp /usr/share/doc/xserver-xorg-video-intel/xorg.conf /etc/X11), and see
if that makes a difference.

That's finally something I _can_ reproduce, thanks for filing the xfd
bugs.

Disabling the PageFlip option in xorg.conf might help to avoid those.

Cheers,
       Sven

#858142#62
Date:
2017-03-21 03:53:54 UTC
From:
To:
I'm afraid that didn't help after all.  Screenshot attached.

Regards,
Branden

#858142#67
Date:
2017-03-24 20:12:31 UTC
From:
To:
Have you tried the intel driver yet?  Probably won't make a difference,
but it can't hurt.

Setting up a fresh user account might also be useful, in case the
problem is triggered by your local configuration, e.g. xterm's
Xresources.

Other than that, I'm running out of ideas. :-(

Cheers,
       Sven

#858142#72
Date:
2017-05-02 12:37:48 UTC
From:
To:
This bug is also triggered if a face size of 12 is used.

After playing around with xrdb(1), I came to suspect there might be
trouble in that program.  This is what I did:

Move .Xresources to .Xresources-foo, then log out and in again.  This
ensures that your .Xresources file won't load.  When xterm is started,
you'll get a much-too-small window and a visible underscore.

Then type "xrdb -merge .Xresources-foo".  I got an xterm with all my
settings but now the underscore is invisible -- the buggy state.

Log out and in again.  Start an xterm and note that it's back to the
much-too-small default.  Now type "xrdb .Xresources-foo" making sure not
to use any flags, particularly "-merge".  This will cause xterm to have
the desired settings.  Underscores are now visible.

Here's my .Xresources file:

xterm*faceName: DejaVu Sans Mono :antialias=true
xterm*faceSize: 12
XTerm*renderFont: true
XTerm*utf8: 1
xterm*vt100.initialFont: 3
xterm*loginShell: true
xterm*vt100*geometry: 80x24
xterm*saveLines: 2000
xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
xterm*foreground: rgb:ee/ee/ee
xterm*background: rgb:00/00/00

#858142#77
Date:
2017-05-03 08:20:33 UTC
From:
To:
You haven't mentioned a bug.  What's described is a partial investigation
into the resources which are set before running xrdb (incomplete so far),
and your changes to those resources.

#858142#80
Date:
2017-05-03 08:20:33 UTC
From:
To:
You haven't mentioned a bug.  What's described is a partial investigation
into the resources which are set before running xrdb (incomplete so far),
and your changes to those resources.

#858142#85
Date:
2018-11-25 14:54:17 UTC
From:
To:
I think this is a bug in fontconfig, as suggested.
I can reproduce the problem with Debian 9, but not with Debian testing.
(that's with the same version of xterm of course).

#858142#88
Date:
2018-11-25 14:54:17 UTC
From:
To:
I think this is a bug in fontconfig, as suggested.
I can reproduce the problem with Debian 9, but not with Debian testing.
(that's with the same version of xterm of course).

#858142#93
Date:
2019-10-10 18:21:48 UTC
From:
To:
problems in urxvt and gitk.  The always useful ArchWiki[3] recommends to
set the following resource as a workaround:

XTerm.scaleHeight: 1.01

Cheers,
       Sven


1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=650376
2. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685732
3. https://wiki.archlinux.org/index.php/Xterm#Adjust_line_spacing