kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
23.58k stars 950 forks source link

KeyError: 2 missing entries in box_drawing.py #7117

Closed ReubenM closed 6 months ago

ReubenM commented 6 months ago

Thank you so much for implementing #7110!

I patched kitty-0.32.1 with 4bcf69a and 576a269 to test it out. The two characters U+1FB98 and U+1FB99 match the range of the case statement in fonts.c, but they do not have any corresponding entries in box_drawing.py resulting in a KeyError when used.

 Traceback (most recent call last):
  File "/usr/bin/../lib64/kitty/kitty/fonts/render.py", line 422, in render_box_drawing
    render_box_char(
  File "/usr/bin/../lib64/kitty/kitty/fonts/box_drawing.py", line 1086, in render_box_char
    for func in box_chars[ch]:
KeyError: '🮘'

I believe the difference between these two characters and med-shaded characters is that these are intended to be shaded with diagonal stripes (in opposing directions) rather than the med-shade checker pattern: https://www.compart.com/en/unicode/block/U+1FB00 Does there exist a drawing method for that?

kovidgoyal commented 6 months ago

No there is no prebuilt code for that, you will need to write your own.