diff --git a/docs/changelog.rst b/docs/changelog.rst index d352d36f3..74ee96eeb 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -80,6 +80,8 @@ Detailed list of changes - Allow more types of alignment for :opt:`placement_strategy` (:pull:`7419`) +- Add some more box-drawing characters from the "Geometric shapes" Unicode block (:iss:`7433`) + 0.34.1 [2024-04-19] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/fonts.c b/kitty/fonts.c index 6a3dd590d..688390433 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -575,6 +575,9 @@ START_ALLOW_CASE_RANGE return BLANK_FONT; case 0x2500 ... 0x2573: case 0x2574 ... 0x259f: + case 0x25d6 ... 0x25d7: + case 0x25cb: + case 0x25dc ... 0x25e5: case 0x2800 ... 0x28ff: case 0xe0b0 ... 0xe0bf: // powerline box drawing case 0xee00 ... 0xee0b: // fira code progress bar/spinner @@ -611,14 +614,14 @@ static glyph_index box_glyph_id(char_type ch) { START_ALLOW_CASE_RANGE switch(ch) { - case 0x2500 ... 0x259f: - return ch - 0x2500; // IDs from 0x00 to 0x9f + case 0x2500 ... 0x25ff: + return ch - 0x2500; // IDs from 0x00 to 0xff case 0xe0b0 ... 0xee0b: - return 0xa0 + ch - 0xe0b0; // IDs from 0xa0 to 0xd58 + return 0x100 + ch - 0xe0b0; // IDs from 0x100 to 0xe5b case 0x2800 ... 0x28ff: - return 0xe00 + ch - 0x2800; // IDs from 0xe00 to 0xeff + return 0xf00 + ch - 0x2800; // IDs from 0xf00 to 0xfff case 0x1fb00 ... 0x1fbae: - return 0xf00 + ch - 0x1fb00; // IDs from 0xf00 to 0xfae + return 0x1000 + ch - 0x1fb00; // IDs from 0x1000 to 0x10ae default: return 0xffff; } diff --git a/kitty/fonts/box_drawing.py b/kitty/fonts/box_drawing.py index 6fd7a02e5..ecc99a3de 100644 --- a/kitty/fonts/box_drawing.py +++ b/kitty/fonts/box_drawing.py @@ -1015,16 +1015,22 @@ box_chars: Dict[str, List[Callable[[BufType, int, int], Any]]] = { '': [p(triangle, left=False)], '': [p(half_cross_line, which='tr'), p(half_cross_line, which='br')], '': [D], + '◗': [D], '': [rounded_separator], '': [p(D, left=False)], + '◖': [p(D, left=False)], '': [p(rounded_separator, left=False)], '': [p(corner_triangle, corner='bottom-left')], + '◣': [p(corner_triangle, corner='bottom-left')], '': [cross_line], '': [p(corner_triangle, corner='bottom-right')], + '◢': [p(corner_triangle, corner='bottom-right')], '': [p(cross_line, left=False)], '': [p(corner_triangle, corner='top-left')], + '◤': [p(corner_triangle, corner='top-left')], '': [p(cross_line, left=False)], '': [p(corner_triangle, corner='top-right')], + '◥': [p(corner_triangle, corner='top-right')], '': [cross_line], '': [p(progress_bar, which='l')], '': [p(progress_bar, which='m')], @@ -1038,6 +1044,13 @@ box_chars: Dict[str, List[Callable[[BufType, int, int], Any]]] = { '': [p(spinner, start=360, end=540)], '': [p(spinner, start=80, end=220)], '': [p(spinner, start=170, end=270)], + '○': [p(spinner, start=0, end=360)], # circle + '◜': [p(spinner, start=180, end=270)], # upper-left + '◝': [p(spinner, start=270, end=360)], # upper-right + '◞': [p(spinner, start=360, end=450)], # lower-right + '◟': [p(spinner, start=450, end=540)], # lower-left + '◠': [p(spinner, start=180, end=360)], # upper-half + '◡': [p(spinner, start=0, end=180)], # lower-half '═': [dhline], '║': [dvline],