abrudz / APL386

APL385 Unicode font evolved
https://abrudz.github.io/APL386
The Unlicense
107 stars 5 forks source link

Not recognized as monospace by fontconfig on linux #10

Open acrispino opened 2 months ago

acrispino commented 2 months ago

I wanted to use APL386 with gnome-terminal, but after installing the font it was not available for selection.

The FAQ for a different terminal emulator led me to an explanation and workaround: kitty is not able to use my favorite font?. Apparently the fontconfig package doesn't consider APL386 to be monospace based on the glyph widths.

It's possible to override fontconfig with this file placed at ~/.config/fontconfig/fonts.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="scan">
    <test name="family">
        <string>APL386 Unicode</string>
    </test>
    <edit name="spacing">
        <int>100</int>
    </edit>
</match>
</fontconfig>

That fixed gnome-terminal's font selector for me and so far things look fine.

dzaima commented 2 months ago

Tried looking at this again for BQN386, and apparently some glyphs did not in fact have a width of 600 - namely and some in the range of ... had a wrong width. A fix of this would be to select those glyphs (or select all glyphs (making sure Encoding → Compact is enabled, otherwise it'll take forever)) and right-click → Set Width. With this (and potentially some other things, idk), I've got BQN386 appearing in gnome-terminal's font list. Something similar could likely be done for APL386 here.