mirror of
https://github.com/kovidgoyal/kitty.git
synced 2025-12-13 20:36:22 +01:00
@@ -78,6 +78,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
|
||||
- macOS: Fix a rare crash on exit (:iss:`3686`)
|
||||
|
||||
- Fix ligatures not working with the Iosevka font (requires Iosevka >= 7.1)
|
||||
(:iss:`297`)
|
||||
|
||||
|
||||
0.20.3 [2021-05-06]
|
||||
----------------------
|
||||
|
||||
@@ -576,7 +576,7 @@ place_bitmap_in_canvas(pixel *cell, ProcessedBitmap *bm, size_t cell_width, size
|
||||
dest.top = baseline - yoff;
|
||||
}
|
||||
|
||||
/* printf("x_offset: %d bearing_x: %f y_offset: %d bearing_y: %f src_start_row: %u src_start_column: %u dest_start_row: %u dest_start_column: %u bm_width: %lu bitmap_rows: %lu\n", xoff, bearing_x, yoff, bearing_y, src.top, src.left, dest.top, dest.left, bm->width, bm->rows); */
|
||||
/* printf("x_offset: %d y_offset: %d src_start_row: %u src_start_column: %u dest_start_row: %u dest_start_column: %u bm_width: %lu bitmap_rows: %lu\n", xoff, yoff, src.top, src.left, dest.top, dest.left, bm->width, bm->rows); */
|
||||
|
||||
if (bm->pixel_mode == FT_PIXEL_MODE_BGRA) {
|
||||
copy_color_bitmap(bm->buf, cell, &src, &dest, bm->stride, cell_width);
|
||||
|
||||
@@ -99,16 +99,22 @@ class Rendering(BaseTest):
|
||||
def groups(text, font=None):
|
||||
return [x[:2] for x in ss(text, font)]
|
||||
|
||||
for font in ('FiraCode-Medium.otf', 'CascadiaCode-Regular.otf'):
|
||||
for font in ('FiraCode-Medium.otf', 'CascadiaCode-Regular.otf', 'iosevka-regular.ttf'):
|
||||
g = partial(groups, font=font)
|
||||
self.ae(g('abcd'), [(1, 1) for i in range(4)])
|
||||
self.ae(g('----'), [(4, 4)])
|
||||
self.ae(g('A===B!=C'), [(1, 1), (3, 3), (1, 1), (2, 2), (1, 1)])
|
||||
self.ae(g('F--a--'), [(1, 1), (2, 2), (1, 1), (2, 2)])
|
||||
self.ae(g('===--<>=='), [(3, 3), (2, 2), (2, 2), (2, 2)])
|
||||
self.ae(g('==!=<>==<><><>'), [(4, 4), (2, 2), (2, 2), (2, 2), (2, 2), (2, 2)])
|
||||
self.ae(g('A=>>B!=C'), [(1, 1), (3, 3), (1, 1), (2, 2), (1, 1)])
|
||||
self.ae(g('-' * 18), [(18, 18)])
|
||||
if 'iosevka' in font:
|
||||
self.ae(g('--->'), [(4, 4)])
|
||||
self.ae(g('-' * 12 + '>'), [(13, 13)])
|
||||
self.ae(g('<~~~'), [(4, 4)])
|
||||
self.ae(g('a<~~~b'), [(1, 1), (4, 4), (1, 1)])
|
||||
else:
|
||||
self.ae(g('----'), [(4, 4)])
|
||||
self.ae(g('F--a--'), [(1, 1), (2, 2), (1, 1), (2, 2)])
|
||||
self.ae(g('===--<>=='), [(3, 3), (2, 2), (2, 2), (2, 2)])
|
||||
self.ae(g('==!=<>==<><><>'), [(4, 4), (2, 2), (2, 2), (2, 2), (2, 2), (2, 2)])
|
||||
self.ae(g('-' * 18), [(18, 18)])
|
||||
colon_glyph = ss('9:30', font='FiraCode-Medium.otf')[1][2]
|
||||
self.assertNotEqual(colon_glyph, ss(':', font='FiraCode-Medium.otf')[0][2])
|
||||
self.ae(colon_glyph, 1031)
|
||||
|
||||
BIN
kitty_tests/iosevka-regular.ttf
Normal file
BIN
kitty_tests/iosevka-regular.ttf
Normal file
Binary file not shown.
Reference in New Issue
Block a user