Closed Scrumplex closed 3 weeks ago
I additionally have this local fontconfig config:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>Fira Code</family>
<prefer><family>Symbols Nerd Font</family></prefer>
</alias>
<alias>
<family>Fira Code,Fira Code Light</family>
<prefer><family>Symbols Nerd Font</family></prefer>
</alias>
<alias>
<family>Fira Code,Fira Code Medium</family>
<prefer><family>Symbols Nerd Font</family></prefer>
</alias>
<alias>
<family>Fira Code,Fira Code Retina</family>
<prefer><family>Symbols Nerd Font</family></prefer>
</alias>
<alias>
<family>Fira Code,Fira Code SemiBold</family>
<prefer><family>Symbols Nerd Font</family></prefer>
</alias>
<alias>
<family>Monocraft</family>
<prefer><family>Symbols Nerd Font</family></prefer>
</alias>
</fontconfig>
The commit is correct as far as I can see, change your font family to fira code medium or fira code retina or whichever variant has the weight you like. Not sure why you are aliasing fira code to nerd font though.
It doesn't seem like any of the Fira Code variations seem to change this behavior at all.
These are the fonts in question here:
$ fc-list | grep "Fira Code"
/nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf: Fira Code,Fira Code Light:style=SemiBold
/nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf: Fira Code,Fira Code Light:style=Light,Regular
/nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf: Fira Code,Fira Code Light:style=Bold
/nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf: Fira Code,Fira Code Light:style=Medium
/nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf: Fira Code,Fira Code Light:style=Regular
/nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf: Fira Code,Fira Code Light
I also tried setting font_family Fira Code Light:style=Medium
and even Bold
with no change at all.
Not sure why you are aliasing fira code to nerd font though.
I use that to support Nerd Font Symbols without using a patched font in applications that don't have a feature like Kitty's symbol_map
. Aliasing it like that makes fontconfig prefer nerd-fonts symbols where applicable (where NF Symbols has a glyph for a certain codepoint) while using Fira Code
for anything else. This is basically the same thing as the upstream fc config: https://github.com/ryanoasis/nerd-fonts/blob/master/10-nerd-font-symbols.conf
Use
font_family Fira Code Light
Then run kitty with --debug-font-fallback and post the output
Repeat with
font_family Fira Code
$ cat fira-code.conf
font_family Fira Code
$ kitty --config fira-code.conf --debug-font-fallback
[0.050] Preloaded font faces:
[0.050] normal face: /nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:0
[0.050] bold face: /nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:0
[0.050] italic face: /nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:0
[0.050] bi face: /nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:0
$ cat fira-code-light.conf
font_family Fira Code Light
$ kitty --config fira-code-light.conf --debug-font-fallback
[0.049] Preloaded font faces:
[0.049] normal face: /nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:0
[0.049] bold face: /nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:0
[0.049] italic face: /nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:0
[0.049] bi face: /nix/store/fbb5h6yk4gallrfqh8770m28dymz4pzw-fira-code-6.2/share/fonts/truetype/FiraCode-VF.ttf:0
OK, that's strange I will take a look when I have a minute.
Well, looks like fontconfig is overloading index to also contain variable font data in the upper 16 bits, sigh. And there is no way to match variable fonts in kitty. Someday I might add support for it, but in the meantime I suggest just uninstalling the variable variant (the one with VF in the filename) or masking it in your fontconfig.
See #3711
Describe the bug After updating to v0.34.0 the font weight of my terminal changed.
I bisected the git history between
v0.34.0
andv0.33.1
and found d2c21ee2973ecda23825b8942989c11caa8193ff to be the culprit. If I revert that commit on top ofv0.34.0
it returns to the previous rendering.To Reproduce Steps to reproduce the behavior:
font_family Fira Code
(https://github.com/tonsky/FiraCode/releases/tag/6.2)Screenshots My config: Left is v0.34.0, right is v0.34.0 with the revert
NONE config: Left is v0.34.0, right is v0.34.0 with the revert
Environment details
Additional context I was able to reproduce this with an empty kitty config