-
-
Notifications
You must be signed in to change notification settings - Fork 958
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
mac: box drawing rounded corners are not rounded #2240
Comments
Yes, I have never bothered implementing drawing of rounded corners. I |
It would be cool to render border, for example you can make the floating window on neovim with rounded borders like this https://github.com/Blacksuan19/init.nvim/blob/d4577a9e522861edda0996589279c226dadcc415/init.vim#L334 @ahmedelgabri did you hack some solution? |
No, I didn't have time to do it yet. Feel free to pick it up if you want. |
I think it's possible to disable Kitty's box drawing code and use the glyphs in the font. Does that work for you? |
Not sure what is the option to disable box drawing, can you give me a hand? |
Try this: diff --git a/kitty/fonts/box_drawing.py b/kitty/fonts/box_drawing.py
index d03f5bec..ecb6236b 100644
--- a/kitty/fonts/box_drawing.py
+++ b/kitty/fonts/box_drawing.py
@@ -707,6 +707,7 @@ def test_drawing(sz=48, family='monospace'):
return concat_cells(width, height, False, cells)
def render_chr(ch):
+ return space
if ch in box_chars:
cell = bytearray(len(space))
render_box_char(ch, cell, width, height) Of course, it will require you to compile kitty. |
(If my idea works for you, I'll make a PR to make it an official option.) |
I'm sorry, my previous patch is bad. Please try this one, I'm sure it works on my system this time. My eyesight is bad, and I thought I saw a difference before, but there was none. Not at all beautiful, but possible. diff --git a/kitty/fonts.c b/kitty/fonts.c
index 0c6d1f43..02a7186a 100644
--- a/kitty/fonts.c
+++ b/kitty/fonts.c
@@ -581,15 +581,6 @@ START_ALLOW_CASE_RANGE
case ' ':
case '\t':
return BLANK_FONT;
- case 0x2500 ... 0x2573:
- case 0x2574 ... 0x259f:
- case 0xe0b0 ... 0xe0b4:
- case 0xe0b6:
- case 0xe0b8: //
- case 0xe0ba: //
- case 0xe0bc: //
- case 0xe0be: //
- return BOX_FONT;
default:
ans = in_symbol_maps(fg, cpu_cell->ch);
if (ans > -1) return ans; (Compile with CFLAGS |
I'm afraid using fonts for box drawing characters is a no-go. They wont |
Oh OK, I understand. Yes, as my screenshot shows, it looks very ugly. I think it might be possible to make a font that understands how Kitty renders which would work, but at that point, we should just add whatever is needed to |
Drawing the curve is relatively easy it should be doable using a cubic |
And I just added support for antialiasing using super sampling which should make this easier. |
Hey @kovidgoyal, how can I test? |
You need to add @supersampled() to any function whose result you want |
Left: kitty 0.15.1, right: iterm2 Build 3.3.7
For example:
╰
Font is PragmataPro
Same with other fonts (they all work in iterm)
FiraCode
Iosevka
The text was updated successfully, but these errors were encountered: