Fix triangle glyphs scaling by drawing them manually#2074
Fix triangle glyphs scaling by drawing them manually#2074kovidgoyal merged 9 commits intokovidgoyal:masterfrom bew:fix-triangle-symbol-scaling
Conversation
The `screen_size` function was not initialized yet
|
Please resolve the conflicts then I will merge. |
|
|
|
Note: I didn't test this last change on glyph ids as I'm not on my computer right now, will do later today if you don't |
|
I get a test failure now: I'm not sure what to do here.. |
| display_bitmap(rgb_data, width, height) | ||
| finally: | ||
| set_send_sprite_to_gpu(None) | ||
| with setup_for_testing(family, sz) as (_, width, height): |
There was a problem hiding this comment.
Is there an advantage in using
with setup_for_testing(family, sz) as (_, width, height):instead of just
(_, width, height) = setup_for_testing(family, sz)?
There was a problem hiding this comment.
Well, setup_for_testing is actually a class now, not a function (and the previous code hasn't been updated when the change happened, and simply didn't work):
Line 222 in 7d8edcc
This syntax with the with ... as ... : and an indented block will do some operation before entering the block (the __enter__ method of the returned obj), then do some more thing at the end of the block (the __exit__ method).
There was a problem hiding this comment.
Thanks for the explanation.
Fixes #2006
🎉 🎉 🎉
Thanks for the help @kovidgoyal
I updated the testing functions to use the new format of the class
setup_for_testing(was probably a function before, now it uses awith ...:syntax).I also changed something in icat, because the testing functions for box drawing make use of the method
showfrom icat, which previously gave an error saying thatscreen_sizeis None at this line:kitty/kittens/icat/main.py
Line 125 in 26b7b1e
(which is called from
show)