Giter Club home page Giter Club logo

Comments (7)

kovidgoyal avatar kovidgoyal commented on August 16, 2024 1

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

from kitty.

Scrumplex avatar Scrumplex commented on August 16, 2024

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>

from kitty.

kovidgoyal avatar kovidgoyal commented on August 16, 2024

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.

from kitty.

Scrumplex avatar Scrumplex commented on August 16, 2024

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

from kitty.

kovidgoyal avatar kovidgoyal commented on August 16, 2024

Use

font_family Fira Code Light

Then run kitty with --debug-font-fallback and post the output

Repeat with

font_family Fira Code

from kitty.

Scrumplex avatar Scrumplex commented on August 16, 2024
$ 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

from kitty.

kovidgoyal avatar kovidgoyal commented on August 16, 2024

OK, that's strange I will take a look when I have a minute.

from kitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.