diff --git a/kitty/fonts.c b/kitty/fonts.c index a02e8b616..9869482c3 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -601,6 +601,7 @@ START_ALLOW_CASE_RANGE case 0xe0bc: //  case 0xe0be: //  case 0x1fb00 ... 0x1fb8b: // symbols for legacy computing + case 0x1fba0 ... 0x1fbae: return BOX_FONT; default: ans = in_symbol_maps(fg, cpu_cell->ch); @@ -639,7 +640,9 @@ START_ALLOW_CASE_RANGE case 0xe0b0 ... 0xe0d4: return 0xa0 + ch - 0xe0b0; // IDs from 0xa0 to 0xc4 case 0x1fb00 ... 0x1fb8b: - return 0xc5 + ch - 0x1fb00; + return 0xc5 + ch - 0x1fb00; // IDs from 0xc5 to 0x150 + case 0x1fba0 ... 0x1fbae: + return 0x151 + ch - 0x1fba0; default: return 0xffff; } diff --git a/kitty/fonts/box_drawing.py b/kitty/fonts/box_drawing.py index e40d1c999..1570a93ca 100644 --- a/kitty/fonts/box_drawing.py +++ b/kitty/fonts/box_drawing.py @@ -303,6 +303,26 @@ def half_cross_line(buf: BufType, width: int, height: int, which: str = 'tl', le thick_line(buf, width, height, thickness_in_pixels, p1, p2) +@supersampled() +def mid_lines(buf: BufType, width: int, height: int, level: int = 1, pts: Iterable[str] = ('lt',)) -> None: + mid_x, mid_y = width // 2, height // 2 + supersample_factor = getattr(buf, 'supersample_factor') + + def pt_to_coords(p: str) -> Tuple[int, int]: + if p == 'l': + return 0, mid_y + if p == 't': + return mid_x, 0 + if p == 'r': + return width - 1, mid_y + if p == 'b': + return mid_x, height - 1 + + for x in pts: + p1, p2 = map(pt_to_coords, x) + thick_line(buf, width, height, supersample_factor * thickness(level), p1, p2) + + BezierFunc = Callable[[float], float] @@ -844,6 +864,22 @@ box_chars: Dict[str, List[Callable]] = { '🮉': [p(eight_block, which=(3, 4, 5, 6, 7))], '🮊': [p(eight_block, which=(2, 3, 4, 5, 6, 7))], '🮋': [p(eight_block, which=(1, 2, 3, 4, 5, 6, 7))], + + '🮠': [mid_lines], + '🮡': [p(mid_lines, pts=('tr',))], + '🮢': [p(mid_lines, pts=('lb',))], + '🮣': [p(mid_lines, pts=('br',))], + '🮤': [p(mid_lines, pts=('lt', 'lb'))], + '🮥': [p(mid_lines, pts=('rt', 'rb'))], + '🮦': [p(mid_lines, pts=('rb', 'lb'))], + '🮧': [p(mid_lines, pts=('rt', 'lt'))], + '🮨': [p(mid_lines, pts=('rb', 'lt'))], + '🮩': [p(mid_lines, pts=('lb', 'rt'))], + '🮪': [p(mid_lines, pts=('lb', 'rt', 'rb'))], + '🮫': [p(mid_lines, pts=('lb', 'lt', 'rb'))], + '🮬': [p(mid_lines, pts=('rt', 'lt', 'rb'))], + '🮭': [p(mid_lines, pts=('rt', 'lt', 'lb'))], + '🮮': [p(mid_lines, pts=('rt', 'rb', 'lt', 'lb'))], } t, f = 1, 3