You are not logged in.

#1 2016-04-29 16:21:57

rmanne
Member
Registered: 2015-12-08
Posts: 11

[Solved] Urxvt letterspace makes some characters look glitchy

Using rxvt-unicode, the following is with letterspace: -1 (in my Xresources).
dxmVgUZ.png

But with letterspace: -2 (my preferred):
VNkXPFD.png
if4JfOP.png

How do I fix this issue? This, as far as I can tell, only happens to italicized fonts. It used to happen to some other characters as well but stopped when I switched to infinality, but this one happens whether I'm on infinality freetype/fontconfig or not.

For more information, the primary font I'm using is Adobe Source Code Pro (and DejaVu for the missing glyphs).

The only file in /etc/fonts/conf.d (stolen mostly from parts of infinality's defaults):

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>

    <match target="pattern">
        <test qual="all" name="family" compare="not_eq"><string>sans-serif</string></test>
        <test qual="all" name="family" compare="not_eq"><string>serif</string></test>
        <test qual="all" name="family" compare="not_eq"><string>monospace</string></test>
        <edit name="family" mode="append_last"><string>sans-serif</string></edit>
    </match>

    <match target="pattern">
        <edit name="bitmap_monospace" mode="assign"><bool>false</bool></edit>
    </match>

    <match target="font">
        <edit name="rgba" mode="assign"><const>rgb</const></edit>
        <edit name="hinting" mode="assign"><bool>true</bool></edit>
        <edit name="autohint" mode="assign"><bool>true</bool></edit>
        <edit name="antialias" mode="assign"><bool>true</bool></edit>
        <edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
        <edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>

        <edit name="embeddedbitmap" mode="assign"><bool>false</bool></edit>
        <edit name="force_autohint" mode="assign"><bool>true</bool></edit>
    </match>

</fontconfig>

EDIT: I downloaded the source code for rxvt-unicode, and it turns out this is caused by falling back on glyphs because the overlap is too much. If you change OVERLAP_OK to just always return true, it works as intended, hopefully this won't break too much compatibility.....

It now looks like this:
22Jfn58.png

Last edited by rmanne (2016-04-29 20:21:11)

Offline

#2 2016-04-29 18:56:03

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Urxvt letterspace makes some characters look glitchy

Nice. Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-04-30 01:49:47

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [Solved] Urxvt letterspace makes some characters look glitchy

There is a patch for rxvt that fixes that bug in rxvt about font character widths, and then it does not need "letterspace = -1" in Xresources anymore. I think the AUR package "rxvt-unicode-patched" uses it, so maybe check that one out. You would then not have to maintain your own version of rxvt.

Offline

Board footer

Powered by FluxBB