-
-
Notifications
You must be signed in to change notification settings - Fork 956
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
[RFC] OpenType Variable font support and new UI for choosing fonts #7570
Comments
I have an issue building on Arch Linux:
|
Nevermind. My bad. |
After pressing enter on the initial font selection screen I get this:
|
Are you running kitten choose-fonts inside an instance of kitty built from source as well? |
You are right. I was somehow getting my kitty versions mixed up. I deinstalled the arch version of kitty and restarted all my kitty sessions and now it works. |
I get segfault when trying to select any Monaspace's font from the list. kittly nightly build $ kitten choose-fonts
Error: signal: segmentation fault |
Works for me with both Monaspace Argon Var and Monaspace Neon. Post the actual backtrace. What OS are you running on? And exactly what steps dd you take leading to the segfault. |
MacOS 12.7.1.
The only output I get is
I just installed the nightly build. Previously I was on latest stable.
|
There is something going on with ligatures in the font preview, parts of them are invisible. You can see in the first screenshot below that part of the Preview of JetBrains Mono, looks wrong: Preview of JetBrains Mono NL (same font without ligatures), looks correct: The same characters printed normally in the terminal with JetBrains Mono (with ligatures), looks correct: The font is installed from the ttf-jetbrains-mono package in Arch Linux, version 2.304-1. Running kitty commit 1900480. |
On Mon, Jun 24, 2024 at 09:09:07AM -0700, Jorge Villalobos wrote:
> What OS are you running on?
MacOS 12.7.1.
> Post the actual backtrace
The only output I get is `Error: signal: segmentation fault`. Is there a log file with more details?
There should be a crash report available via Console.app
> And exactly what steps dd you take leading to the segfault
I just installed the nightly build. Previously I was on latest stable.
1. run `kitten choose-fonts`
2. Kitten loads. I can see a list of font families.
3. I change current selection with arrows keys ↑ ↓
4. If I move into any of Monaspace's (just selecting it in the left list, not choosing it pressing enter), the process exits and I get the output mentioned above.
Doesnt repro for me on macOS, however, I can only get the Monaspace Var
fonts to show up not the non variable ones. Are you using up to date
monaspace fonts and where exactly did you get them from?
|
On Mon, Jun 24, 2024 at 09:24:38AM -0700, Trygve Aaberge wrote:
There is something going on with ligatures in the font preview, parts of them are invisible. You can see in the first screenshot below that part of the `<=>` and `|}` ligatures are missing.
|
Thanks, works now. |
Crash report
Likewise, only var fonts show up.
Yes V1.101. Followed install instructions as specified at monaspace's README.md
|
Hmm, that backtrace has no kitty code in it. Could indicate memory corruption. Can you build kitty with sanitizers as described here: https://sw.kovidgoyal.net/kitty/build/#building-in-debug-mode might give a more useful backtrace. Also does the crash happen if you run kitty --config=NONE kitten choose-fonts and try to select the monaspace fonts. |
Can I suggest you add a default keybinding? I have Also, the text on the final screen says |
On Thu, Jul 04, 2024 at 01:50:51AM -0700, CJ van den Berg wrote:
Can I suggest you add a default keybinding? I have
`map ctrl+shift+f7 launch --type tab kitten choose-font`
I'm not sure changing fonts is something most people do frequently
enough to warrant a default key binding. For less frequent use a command
is easier to remember/lookup.
Also, the text on the final screen says `Enter to modify kitty.conf and use the new fonts`, but pressing `Enter` only saves the config and does not actually load the new config as the text implies. I have to refresh the config with a `load_config_file` keybind manually.
Are you sure? It works for me, indeed its the same code as
that used by the themes kitten to reload. If you are sure, what OS are
you on?
|
Arch Linux. Removing my existing config and then running kitty doesn't make any difference. The themes kitten doesn't reload automatically for me either. |
Odd, works fine on Arch for me, indeed Arch is my main box and the Also check that stdout/stderr of the kitty process (by running it from a |
Ok. I've figured it out. If I launch kitty via a symbolic link to the kitty binary then auto reload does not work. If I call the binary directly it works as expected. |
Your symbolic link is not named kitty? |
No, in this case it was called kitty-git. |
This should fix it: da9a36d |
Yep, that fixed it. |
No it will not. Your font needs to have an italic face that is metric compatible with the regular face for that, it has no connection with font selection/features/variability. |
The issue described in #7647 seems to be resolved when using the nightly build, which is great. However, I ran into another problem, which is that a font that previously worked, doesn't seem to show up when running I was able to see it before when running The font in question is |
Did it show up in kitty list-fonts with previous kitty releases? And what OS is this? |
If its a publicly available font attach it here otherwise email it to me (my email address is at the top of most kitty source code files) and I will take a look. |
I'm on Mac. I double checked again, and I might not have remembered correctly. It did not show up with I sent you a e-mail with the font files. |
Your font shows up on Linux but not on macOS. That is because CoreText (Apple's font framework) does not think the font is monospaced. More precisely the font traits for this font returned from CoreText dont have the kCTFontTraitMonoSpace trait. Relevant code starting from line 261 in core_text.m I dont see any issues with that code. |
And browsing the "Fixed width" collection in Apple's own Font Book does not show Cartograph. So you should report the issue to the font's developers. And on Linux, fontconfig thinks all the faces have the same weight.
This is an extremely buggy font. |
Can't click on about any font weight regardless if it is VF or not, crashes instantly. MacOS (15b M2 Pro) |
Strange dont see how that style could be empty, but anyway, this should fix the panic: 573058d |
Fixed, thank you, you rock <3 |
When I try to use Monaspice Nerd Font I'm unable to find it when I select the fonts. Does this fix that? They are |
Whether a font is monospace or not is decided by the OS, if the OS thought Monaspace is not monospaced then it still wont think so and you still wont be able to select it. |
released in version 0.36.0 |
Since Kitty 0.36.0, perhaps due to [1], its opportunistic wide rendering [2] doesn't play well with non-purely-monospace fonts under macOS. Single-columned emojis often trigger this behaviour incorrectly. As it's quite hacky to mix them into a font and use the font as a monospace one in the first place, considering emoji fallback in macOS works quite well already, --monospace flag now allows creating a true fixed-width monospace font. [1] kovidgoyal/kitty#7570 [2] https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.narrow_symbols
Hi all,
I have added support to kitty for OpenType variable fonts. This means that, for fonts that support it, you can precisely control the weight, spacing, italic angle, etc. There is also a new UI in the form of the choose-fonts kitten to make selecting fonts and setting their features and variable values easier. Run it with:
See the docs for the this kitten
Some screenshots of the kitten:
The code works on both Linux and macOS. Note that this required extensive re-writing of font selection internals so there could be regressions.
I would appreciate some testing from those of you in a position to do so, as there are two platforms and dozens of fonts and settings and thousands of lines of code involved, it's hard for me to cover everything.
You can use the kitty nightly build or build kitty from source.
Note that the existing font_features setting in kitty.conf still works, but is obsoleted by the new choose fonts kitten. It should only be used for fallback fonts. The main fonts should have their features configured via choose-fonts.
Thanks, and enjoy.
The text was updated successfully, but these errors were encountered: