Discussion:
Bug#858142: xterm: ASCII underscore does not render when using -fa FreeMono -fs 14
Branden Robinson
2017-03-18 20:37:08 UTC
Permalink
Package: xterm
Version: 327-2
Severity: normal
Tags: upstream

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.

-- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages xterm depends on:
ii libc6 2.24-9
ii libfontconfig1 2.11.0-6.7+b1
ii libice6 2:1.0.9-2
ii libtinfo5 6.0+20161126-1
ii libutempter0 1.1.6-3
ii libx11-6 2:1.6.4-3
ii libxaw7 2:1.0.13-1+b2
ii libxft2 2.3.2-1+b2
ii libxinerama1 2:1.1.3-1+b3
ii libxmu6 2:1.1.2-2
ii libxpm4 1:3.5.12-1
ii libxt6 1:1.1.5-1
ii xbitmaps 1.1.1-2

Versions of packages xterm recommends:
ii x11-utils 7.7+3+b1

Versions of packages xterm suggests:
pn xfonts-cyrillic <none>

-- no debconf information
--
Regards,
Branden
Sven Joachim
2017-03-20 16:58:27 UTC
Permalink
Post by Branden Robinson
Package: xterm
Version: 327-2
Severity: normal
Tags: upstream
Observe screenshot. Wouldn't surprise me in the least if the problem is
really with libxft2,
Probably it's something else (Xresources? video driver?), because

Post by Branden Robinson
but "xfd -fa FreeMono-14" works fine, so I figured
I would start with xterm.

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

Cheers,
Sven
G. Branden Robinson
2017-03-20 17:05:30 UTC
Permalink
Post by Branden Robinson
Package: xterm
Version: 327-2
Severity: normal
Tags: upstream
Observe screenshot. Wouldn't surprise me in the least if the problem is
really with libxft2,
Probably it's something else (Xresources? video driver?), because…
Post by Branden Robinson
but "xfd -fa FreeMono-14" works fine, so I figured
I would start with xterm.
…I cannot reproduce your problem. See the attached screenshot, where
the underscore is rendered just fine.
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.
--
Regards,
Branden
Sven Joachim
2017-03-20 17:17:42 UTC
Permalink
Post by G. Branden Robinson
Post by Branden Robinson
Package: xterm
Version: 327-2
Severity: normal
Tags: upstream
Observe screenshot. Wouldn't surprise me in the least if the problem is
really with libxft2,
Probably it's something else (Xresources? video driver?), because…
Post by Branden Robinson
but "xfd -fa FreeMono-14" works fine, so I figured
I would start with xterm.
…I cannot reproduce your problem. See the attached screenshot, where
the underscore is rendered just fine.
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.
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
G. Branden Robinson
2017-03-20 17:33:11 UTC
Permalink
Post by Sven Joachim
Post by G. Branden Robinson
Post by Branden Robinson
but "xfd -fa FreeMono-14" works fine, so I figured
I would start with xterm.
…I cannot reproduce your problem. See the attached screenshot, where
the underscore is rendered just fine.
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.
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.
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
Sven Joachim
2017-03-20 18:24:55 UTC
Permalink
Post by G. Branden Robinson
Post by Sven Joachim
Post by G. Branden Robinson
Post by Sven Joachim
Post by Branden Robinson
but "xfd -fa FreeMono-14" works fine, so I figured
I would start with xterm.

I cannot reproduce your problem. See the attached screenshot, where
the underscore is rendered just fine.
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.
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.
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
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
fonts-dejavu-core
Thanks, this is a package already installed on my system.
Post by G. Branden Robinson
Does this help you repro the problem?
No, attached is a screenshot of "xterm -fa DejaVuSansMono -fs 14".
Post by G. Branden Robinson
[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...
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
G. Branden Robinson
2017-03-20 18:42:21 UTC
Permalink
Post by Sven Joachim
No, attached is a screenshot of "xterm -fa DejaVuSansMono -fs 14".
I think you may be getting FreeMono.ttf instead of DejaVuSansMono.ttf.
Post by Sven Joachim
Post by G. Branden Robinson
[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...
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.
This could be the key. I _don't_ have fonts-freefont-ttf installed, and
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
Sven Joachim
2017-03-20 19:02:29 UTC
Permalink
Post by G. Branden Robinson
Post by Sven Joachim
No, attached is a screenshot of "xterm -fa DejaVuSansMono -fs 14".
I think you may be getting FreeMono.ttf instead of DejaVuSansMono.ttf.
I don't think so, the screenshot I included in
<***@turtle.gmx.de> very much looks like DejaVuSansMono to
me. At least it's notably different from the screenshot in my first
Post by G. Branden Robinson
Post by Sven Joachim
Post by G. Branden Robinson
[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...
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.
This could be the key. I _don't_ have fonts-freefont-ttf installed, and
$ fc-match FreeMono
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
Can you repro the problem if you temporarily uninstall fonts-freefont-ttf?
Tried it, but saw no difference.

Cheers,
Sven
G. Branden Robinson
2017-03-20 19:18:33 UTC
Permalink
Post by Sven Joachim
Post by G. Branden Robinson
I think you may be getting FreeMono.ttf instead of DejaVuSansMono.ttf.
I don't think so, the screenshot I included in
me. At least it's notably different from the screenshot in my first
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.
Post by Sven Joachim
Tried it, but saw no difference.
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.
Sven Joachim
2017-03-20 19:56:58 UTC
Permalink
Post by G. Branden Robinson
I'm at a loss, then. As you originally suspected, maybe it is a
graphics driver issue. Attaching Xorg.log[2].
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.
Post by G. Branden Robinson
[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.
That's finally something I _can_ reproduce, thanks for filing the xfd
bugs.
Post by G. Branden Robinson
[2] ...a truncated form of it since it's choked with 104 megabytes and
(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.
Disabling the PageFlip option in xorg.conf might help to avoid those.

Cheers,
Sven
G. Branden Robinson
2017-03-20 20:58:42 UTC
Permalink
[redirecting side topic to mailing list]
Post by Sven Joachim
Post by G. Branden Robinson
I'm at a loss, then. As you originally suspected, maybe it is a
graphics driver issue. Attaching Xorg.log[2].
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.
I beg your indulgence. If you don't have it to spare, just tell me to JFGI and
I will, but I see some humor and irony in my situation. Plus I like
reconnecting with old Debian colleagues.

I don't precisely know how to do this. I've never had to actually fight with a
modularized xorg.conf file before. I have, however, consulted xorg.conf(5) and
modesetting(4).

Here's what I think I need to do:
1) Create /etc/X11/xorg.conf.d. (done)
2) Write a file to put in there. (in progress)
3) Restart the X server. I enabled zapping[1] so this is easy.

The problem is that an Identifier is mandatory for the Device Section I am
writing, and I cannot tell from my Xorg.0.log file what identifier is
"autodetected". How do I figure this out?

I am attaching my untested conf file.
Post by Sven Joachim
Disabling the PageFlip option in xorg.conf might help to avoid those.
I did see that; thanks. That's the next problem I'm going to tackle after my
precious missing underscore. (My work habits involve maximized xterms and
vertically-split vim windows; those, combined with the monitor I'm using and my
aging eyes, mandate the 14-point font size.)

But in the meantime I did want to report that problem because frankly it's
insane to be dumping that much redundant crap into the log file. syslog has had
message rate limiting for decades, and the Linux kernel for several years at
least. Someone was not thinking.

Regards,
Branden

[1] It's very nice to have this configurable via XKB and the
keyboard-configuration package these days!
Michel Dänzer
2017-03-21 02:59:09 UTC
Permalink
Post by G. Branden Robinson
Post by Sven Joachim
Post by G. Branden Robinson
I'm at a loss, then. As you originally suspected, maybe it is a
graphics driver issue. Attaching Xorg.log[2].
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.
I beg your indulgence. If you don't have it to spare, just tell me to JFGI and
I will, but I see some humor and irony in my situation. Plus I like
reconnecting with old Debian colleagues.
I don't precisely know how to do this. I've never had to actually fight with a
modularized xorg.conf file before. I have, however, consulted xorg.conf(5) and
modesetting(4).
1) Create /etc/X11/xorg.conf.d. (done)
2) Write a file to put in there. (in progress)
Just modify or create /etc/X11/xorg.conf directly. The xorg.conf.d
mechanism is for snippets shipped in packages.
Post by G. Branden Robinson
The problem is that an Identifier is mandatory for the Device Section I am
writing, and I cannot tell from my Xorg.0.log file what identifier is
"autodetected". How do I figure this out?
The identifier doesn't matter, it would only be used for referring to
the Section "Device" from other sections in the configuration.
Post by G. Branden Robinson
I am attaching my untested conf file.
Looks like that should just work.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
G. Branden Robinson
2017-03-21 23:50:34 UTC
Permalink
Post by Michel Dänzer
Just modify or create /etc/X11/xorg.conf directly. The xorg.conf.d
mechanism is for snippets shipped in packages.
[...]
Post by Michel Dänzer
The identifier doesn't matter, it would only be used for referring to
the Section "Device" from other sections in the configuration.
[...]
Post by Michel Dänzer
Looks like that should just work.
Thanks, Michel. Testing was successful and I followed up to the bug.

Regards,
Branden
Sven Joachim
2017-03-24 20:12:31 UTC
Permalink
Post by Sven Joachim
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.
I'm afraid that didn't help after all. Screenshot attached.
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
Thomas Dickey
2018-11-25 14:54:17 UTC
Permalink
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).
--
Thomas E. Dickey <***@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
Loading...