mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
Fix #7121
This commit is contained in:
@@ -577,8 +577,7 @@ START_ALLOW_CASE_RANGE
|
|||||||
case 0x2574 ... 0x259f:
|
case 0x2574 ... 0x259f:
|
||||||
case 0x2800 ... 0x28ff:
|
case 0x2800 ... 0x28ff:
|
||||||
case 0xe0b0 ... 0xe0bf: // powerline box drawing
|
case 0xe0b0 ... 0xe0bf: // powerline box drawing
|
||||||
case 0x1fb00 ... 0x1fb97: // symbols for legacy computing
|
case 0x1fb00 ... 0x1fbae: // symbols for legacy computing
|
||||||
case 0x1fb9a ... 0x1fbae: // symbols for legacy computing
|
|
||||||
return BOX_FONT;
|
return BOX_FONT;
|
||||||
default:
|
default:
|
||||||
*is_emoji_presentation = has_emoji_presentation(cpu_cell, gpu_cell);
|
*is_emoji_presentation = has_emoji_presentation(cpu_cell, gpu_cell);
|
||||||
|
|||||||
@@ -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)
|
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()
|
@supersampled()
|
||||||
def half_cross_line(buf: SSByteArray, width: int, height: int, which: str = 'tl', level: int = 1) -> None:
|
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
|
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='top-right'))],
|
||||||
'🮞': [shade, p(mask, p(corner_triangle, corner='bottom-right'))],
|
'🮞': [shade, p(mask, p(corner_triangle, corner='bottom-right'))],
|
||||||
'🮟': [shade, p(mask, p(corner_triangle, corner='bottom-left'))],
|
'🮟': [shade, p(mask, p(corner_triangle, corner='bottom-left'))],
|
||||||
|
'🮘': [cross_shade],
|
||||||
|
'🮙': [p(cross_shade, rotate=True)],
|
||||||
|
|
||||||
'▔': [p(eight_bar, horizontal=True)],
|
'▔': [p(eight_bar, horizontal=True)],
|
||||||
'▕': [p(eight_bar, which=7)],
|
'▕': [p(eight_bar, which=7)],
|
||||||
|
|||||||
Reference in New Issue
Block a user