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 using the fonts asked for (not monospace?) #179
Comments
kitty only uses monospace fonts, that is the fonts listed under kitty list-fonts. Because kitty speeds up rendering by storing individual cell glyphs on the GPU, and monospaced font is really needed. It could use non-monospaced fonts, but that would lead to many rendering artifacts and lots of bug reports that I dont want to deal with. |
Well, Iosevka is a monospace font, isn't it? There does not seem to be any problems with Fira Code either, although in this case it is accepted by kitty. I'm also trying to get the ligatures of Iosevka to render with kitty, the same way they did for Fira Code. What does need changing in the font for kitty to accept to use it? |
Iosevka is not a monospace font. Iosevka Term (or something similar) is the monospace variant and that does not have ligatures. |
Iosevka Term is just Iosevka with ligation disabled. How come one can be a monospace font and not the other? |
Why dont you ask the creator of Iosevka that? All fonts that identify themselves as monospaced will show up when you do kitty list-fonts. If the font is listed in that, it can be used, if not, it cannot. |
Sure, I'll do that. I'm not laying blame here, just trying to understand how this works. |
Ok, so Iosevka has a What do you think @kovidgoyal ? |
What's more I have built a version of Iosevka that is considered monospace, but with the ligations included. They are not loaded in kitty though. |
spacing has nothing to do with ligatures. spacing is about whether individual glyphs in the font are all designed to be equally wide or not. In monospaced fonts a N character ligature is typically implemented as N-1 dummy glyphs and 1 glyph whose width is N times the width of a single glyph, with a negative left bearing. For example:
hb-shpae is a frontend to harfbuzz, which is what kitty uses for ligatures. |
The other approach to ligatures, which is common in non-monospaced fonts is to simply substitute a single wide glyph for N monospaced glyphs. Since v 0.7 kitty supports that approach as well. For example:
|
Ok, so even if a font includes wide glyphs, then it is still considered a monospace font? I see. So in theory no problem for Iosevka then. Hmmm:
There seems to be something wrong with my build of the font |
yes, the presence of ligatures does not affect whether a font is considered monospace or not as far as kitty is concerned. All that matters is its spacing. |
Ok, now I have a build that is recognized by kitty. Ligations are off somehow though: Here is the ttf file of the font: https://framadrop.org/r/163QLHkQI9#y60ZdwuHquUijvj/kaFzxET90CYZwoY7bO4oEaJYpIg= I'm also talking to the person/team behind Iosevka to see whether this should be resolved at the font level or in kitty. EDIT: From the font team “The file is correct and the ligations are working, but your terminal shrinked the glyphs with its ink box wider than 1/2em.” Maybe I should open another issue for that. |
+1, same issue here |
Any progress on this? |
See #297 |
I'm trying to use kitty with Iosevka. But its not loading it either if I set
font_family
or run it withkitty -o "font_family=Iosevka"
. I checked that is loading a default font (usinglsof
).I supose the reason is that Iosevka don't have
spacing: 100
:Iosevka is also not listed under
kitty list-fonts
. Iosevka Term works with kitty but it don't have ligatures.Another font with the same behaviour (don't load but the Mono version without ligatures do) is Pragmata Pro. Is this a bad implementation of ligatures on these fonts or is there something kitty can do about? (Fira Code and Hasklig works for me).
The text was updated successfully, but these errors were encountered: