You are not logged in.

#1 2020-04-27 15:08:44

Liovbt
Member
Registered: 2020-04-27
Posts: 3

[SOLVED] urxvt unicode characters are displayed without antialiasing

Hi, I am trying to configure the terminal font on a new Arch installation, but cannot get it right after two days of searching around. Font configuration is always so painful...

With xterm I get too much horizontal spacing between glyphs. I cannot find a config option to solve it on xterm, so I try with urxvt which has a "letterSpace" option. The spacing is then better but unicode characters are displayed without anti-aliasing, which is especially annoying for box drawing curved characters.

Here is my .Xresources:

Xft.antialias:  true
Xft.rgba:       rgb
Xft.hinting:    true
Xft.hintstyle:  hintmedium
Xft.lcdfilter:  lcddefault

URxvt.letterSpace: -1
URxvt.font: xft:LiberationMono:size=10
URxvt.scrollBar: false

XTerm*faceName: LiberationMono:size=10

And here is a screenshot of the result. Above is xterm, where box round characters are properly anti-aliased, but horizontal spacing is too big. Below is urxvt, where horizontal spacing is good but round box characters are not anti-aliased.

screenshot

Any idea how I can get at least one of the two fixed ?

Last edited by Liovbt (2020-04-28 12:48:07)

Offline

#2 2020-04-27 15:16:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,516
Website

Re: [SOLVED] urxvt unicode characters are displayed without antialiasing

Have you tried adding antialias=true to the font string, rather than just using the xft resource entries?  E.g.,

URxvt.font: xft:LiberationMono:size=10:antialias=true

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-04-27 15:55:56

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,706

Re: [SOLVED] urxvt unicode characters are displayed without antialiasing

This is probably rather a matter of glyph resolution. The glyphs in question ("unicode" != "chinese", btw. everything > 7bit is 8bit unicode encoded) are not provided by LiberationMono (not the font I got installed)
You probably don't have the problem with eg. "ü"?

xterm will resolve the font from the next best match in fonctconfig, which is some non-monospace font and urxvt will only allow monospace fonts and probably end up w/ some bitmap font from X11

=> Get a monospace font that provides the desired codepages and ensure it's resolved by fontconfig and/or enforce its usage in urxvt as primary or secondary font.

Online

#4 2020-04-27 17:48:30

Liovbt
Member
Registered: 2020-04-27
Posts: 3

Re: [SOLVED] urxvt unicode characters are displayed without antialiasing

I have tried already Noto Sans Mono and Fira Code which has advertised support for unicode box drawing chars.

URxvt.letterSpace: -1
URxvt.font: xft:FiraCode:size=10:antialias=true

XTerm*faceName: FiraCode:size=10

Result is the same. We can see that both xterm and urxvt resolve to the correct font thanks to the distinct @ of Fira Code. But xterm has spaces between box drawing chars and urxvt has no antialiasing.

screenshot

Offline

#5 2020-04-28 05:33:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,706

Re: [SOLVED] urxvt unicode characters are displayed without antialiasing

man urxvt wrote:

       -sbg
           Compile frills: Disable the usage of the built-in block graphics/line drawing characters and just rely on what the specified fonts provide. Use this if you have a
           good font and want to use its block graphic glyphs; resource skipBuiltinGlyphs.

Online

#6 2020-04-28 07:45:25

Liovbt
Member
Registered: 2020-04-27
Posts: 3

Re: [SOLVED] urxvt unicode characters are displayed without antialiasing

Works perfectly, thanks a lot! smile

Offline

#7 2020-04-28 10:44:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,706

Re: [SOLVED] urxvt unicode characters are displayed without antialiasing

Awesome, I initially misinterpreted the antialiased chinese glyphs as the issue - my bad.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

Board footer

Powered by FluxBB