diff --git a/kitty/fonts.c b/kitty/fonts.c index 6a5e6a12d..aeac4397d 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -577,8 +577,7 @@ START_ALLOW_CASE_RANGE case 0x2574 ... 0x259f: case 0x2800 ... 0x28ff: case 0xe0b0 ... 0xe0bf: // powerline box drawing - case 0x1fb00 ... 0x1fb97: // symbols for legacy computing - case 0x1fb9a ... 0x1fbae: // symbols for legacy computing + case 0x1fb00 ... 0x1fbae: // symbols for legacy computing return BOX_FONT; default: *is_emoji_presentation = has_emoji_presentation(cpu_cell, gpu_cell); diff --git a/kitty/fonts/box_drawing.py b/kitty/fonts/box_drawing.py index 1ab9a5b1b..2d8b15704 100644 --- a/kitty/fonts/box_drawing.py +++ b/kitty/fonts/box_drawing.py @@ -280,6 +280,21 @@ def cross_line(buf: SSByteArray, width: int, height: int, left: bool = True, lev thick_line(buf, width, height, buf.supersample_factor * thickness(level), p1, p2) +@supersampled() +def cross_shade(buf: SSByteArray, width: int, height: int, rotate: bool = False, density_factor: int = 4) -> None: + line_thickness = buf.supersample_factor * thickness(1) + delta = int(density_factor * line_thickness) + + if rotate: + for x in range(0, width, delta): + thick_line(buf, width, height, line_thickness, (0 + x, height), (width + x, 0)) + thick_line(buf, width, height, line_thickness, (0 - x, height), (width - x, 0)) + else: + for x in range(0, width, delta): + thick_line(buf, width, height, line_thickness, (0 + x, 0), (width + x, height)) + thick_line(buf, width, height, line_thickness, (0 - x, 0), (width - x, height)) + + @supersampled() def half_cross_line(buf: SSByteArray, width: int, height: int, which: str = 'tl', level: int = 1) -> None: thickness_in_pixels = thickness(level) * buf.supersample_factor @@ -926,6 +941,8 @@ box_chars: Dict[str, List[Callable[[BufType, int, int], Any]]] = { '🮝': [shade, p(mask, p(corner_triangle, corner='top-right'))], '🮞': [shade, p(mask, p(corner_triangle, corner='bottom-right'))], '🮟': [shade, p(mask, p(corner_triangle, corner='bottom-left'))], + '🮘': [cross_shade], + '🮙': [p(cross_shade, rotate=True)], '▔': [p(eight_bar, horizontal=True)], '▕': [p(eight_bar, which=7)],