Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Dec 9, 2024
1 parent e4a0587 commit 41c9e39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kitty/fonts/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def create_narrow_symbols(opts: Options) -> tuple[tuple[int, int, int], ...]:
descriptor_overrides: dict[int, tuple[str, bool, bool]] = {}


def descriptor_for_idx(idx: int) -> tuple[Union[FontObject | str], bool, bool]:
def descriptor_for_idx(idx: int) -> tuple[Union[FontObject, str], bool, bool]:
ans = descriptor_overrides.get(idx)
if ans is None:
return current_faces[idx]
Expand Down
6 changes: 5 additions & 1 deletion kitty_tests/fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ def multiline_render(text, scale=1, width=1, **kw):
return ans

def block_test(*expected, **kw):
for i, (expected, actual) in enumerate(zip(expected, multiline_render(kw.pop('text', '█'), **kw), strict=True)):
try:
z = zip(expected, multiline_render(kw.pop('text', '█'), **kw), strict=True)
except TypeError:
z = zip(expected, multiline_render(kw.pop('text', '█'), **kw))
for i, (expected, actual) in enumerate(z):
assert_blocks(expected(), actual, f'Block {i} is not equal')


Expand Down

0 comments on commit 41c9e39

Please sign in to comment.