Closed sQVe closed 2 years ago
Then report it to the fontconfig project.
And just for the record, you dont need to do all this dancing in fontconfig. Simply set unpatched Iosevka see the note here: https://sw.kovidgoyal.net/kitty/faq/#kitty-is-not-able-to-use-my-favorite-font
Sure - I'll do that.
What's confusing is that my fontconfig
setup works fine for other applications, like i3wm
, which is why I reported it here first as kitty
is the only application I've seen so far that has problems resolving the fonts.
It isn't not resolving the font, fontconfig has probably reclassified it as non-monospace, one of the hazards of using patched fonts. Just use unpatched ones.
Great tip @kovidgoyal.
I'm trying to find the standalone NERD font but the closes I'm finding on my system (Arch) is ttf-nerd-fonts-symbols
. 🤔
I'm trying to find the standalone NERD font ...
I get it from the following location.
https://github.com/ryanoasis/nerd-fonts/tree/2.2.0-RC/src/glyphs
Symbols-1000-em Nerd Font Complete.ttf
I had compared the file hash from that package before and it is the same.
@page-down Thank you! ❤️
I just tried running:
<alias>
<family>term</family>
<prefer>
<family>Iosevka</family>
</prefer>
</alias>
and it's still unable to resolve the font 🤔
I installed and tried it specifically. Can not reproduce this.
https://github.com/be5invis/Iosevka/releases/download/v11.3.0/ttc-sgr-iosevka-11.3.0.zip
# Arch Linux
# fontconfig 2:2.13.96-1
# kitty 0.24.2 from github releases, and kitty compiled from src
# kitty -o 'font_family term' --debug-font-fallback
Preloaded font faces:
normal face: ~/.local/share/fonts/sgr-iosevka-regular.ttc:0
bold face: ~/.local/share/fonts/sgr-iosevka-bold.ttc:0
italic face: ~/.local/share/fonts/sgr-iosevka-regular.ttc:3
bi face: ~/.local/share/fonts/sgr-iosevka-bold.ttc:3
It is worth noting that I did not install kitty from archlinux.
EDIT: I tried what you mentioned below, and it does get abnormal if you make aliases to monospace. (archlinux fontconfig 2.13.96-1) When I downgraded to fontconfig 2.13.94 it was back to normal.
@page-down Cheers for helping me debug this! ❤️ I've now narrowed this down to:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Set preferred serif, sans serif, and monospace fonts. -->
<alias>
<family>monospace</family>
<prefer>
<family>Cousine</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>term</family>
<prefer>
<family>Iosevka</family>
<family>Symbols Nerd Font</family>
<family>Noto Color Emoji</family>
<family>Symbola</family>
</prefer>
</alias>
</fontconfig>
Strangely enough it seems like kitty
prefers the monospace
alias before my term
alias that I specifically set. Everything resolves nicely if I remove the monospace
alias.
Running fc-match "term"
give me:
iosevka-regular.ttc: "Iosevka" "Regular"
but kitty -o 'font_family term' --debug-font-fallback
gives me:
[038 14:34:54.265336] Preloaded font faces:
[038 14:34:54.265374] normal face: /usr/share/fonts/croscore/Cousine-Regular.ttf:0
[038 14:34:54.265387] bold face: /usr/share/fonts/croscore/Cousine-Bold.ttf:0
[038 14:34:54.265402] italic face: /usr/share/fonts/croscore/Cousine-Italic.ttf:0
[038 14:34:54.265413] bi face: /usr/share/fonts/croscore/Cousine-BoldItalic.ttf:0
I "sort of" solved this by using the monospace
alias instead of the term
alias.
That happens because Iosevka is dual spaced not monospaced so fc-match returns your actual monospaced font and because you are selecting it by an alias not an actual font name, there is no way for kitty to check if fc-match has returned what you wanted. Check it yourself with:
fc-match term:spacing=mono
Describe the bug I set my font via
fontconfig
and with the following section:I just updated
fontconfig
from2.13.94
to2.13.96
and my alias isn't working anymore. Downgradingfontconfig
solves it.To Reproduce Steps to reproduce the behavior:
fontconfig
(2.13.96
).Environment details