Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not recognized as monospace by fontconfig on linux #10

Open
acrispino opened this issue May 2, 2024 · 1 comment
Open

Not recognized as monospace by fontconfig on linux #10

acrispino opened this issue May 2, 2024 · 1 comment

Comments

@acrispino
Copy link

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
Copy link
Collaborator

dzaima commented May 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants