-
Notifications
You must be signed in to change notification settings - Fork 122
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
Make ligatures "monospaced" and use complex character substitution #77
Comments
This commit will update `kitty.conf` to switch the font from Dank Mono to Recursive (`Rec Mono Duotone`). This commit is part of a switch from Dank Mono to Recursive. Although Dank Mono does render in VSCode, it is not correctly monospaced and therefore stopped working in some applications that have more strict font requirements, like the terminal emulator kitty (kitty >=0.36). https://www.recursive.design/ https://github.com/arrowtype/recursive https://sw.kovidgoyal.net/kitty/changelog/ https://sw.kovidgoyal.net/kitty/faq/#kitty-is-not-able-to-use-my-favorite-font Explanation from Dank Mono creator Phil Pluckthun via email: > Some terminal applications require a specific monospace flag to be set > in the font file that was only gaining traction after the font was > released. Some also just don't support fonts with ligatures. In Dank > Mono's case the specific flag that some applications require to select > the font as a monospaced one simply isn't set, and a different, older > one is set instead. Related issues: eigilnikolajsen/commit-mono#15 IdreesInc/Monocraft#26 IdreesInc/Monocraft#77 tonsky/FiraCode#1325 vercel/geist-font#33
This commit will update the README to document the switch from Dank Mono to the Recursive font (`Rec Mono Duotone`). Although Dank Mono does render in VSCode, it is not correctly monospaced and therefore stopped working in some applications that have more strict font requirements, like the terminal emulator kitty (kitty >=0.36). https://www.recursive.design/ https://github.com/arrowtype/recursive https://sw.kovidgoyal.net/kitty/changelog/ https://sw.kovidgoyal.net/kitty/faq/#kitty-is-not-able-to-use-my-favorite-font Explanation from Dank Mono creator Phil Pluckthun via email: > Some terminal applications require a specific monospace flag to be set > in the font file that was only gaining traction after the font was > released. Some also just don't support fonts with ligatures. In Dank > Mono's case the specific flag that some applications require to select > the font as a monospaced one simply isn't set, and a different, older > one is set instead. Related issues: eigilnikolajsen/commit-mono#15 IdreesInc/Monocraft#26 IdreesInc/Monocraft#77 tonsky/FiraCode#1325 vercel/geist-font#33
For anyone looking for a workaround, I seem to have stumbled upon one here:
Use the width automatically provided in the "Set Width To" dialog. CAVEATS:
Attached is a zip file of all the weights after going through this process, should work if you're on macOS and need an actually monospaced font. |
@speelbarrow That doesn't work for ligatures though, because ligature character width must be the same as the entire substring width. I'll see what i can do. |
@Dheatly23 Okay, but, counterpoint: I tried it and they still work (sometimes) Neovide v0.13.3Kitty v0.36.4 Kitty has always been a bit weird about ligatures (in my experience, at least), so I'd take that second screenshot with a grain of salt as well. Obviously this is not a full solution to this issue, but perhaps it's a start? I'm by no means a font developer so I'll defer to the judgment of others on this one. Just thought I'd chime in with what I've already tried. |
The ligature characters used in Monocraft replace multiple characters and so are bigger than the other characters in the font. This causes the font to not technically be classified as a monospaced font on Mac. Fonts like Hasklig and FiraCode use complex character substitution that replace the characters with ligature glyphs that go beyond the bounds and spacer characters to match the width of the original character set. I am not sure how to reproduce this in FontForge and it seems to be complicated, so any help on how to replace multiple characters (like "===") with other multiple characters (like "[SPACE][SPACE][LIG]") would be appreciated!
The text was updated successfully, but these errors were encountered: