Forgot a couple of octants

This commit is contained in:
Kovid Goyal
2024-12-26 18:49:28 +05:30
parent 39dc31e021
commit 95fbc6e9ba
3 changed files with 11 additions and 6 deletions

View File

@@ -867,7 +867,7 @@ octant_segment(Canvas *self, uint8_t which, bool left) {
static void static void
octant(Canvas *self, uint8_t which) { octant(Canvas *self, uint8_t which) {
enum flags { a = 1, b = 2, c = 4, d = 8, m = 16, n = 32, o = 64, p = 128 }; enum flags { a = 1, b = 2, c = 4, d = 8, m = 16, n = 32, o = 64, p = 128 };
static const enum flags mapping[230] = { static const enum flags mapping[232] = {
// 00 - 0f // 00 - 0f
b, b|m, a|b|m, n, a|n, a|m|n, b|n, a|b|n, b|m|n, c, a|c, c|m, a|c|m, a|b|c, b|c|m, a|b|c|m, b, b|m, a|b|m, n, a|n, a|m|n, b|n, a|b|n, b|m|n, c, a|c, c|m, a|c|m, a|b|c, b|c|m, a|b|c|m,
// 10 - 1f // 10 - 1f
@@ -898,8 +898,8 @@ octant(Canvas *self, uint8_t which) {
// d0 - df // d0 - df
a|b|d|o|p, b|d|m|o|p, ~(c|n), d|n|o|p, a|d|n|o|p, d|m|n|o|p, ~(b|c), b|d|n|o|p, ~(c|m), ~(a|c), ~c, a|c|d|o|p, c|d|m|o|p, ~(b|n), b|c|d|o|p, ~(a|n), a|b|d|o|p, b|d|m|o|p, ~(c|n), d|n|o|p, a|d|n|o|p, d|m|n|o|p, ~(b|c), b|d|n|o|p, ~(c|m), ~(a|c), ~c, a|c|d|o|p, c|d|m|o|p, ~(b|n), b|c|d|o|p, ~(a|n),
// e0 - e5 // e0 - e7
~n, c|d|n|o|p, ~(b|m), ~b, ~m, ~a, ~n, c|d|n|o|p, ~(b|m), ~b, ~m, ~a, b|c, n|o,
}; };
which = mapping[which]; which = mapping[which];
@@ -1787,7 +1787,9 @@ START_ALLOW_CASE_RANGE
case 0x1fb28 ... 0x1fb28 + 19: sextant(c, ch - 0x1fb00 + 3); break; case 0x1fb28 ... 0x1fb28 + 19: sextant(c, ch - 0x1fb00 + 3); break;
case 0x1fb70 ... 0x1fb70 + 5: eight_bar(c, ch - 0x1fb6f, false); break; case 0x1fb70 ... 0x1fb70 + 5: eight_bar(c, ch - 0x1fb6f, false); break;
case 0x1fb76 ... 0x1fb76 + 5: eight_bar(c, ch - 0x1fb75, true); break; case 0x1fb76 ... 0x1fb76 + 5: eight_bar(c, ch - 0x1fb75, true); break;
case 0x1cd00 ... 0x1cde5: octant(c, ch - 0x1cd00); true; case 0x1fbe6: octant(c, 0xe6); break;
case 0x1fbe7: octant(c, 0xe7); break;
case 0x1cd00 ... 0x1cde5: octant(c, ch - 0x1cd00); break;
} }
free(canvas.holes); free(canvas.y_limits); free(canvas.holes); free(canvas.y_limits);
free(ss.holes); free(ss.y_limits); free(ss.holes); free(ss.y_limits);

View File

@@ -724,7 +724,7 @@ START_ALLOW_CASE_RANGE
case 0xe0b0 ... 0xe0bf: case 0xe0d6 ... 0xe0d7: // powerline box drawing case 0xe0b0 ... 0xe0bf: case 0xe0d6 ... 0xe0d7: // powerline box drawing
case 0xee00 ... 0xee0b: // fira code progress bar/spinner case 0xee00 ... 0xee0b: // fira code progress bar/spinner
case 0x1fb00 ... 0x1fbae: // symbols for legacy computing case 0x1fb00 ... 0x1fbae: // symbols for legacy computing
case 0x1cd00 ... 0x1cde5: // octants case 0x1cd00 ... 0x1cde5: case 0x1fbe6: case 0x1fbe7: // octants
case 0xf5d0 ... 0xf60d: // branch drawing characters case 0xf5d0 ... 0xf60d: // branch drawing characters
if (allow_use_of_box_fonts) return BOX_FONT; if (allow_use_of_box_fonts) return BOX_FONT;
/* fallthrough */ /* fallthrough */
@@ -764,6 +764,7 @@ START_ALLOW_CASE_RANGE
return 0x1000 + ch - 0x1fb00; // IDs from 0x1000 to 0x10ae return 0x1000 + ch - 0x1fb00; // IDs from 0x1000 to 0x10ae
case 0x1cd00 ... 0x1cde5: case 0x1cd00 ... 0x1cde5:
return 0x1100 + ch - 0x1cd00; // IDs from 0x1100 to 0x11e5 return 0x1100 + ch - 0x1cd00; // IDs from 0x1100 to 0x11e5
case 0x1fbe6: case 0x1fbe7: return 0x11e6 + ch - 0x1fbe6;
case 0xf5d0 ... 0xf60d: case 0xf5d0 ... 0xf60d:
return 0x2000 + ch - 0xf5d0; // IDs from 0x2000 to 0x203d return 0x2000 + ch - 0xf5d0; // IDs from 0x2000 to 0x203d
default: default:

View File

@@ -1196,6 +1196,8 @@ box_chars = { # {{{
'🮫', '🮫',
'🮬', '🮬',
'🮭', '🮭',
'🮮'} # }}} '🮮',
'\U0001fbe6', '\U0001fbe7',
} # }}}
for ch in range(0x1cd00, 0x1cde5+1): # octants for ch in range(0x1cd00, 0x1cde5+1): # octants
box_chars.add(chr(ch)) box_chars.add(chr(ch))