tui-big-text 0.8.4

A Ratatui widget for displaying big text in the terminal
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Default)]
pub enum PixelSize {
    #[default]
    /// A pixel from the 8x8 font is represented by a full character cell in the terminal.
    Full,
    /// A pixel from the 8x8 font is represented by a half (upper/lower) character cell in the
    /// terminal.
    HalfHeight,
    /// A pixel from the 8x8 font is represented by a half (left/right) character cell in the
    /// terminal.
    HalfWidth,
    /// A pixel from the 8x8 font is represented by a quadrant of a character cell in the
    /// terminal.
    Quadrant,
    /// A pixel from the 8x8 font is represented by a third (top/middle/bottom) of a character
    /// cell in the terminal.
    /// *Note: depending on how the used terminal renders characters, the generated text with
    /// this PixelSize might look very strange.*
    ThirdHeight,
    /// A pixel from the 8x8 font is represented by a sextant of a character cell in the
    /// terminal.
    /// *Note: depending on how the used terminal renders characters, the generated text with
    /// this PixelSize might look very strange.*
    Sextant,
    /// A pixel from the 8x8 font is represented by a quarter
    /// (top/upper-middle/lower-middle/bottom) of a character cell in the terminal.
    /// *Note: depending on how the used terminal renders characters, the generated text with
    /// this PixelSize might look very strange.*
    QuarterHeight,
    /// A pixel from the 8x8 font is represented by an octant of a character cell in the
    /// terminal.
    /// *Note: depending on how the used terminal renders characters, the generated text with
    /// this PixelSize might look very strange.*
    Octant,
}

impl PixelSize {
    /// The number of pixels that can be displayed in a single character cell for the given
    /// pixel size.
    ///
    /// The first value is the number of pixels in the horizontal direction, the second value is
    /// the number of pixels in the vertical direction.
    pub(crate) const fn pixels_per_cell(self) -> (u16, u16) {
        match self {
            Self::Full => (1, 1),
            Self::HalfHeight => (1, 2),
            Self::HalfWidth => (2, 1),
            Self::Quadrant => (2, 2),
            Self::ThirdHeight => (1, 3),
            Self::Sextant => (2, 3),
            Self::QuarterHeight => (1, 4),
            Self::Octant => (2, 4),
        }
    }

    /// Get a symbol/char that represents the pixels at the given position with the given pixel size
    pub(crate) const fn symbol_for_position(self, glyph: &[u8; 8], row: usize, col: i32) -> char {
        match self {
            Self::Full => match glyph[row] & (1 << col) {
                0 => ' ',
                _ => 'โ–ˆ',
            },
            Self::HalfHeight => {
                let top = glyph[row] & (1 << col);
                let bottom = glyph[row + 1] & (1 << col);
                get_symbol_half_height(top, bottom)
            }
            Self::HalfWidth => {
                let left = glyph[row] & (1 << col);
                let right = glyph[row] & (1 << (col + 1));
                get_symbol_half_width(left, right)
            }
            Self::Quadrant => {
                let top_left = glyph[row] & (1 << col);
                let top_right = glyph[row] & (1 << (col + 1));
                let bottom_left = glyph[row + 1] & (1 << col);
                let bottom_right = glyph[row + 1] & (1 << (col + 1));
                get_symbol_quadrant_size(top_left, top_right, bottom_left, bottom_right)
            }
            Self::ThirdHeight => {
                let top = glyph[row] & (1 << col);
                let is_middle_available = (row + 1) < glyph.len();
                let middle = if is_middle_available {
                    glyph[row + 1] & (1 << col)
                } else {
                    0
                };
                let is_bottom_available = (row + 2) < glyph.len();
                let bottom = if is_bottom_available {
                    glyph[row + 2] & (1 << col)
                } else {
                    0
                };
                get_symbol_third_height(top, middle, bottom)
            }
            Self::Sextant => {
                let top_left = glyph[row] & (1 << col);
                let top_right = glyph[row] & (1 << (col + 1));
                let is_middle_available = (row + 1) < glyph.len();
                let (middle_left, middle_right) = if is_middle_available {
                    (
                        glyph[row + 1] & (1 << col),
                        glyph[row + 1] & (1 << (col + 1)),
                    )
                } else {
                    (0, 0)
                };
                let is_bottom_available = (row + 2) < glyph.len();
                let (bottom_left, bottom_right) = if is_bottom_available {
                    (
                        glyph[row + 2] & (1 << col),
                        glyph[row + 2] & (1 << (col + 1)),
                    )
                } else {
                    (0, 0)
                };
                get_symbol_sextant_size(
                    top_left,
                    top_right,
                    middle_left,
                    middle_right,
                    bottom_left,
                    bottom_right,
                )
            }
            Self::QuarterHeight => {
                let top = glyph[row] & (1 << col);
                let is_upper_middle_available = (row + 1) < glyph.len();
                let upper_middle = if is_upper_middle_available {
                    glyph[row + 1] & (1 << col)
                } else {
                    0
                };
                let is_lower_middle_available = (row + 2) < glyph.len();
                let lower_middle = if is_lower_middle_available {
                    glyph[row + 2] & (1 << col)
                } else {
                    0
                };
                let is_bottom_available = (row + 3) < glyph.len();
                let bottom = if is_bottom_available {
                    glyph[row + 3] & (1 << col)
                } else {
                    0
                };
                get_symbol_quarter_height(top, upper_middle, lower_middle, bottom)
            }
            Self::Octant => {
                let top_left = glyph[row] & (1 << col);
                let top_right = glyph[row] & (1 << (col + 1));
                let is_upper_middle_available = (row + 1) < glyph.len();
                let (upper_middle_left, upper_middle_right) = if is_upper_middle_available {
                    (
                        glyph[row + 1] & (1 << col),
                        glyph[row + 1] & (1 << (col + 1)),
                    )
                } else {
                    (0, 0)
                };
                let is_lower_middle_available = (row + 2) < glyph.len();
                let (lower_middle_left, lower_middle_right) = if is_lower_middle_available {
                    (
                        glyph[row + 2] & (1 << col),
                        glyph[row + 2] & (1 << (col + 1)),
                    )
                } else {
                    (0, 0)
                };
                let is_bottom_available = (row + 3) < glyph.len();
                let (bottom_left, bottom_right) = if is_bottom_available {
                    (
                        glyph[row + 3] & (1 << col),
                        glyph[row + 3] & (1 << (col + 1)),
                    )
                } else {
                    (0, 0)
                };
                get_symbol_octant_size(
                    top_left,
                    top_right,
                    upper_middle_left,
                    upper_middle_right,
                    lower_middle_left,
                    lower_middle_right,
                    bottom_left,
                    bottom_right,
                )
            }
        }
    }
}

/// Get the correct unicode symbol for two vertical "pixels"
const fn get_symbol_half_height(top: u8, bottom: u8) -> char {
    match top {
        0 => match bottom {
            0 => ' ',
            _ => 'โ–„',
        },
        _ => match bottom {
            0 => 'โ–€',
            _ => 'โ–ˆ',
        },
    }
}

/// Get the correct unicode symbol for two horizontal "pixels"
const fn get_symbol_half_width(left: u8, right: u8) -> char {
    match left {
        0 => match right {
            0 => ' ',
            _ => 'โ–',
        },
        _ => match right {
            0 => 'โ–Œ',
            _ => 'โ–ˆ',
        },
    }
}

/// Get the correct unicode symbol for 2x2 "pixels"
const fn get_symbol_quadrant_size(
    top_left: u8,
    top_right: u8,
    bottom_left: u8,
    bottom_right: u8,
) -> char {
    let top_left = if top_left > 0 { 1 } else { 0 };
    let top_right = if top_right > 0 { 1 } else { 0 };
    let bottom_left = if bottom_left > 0 { 1 } else { 0 };
    let bottom_right = if bottom_right > 0 { 1 } else { 0 };

    // We use an array here instead of directly indexing into the unicode symbols, because although
    // most symbols are in order in unicode, some of them are already part of another character set
    // and missing in this character set.
    const QUADRANT_SYMBOLS: [char; 16] = [
        ' ', 'โ–˜', 'โ–', 'โ–€', 'โ––', 'โ–Œ', 'โ–ž', 'โ–›', 'โ–—', 'โ–š', 'โ–', 'โ–œ', 'โ–„', 'โ–™', 'โ–Ÿ', 'โ–ˆ',
    ];
    let character_index = top_left + (top_right << 1) + (bottom_left << 2) + (bottom_right << 3);

    QUADRANT_SYMBOLS[character_index]
}

/// Get the correct unicode symbol for 1x3 "pixels"
const fn get_symbol_third_height(top: u8, middle: u8, bottom: u8) -> char {
    get_symbol_sextant_size(top, top, middle, middle, bottom, bottom)
}

/// Get the correct unicode symbol for 2x3 "pixels"
const fn get_symbol_sextant_size(
    top_left: u8,
    top_right: u8,
    middle_left: u8,
    middle_right: u8,
    bottom_left: u8,
    bottom_right: u8,
) -> char {
    let top_left = if top_left > 0 { 1 } else { 0 };
    let top_right = if top_right > 0 { 1 } else { 0 };
    let middle_left = if middle_left > 0 { 1 } else { 0 };
    let middle_right = if middle_right > 0 { 1 } else { 0 };
    let bottom_left = if bottom_left > 0 { 1 } else { 0 };
    let bottom_right = if bottom_right > 0 { 1 } else { 0 };

    // We use an array here instead of directly indexing into the unicode symbols, because although
    // most symbols are in order in unicode, some of them are already part of another character set
    // and missing in this character set.
    const SEXANT_SYMBOLS: [char; 64] = [
        ' ', '๐Ÿฌ€', '๐Ÿฌ', '๐Ÿฌ‚', '๐Ÿฌƒ', '๐Ÿฌ„', '๐Ÿฌ…', '๐Ÿฌ†', '๐Ÿฌ‡', '๐Ÿฌˆ', '๐Ÿฌ‰', '๐ŸฌŠ', '๐Ÿฌ‹', '๐ŸฌŒ', '๐Ÿฌ', '๐ŸฌŽ', '๐Ÿฌ', '๐Ÿฌ',
        '๐Ÿฌ‘', '๐Ÿฌ’', '๐Ÿฌ“', 'โ–Œ', '๐Ÿฌ”', '๐Ÿฌ•', '๐Ÿฌ–', '๐Ÿฌ—', '๐Ÿฌ˜', '๐Ÿฌ™', '๐Ÿฌš', '๐Ÿฌ›', '๐Ÿฌœ', '๐Ÿฌ', '๐Ÿฌž', '๐ŸฌŸ', '๐Ÿฌ ', '๐Ÿฌก',
        '๐Ÿฌข', '๐Ÿฌฃ', '๐Ÿฌค', '๐Ÿฌฅ', '๐Ÿฌฆ', '๐Ÿฌง', 'โ–', '๐Ÿฌจ', '๐Ÿฌฉ', '๐Ÿฌช', '๐Ÿฌซ', '๐Ÿฌฌ', '๐Ÿฌญ', '๐Ÿฌฎ', '๐Ÿฌฏ', '๐Ÿฌฐ', '๐Ÿฌฑ', '๐Ÿฌฒ',
        '๐Ÿฌณ', '๐Ÿฌด', '๐Ÿฌต', '๐Ÿฌถ', '๐Ÿฌท', '๐Ÿฌธ', '๐Ÿฌน', '๐Ÿฌบ', '๐Ÿฌป', 'โ–ˆ',
    ];
    let character_index = top_left
        + (top_right << 1)
        + (middle_left << 2)
        + (middle_right << 3)
        + (bottom_left << 4)
        + (bottom_right << 5);

    SEXANT_SYMBOLS[character_index]
}

/// Get the correct unicode symbol for 1x4 "pixels"
const fn get_symbol_quarter_height(
    top: u8,
    upper_middle: u8,
    lower_middle: u8,
    bottom: u8,
) -> char {
    get_symbol_octant_size(
        top,
        top,
        upper_middle,
        upper_middle,
        lower_middle,
        lower_middle,
        bottom,
        bottom,
    )
}

/// Get the correct unicode symbol for 2x4 "pixels"
#[allow(clippy::too_many_arguments)]
const fn get_symbol_octant_size(
    top_left: u8,
    top_right: u8,
    upper_middle_left: u8,
    upper_middle_right: u8,
    lower_middle_left: u8,
    lower_middle_right: u8,
    bottom_left: u8,
    bottom_right: u8,
) -> char {
    let top_left = if top_left > 0 { 1 } else { 0 };
    let top_right = if top_right > 0 { 1 } else { 0 };
    let upper_middle_left = if upper_middle_left > 0 { 1 } else { 0 };
    let upper_middle_right = if upper_middle_right > 0 { 1 } else { 0 };
    let lower_middle_left = if lower_middle_left > 0 { 1 } else { 0 };
    let lower_middle_right = if lower_middle_right > 0 { 1 } else { 0 };
    let bottom_left = if bottom_left > 0 { 1 } else { 0 };
    let bottom_right = if bottom_right > 0 { 1 } else { 0 };

    // We use an array here instead of directly indexing into the unicode symbols, because although
    // most symbols are in order in unicode, some of them are already part of another character set
    // and missing in this character set.
    const OCTANT_SYMBOLS: [char; 256] = [
        ' ', '๐œบจ', '๐œบซ', '๐Ÿฎ‚', '๐œด€', 'โ–˜', '๐œด', '๐œด‚', '๐œดƒ', '๐œด„', 'โ–', '๐œด…', '๐œด†', '๐œด‡', '๐œดˆ', 'โ–€', '๐œด‰', '๐œดŠ',
        '๐œด‹', '๐œดŒ', '๐Ÿฏฆ', '๐œด', '๐œดŽ', '๐œด', '๐œด', '๐œด‘', '๐œด’', '๐œด“', '๐œด”', '๐œด•', '๐œด–', '๐œด—', '๐œด˜', '๐œด™', '๐œดš', '๐œด›',
        '๐œดœ', '๐œด', '๐œดž', '๐œดŸ', '๐Ÿฏง', '๐œด ', '๐œดก', '๐œดข', '๐œดฃ', '๐œดค', '๐œดฅ', '๐œดฆ', '๐œดง', '๐œดจ', '๐œดฉ', '๐œดช', '๐œดซ', '๐œดฌ',
        '๐œดญ', '๐œดฎ', '๐œดฏ', '๐œดฐ', '๐œดฑ', '๐œดฒ', '๐œดณ', '๐œดด', '๐œดต', '๐Ÿฎ…', '๐œบฃ', '๐œดถ', '๐œดท', '๐œดธ', '๐œดน', '๐œดบ', '๐œดป', '๐œดผ',
        '๐œดฝ', '๐œดพ', '๐œดฟ', '๐œต€', '๐œต', '๐œต‚', '๐œตƒ', '๐œต„', 'โ––', '๐œต…', '๐œต†', '๐œต‡', '๐œตˆ', 'โ–Œ', '๐œต‰', '๐œตŠ', '๐œต‹', '๐œตŒ',
        'โ–ž', '๐œต', '๐œตŽ', '๐œต', '๐œต', 'โ–›', '๐œต‘', '๐œต’', '๐œต“', '๐œต”', '๐œต•', '๐œต–', '๐œต—', '๐œต˜', '๐œต™', '๐œตš', '๐œต›', '๐œตœ',
        '๐œต', '๐œตž', '๐œตŸ', '๐œต ', '๐œตก', '๐œตข', '๐œตฃ', '๐œตค', '๐œตฅ', '๐œตฆ', '๐œตง', '๐œตจ', '๐œตฉ', '๐œตช', '๐œตซ', '๐œตฌ', '๐œตญ', '๐œตฎ',
        '๐œตฏ', '๐œตฐ', '๐œบ ', '๐œตฑ', '๐œตฒ', '๐œตณ', '๐œตด', '๐œตต', '๐œตถ', '๐œตท', '๐œตธ', '๐œตน', '๐œตบ', '๐œตป', '๐œตผ', '๐œตฝ', '๐œตพ', '๐œตฟ',
        '๐œถ€', '๐œถ', '๐œถ‚', '๐œถƒ', '๐œถ„', '๐œถ…', '๐œถ†', '๐œถ‡', '๐œถˆ', '๐œถ‰', '๐œถŠ', '๐œถ‹', '๐œถŒ', '๐œถ', '๐œถŽ', '๐œถ', 'โ–—', '๐œถ',
        '๐œถ‘', '๐œถ’', '๐œถ“', 'โ–š', '๐œถ”', '๐œถ•', '๐œถ–', '๐œถ—', 'โ–', '๐œถ˜', '๐œถ™', '๐œถš', '๐œถ›', 'โ–œ', '๐œถœ', '๐œถ', '๐œถž', '๐œถŸ',
        '๐œถ ', '๐œถก', '๐œถข', '๐œถฃ', '๐œถค', '๐œถฅ', '๐œถฆ', '๐œถง', '๐œถจ', '๐œถฉ', '๐œถช', '๐œถซ', 'โ–‚', '๐œถฌ', '๐œถญ', '๐œถฎ', '๐œถฏ', '๐œถฐ',
        '๐œถฑ', '๐œถฒ', '๐œถณ', '๐œถด', '๐œถต', '๐œถถ', '๐œถท', '๐œถธ', '๐œถน', '๐œถบ', '๐œถป', '๐œถผ', '๐œถฝ', '๐œถพ', '๐œถฟ', '๐œท€', '๐œท', '๐œท‚',
        '๐œทƒ', '๐œท„', '๐œท…', '๐œท†', '๐œท‡', '๐œทˆ', '๐œท‰', '๐œทŠ', '๐œท‹', '๐œทŒ', '๐œท', '๐œทŽ', '๐œท', '๐œท', '๐œท‘', '๐œท’', '๐œท“', '๐œท”',
        '๐œท•', '๐œท–', '๐œท—', '๐œท˜', '๐œท™', '๐œทš', 'โ–„', '๐œท›', '๐œทœ', '๐œท', '๐œทž', 'โ–™', '๐œทŸ', '๐œท ', '๐œทก', '๐œทข', 'โ–Ÿ', '๐œทฃ',
        'โ–†', '๐œทค', '๐œทฅ', 'โ–ˆ',
    ];
    let character_index = top_left
        + (top_right << 1)
        + (upper_middle_left << 2)
        + (upper_middle_right << 3)
        + (lower_middle_left << 4)
        + (lower_middle_right << 5)
        + (bottom_left << 6)
        + (bottom_right << 7);

    OCTANT_SYMBOLS[character_index]
}

#[cfg(test)]
mod tests {
    use alloc::boxed::Box;

    use super::*;

    type Result<T> = core::result::Result<T, Box<dyn core::error::Error>>;

    #[test]
    fn check_quadrant_size_symbols() -> Result<()> {
        assert_eq!(get_symbol_quadrant_size(0, 0, 0, 0), ' ');
        assert_eq!(get_symbol_quadrant_size(1, 0, 0, 0), 'โ–˜');
        assert_eq!(get_symbol_quadrant_size(0, 1, 0, 0), 'โ–');
        assert_eq!(get_symbol_quadrant_size(1, 1, 0, 0), 'โ–€');
        assert_eq!(get_symbol_quadrant_size(0, 0, 1, 0), 'โ––');
        assert_eq!(get_symbol_quadrant_size(1, 0, 1, 0), 'โ–Œ');
        assert_eq!(get_symbol_quadrant_size(0, 1, 1, 0), 'โ–ž');
        assert_eq!(get_symbol_quadrant_size(1, 1, 1, 0), 'โ–›');
        assert_eq!(get_symbol_quadrant_size(0, 0, 0, 1), 'โ–—');
        assert_eq!(get_symbol_quadrant_size(1, 0, 0, 1), 'โ–š');
        assert_eq!(get_symbol_quadrant_size(0, 1, 0, 1), 'โ–');
        assert_eq!(get_symbol_quadrant_size(1, 1, 0, 1), 'โ–œ');
        assert_eq!(get_symbol_quadrant_size(0, 0, 1, 1), 'โ–„');
        assert_eq!(get_symbol_quadrant_size(1, 0, 1, 1), 'โ–™');
        assert_eq!(get_symbol_quadrant_size(0, 1, 1, 1), 'โ–Ÿ');
        assert_eq!(get_symbol_quadrant_size(1, 1, 1, 1), 'โ–ˆ');
        Ok(())
    }

    #[test]
    #[allow(clippy::cognitive_complexity)]
    fn check_sextant_size_symbols() -> Result<()> {
        assert_eq!(get_symbol_sextant_size(0, 0, 0, 0, 0, 0), ' ');
        assert_eq!(get_symbol_sextant_size(1, 0, 0, 0, 0, 0), '๐Ÿฌ€');
        assert_eq!(get_symbol_sextant_size(0, 1, 0, 0, 0, 0), '๐Ÿฌ');
        assert_eq!(get_symbol_sextant_size(1, 1, 0, 0, 0, 0), '๐Ÿฌ‚');
        assert_eq!(get_symbol_sextant_size(0, 0, 1, 0, 0, 0), '๐Ÿฌƒ');
        assert_eq!(get_symbol_sextant_size(1, 0, 1, 0, 0, 0), '๐Ÿฌ„');
        assert_eq!(get_symbol_sextant_size(0, 1, 1, 0, 0, 0), '๐Ÿฌ…');
        assert_eq!(get_symbol_sextant_size(1, 1, 1, 0, 0, 0), '๐Ÿฌ†');
        assert_eq!(get_symbol_sextant_size(0, 0, 0, 1, 0, 0), '๐Ÿฌ‡');
        assert_eq!(get_symbol_sextant_size(1, 0, 0, 1, 0, 0), '๐Ÿฌˆ');
        assert_eq!(get_symbol_sextant_size(0, 1, 0, 1, 0, 0), '๐Ÿฌ‰');
        assert_eq!(get_symbol_sextant_size(1, 1, 0, 1, 0, 0), '๐ŸฌŠ');
        assert_eq!(get_symbol_sextant_size(0, 0, 1, 1, 0, 0), '๐Ÿฌ‹');
        assert_eq!(get_symbol_sextant_size(1, 0, 1, 1, 0, 0), '๐ŸฌŒ');
        assert_eq!(get_symbol_sextant_size(0, 1, 1, 1, 0, 0), '๐Ÿฌ');
        assert_eq!(get_symbol_sextant_size(1, 1, 1, 1, 0, 0), '๐ŸฌŽ');
        assert_eq!(get_symbol_sextant_size(0, 0, 0, 0, 1, 0), '๐Ÿฌ');
        assert_eq!(get_symbol_sextant_size(1, 0, 0, 0, 1, 0), '๐Ÿฌ');
        assert_eq!(get_symbol_sextant_size(0, 1, 0, 0, 1, 0), '๐Ÿฌ‘');
        assert_eq!(get_symbol_sextant_size(1, 1, 0, 0, 1, 0), '๐Ÿฌ’');
        assert_eq!(get_symbol_sextant_size(0, 0, 1, 0, 1, 0), '๐Ÿฌ“');
        assert_eq!(get_symbol_sextant_size(1, 0, 1, 0, 1, 0), 'โ–Œ');
        assert_eq!(get_symbol_sextant_size(0, 1, 1, 0, 1, 0), '๐Ÿฌ”');
        assert_eq!(get_symbol_sextant_size(1, 1, 1, 0, 1, 0), '๐Ÿฌ•');
        assert_eq!(get_symbol_sextant_size(0, 0, 0, 1, 1, 0), '๐Ÿฌ–');
        assert_eq!(get_symbol_sextant_size(1, 0, 0, 1, 1, 0), '๐Ÿฌ—');
        assert_eq!(get_symbol_sextant_size(0, 1, 0, 1, 1, 0), '๐Ÿฌ˜');
        assert_eq!(get_symbol_sextant_size(1, 1, 0, 1, 1, 0), '๐Ÿฌ™');
        assert_eq!(get_symbol_sextant_size(0, 0, 1, 1, 1, 0), '๐Ÿฌš');
        assert_eq!(get_symbol_sextant_size(1, 0, 1, 1, 1, 0), '๐Ÿฌ›');
        assert_eq!(get_symbol_sextant_size(0, 1, 1, 1, 1, 0), '๐Ÿฌœ');
        assert_eq!(get_symbol_sextant_size(1, 1, 1, 1, 1, 0), '๐Ÿฌ');
        assert_eq!(get_symbol_sextant_size(0, 0, 0, 0, 0, 1), '๐Ÿฌž');
        assert_eq!(get_symbol_sextant_size(1, 0, 0, 0, 0, 1), '๐ŸฌŸ');
        assert_eq!(get_symbol_sextant_size(0, 1, 0, 0, 0, 1), '๐Ÿฌ ');
        assert_eq!(get_symbol_sextant_size(1, 1, 0, 0, 0, 1), '๐Ÿฌก');
        assert_eq!(get_symbol_sextant_size(0, 0, 1, 0, 0, 1), '๐Ÿฌข');
        assert_eq!(get_symbol_sextant_size(1, 0, 1, 0, 0, 1), '๐Ÿฌฃ');
        assert_eq!(get_symbol_sextant_size(0, 1, 1, 0, 0, 1), '๐Ÿฌค');
        assert_eq!(get_symbol_sextant_size(1, 1, 1, 0, 0, 1), '๐Ÿฌฅ');
        assert_eq!(get_symbol_sextant_size(0, 0, 0, 1, 0, 1), '๐Ÿฌฆ');
        assert_eq!(get_symbol_sextant_size(1, 0, 0, 1, 0, 1), '๐Ÿฌง');
        assert_eq!(get_symbol_sextant_size(0, 1, 0, 1, 0, 1), 'โ–');
        assert_eq!(get_symbol_sextant_size(1, 1, 0, 1, 0, 1), '๐Ÿฌจ');
        assert_eq!(get_symbol_sextant_size(0, 0, 1, 1, 0, 1), '๐Ÿฌฉ');
        assert_eq!(get_symbol_sextant_size(1, 0, 1, 1, 0, 1), '๐Ÿฌช');
        assert_eq!(get_symbol_sextant_size(0, 1, 1, 1, 0, 1), '๐Ÿฌซ');
        assert_eq!(get_symbol_sextant_size(1, 1, 1, 1, 0, 1), '๐Ÿฌฌ');
        assert_eq!(get_symbol_sextant_size(0, 0, 0, 0, 1, 1), '๐Ÿฌญ');
        assert_eq!(get_symbol_sextant_size(1, 0, 0, 0, 1, 1), '๐Ÿฌฎ');
        assert_eq!(get_symbol_sextant_size(0, 1, 0, 0, 1, 1), '๐Ÿฌฏ');
        assert_eq!(get_symbol_sextant_size(1, 1, 0, 0, 1, 1), '๐Ÿฌฐ');
        assert_eq!(get_symbol_sextant_size(0, 0, 1, 0, 1, 1), '๐Ÿฌฑ');
        assert_eq!(get_symbol_sextant_size(1, 0, 1, 0, 1, 1), '๐Ÿฌฒ');
        assert_eq!(get_symbol_sextant_size(0, 1, 1, 0, 1, 1), '๐Ÿฌณ');
        assert_eq!(get_symbol_sextant_size(1, 1, 1, 0, 1, 1), '๐Ÿฌด');
        assert_eq!(get_symbol_sextant_size(0, 0, 0, 1, 1, 1), '๐Ÿฌต');
        assert_eq!(get_symbol_sextant_size(1, 0, 0, 1, 1, 1), '๐Ÿฌถ');
        assert_eq!(get_symbol_sextant_size(0, 1, 0, 1, 1, 1), '๐Ÿฌท');
        assert_eq!(get_symbol_sextant_size(1, 1, 0, 1, 1, 1), '๐Ÿฌธ');
        assert_eq!(get_symbol_sextant_size(0, 0, 1, 1, 1, 1), '๐Ÿฌน');
        assert_eq!(get_symbol_sextant_size(1, 0, 1, 1, 1, 1), '๐Ÿฌบ');
        assert_eq!(get_symbol_sextant_size(0, 1, 1, 1, 1, 1), '๐Ÿฌป');
        assert_eq!(get_symbol_sextant_size(1, 1, 1, 1, 1, 1), 'โ–ˆ');
        Ok(())
    }

    #[test]
    #[allow(clippy::cognitive_complexity)]
    fn check_octant_size_symbols() -> Result<()> {
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 0, 0, 0, 0), ' ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 0, 0, 0, 0), '๐œบจ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 0, 0, 0, 0), '๐œบซ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 0, 0, 0, 0), '๐Ÿฎ‚');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 0, 0, 0, 0), '๐œด€');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 0, 0, 0, 0), 'โ–˜');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 0, 0, 0, 0), '๐œด');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 0, 0, 0, 0), '๐œด‚');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 0, 0, 0, 0), '๐œดƒ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 0, 0, 0, 0), '๐œด„');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 0, 0, 0, 0), 'โ–');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 0, 0, 0, 0), '๐œด…');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 0, 0, 0, 0), '๐œด†');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 0, 0, 0, 0), '๐œด‡');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 0, 0, 0, 0), '๐œดˆ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 0, 0, 0, 0), 'โ–€');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 1, 0, 0, 0), '๐œด‰');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 1, 0, 0, 0), '๐œดŠ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 1, 0, 0, 0), '๐œด‹');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 1, 0, 0, 0), '๐œดŒ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 1, 0, 0, 0), '๐Ÿฏฆ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 1, 0, 0, 0), '๐œด');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 1, 0, 0, 0), '๐œดŽ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 1, 0, 0, 0), '๐œด');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 1, 0, 0, 0), '๐œด');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 1, 0, 0, 0), '๐œด‘');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 1, 0, 0, 0), '๐œด’');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 1, 0, 0, 0), '๐œด“');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 1, 0, 0, 0), '๐œด”');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 1, 0, 0, 0), '๐œด•');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 1, 0, 0, 0), '๐œด–');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 1, 0, 0, 0), '๐œด—');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 0, 1, 0, 0), '๐œด˜');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 0, 1, 0, 0), '๐œด™');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 0, 1, 0, 0), '๐œดš');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 0, 1, 0, 0), '๐œด›');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 0, 1, 0, 0), '๐œดœ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 0, 1, 0, 0), '๐œด');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 0, 1, 0, 0), '๐œดž');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 0, 1, 0, 0), '๐œดŸ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 0, 1, 0, 0), '๐Ÿฏง');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 0, 1, 0, 0), '๐œด ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 0, 1, 0, 0), '๐œดก');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 0, 1, 0, 0), '๐œดข');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 0, 1, 0, 0), '๐œดฃ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 0, 1, 0, 0), '๐œดค');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 0, 1, 0, 0), '๐œดฅ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 0, 1, 0, 0), '๐œดฆ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 1, 1, 0, 0), '๐œดง');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 1, 1, 0, 0), '๐œดจ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 1, 1, 0, 0), '๐œดฉ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 1, 1, 0, 0), '๐œดช');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 1, 1, 0, 0), '๐œดซ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 1, 1, 0, 0), '๐œดฌ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 1, 1, 0, 0), '๐œดญ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 1, 1, 0, 0), '๐œดฎ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 1, 1, 0, 0), '๐œดฏ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 1, 1, 0, 0), '๐œดฐ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 1, 1, 0, 0), '๐œดฑ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 1, 1, 0, 0), '๐œดฒ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 1, 1, 0, 0), '๐œดณ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 1, 1, 0, 0), '๐œดด');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 1, 1, 0, 0), '๐œดต');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 1, 1, 0, 0), '๐Ÿฎ…');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 0, 0, 1, 0), '๐œบฃ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 0, 0, 1, 0), '๐œดถ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 0, 0, 1, 0), '๐œดท');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 0, 0, 1, 0), '๐œดธ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 0, 0, 1, 0), '๐œดน');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 0, 0, 1, 0), '๐œดบ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 0, 0, 1, 0), '๐œดป');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 0, 0, 1, 0), '๐œดผ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 0, 0, 1, 0), '๐œดฝ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 0, 0, 1, 0), '๐œดพ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 0, 0, 1, 0), '๐œดฟ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 0, 0, 1, 0), '๐œต€');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 0, 0, 1, 0), '๐œต');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 0, 0, 1, 0), '๐œต‚');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 0, 0, 1, 0), '๐œตƒ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 0, 0, 1, 0), '๐œต„');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 1, 0, 1, 0), 'โ––');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 1, 0, 1, 0), '๐œต…');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 1, 0, 1, 0), '๐œต†');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 1, 0, 1, 0), '๐œต‡');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 1, 0, 1, 0), '๐œตˆ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 1, 0, 1, 0), 'โ–Œ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 1, 0, 1, 0), '๐œต‰');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 1, 0, 1, 0), '๐œตŠ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 1, 0, 1, 0), '๐œต‹');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 1, 0, 1, 0), '๐œตŒ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 1, 0, 1, 0), 'โ–ž');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 1, 0, 1, 0), '๐œต');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 1, 0, 1, 0), '๐œตŽ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 1, 0, 1, 0), '๐œต');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 1, 0, 1, 0), '๐œต');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 1, 0, 1, 0), 'โ–›');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 0, 1, 1, 0), '๐œต‘');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 0, 1, 1, 0), '๐œต’');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 0, 1, 1, 0), '๐œต“');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 0, 1, 1, 0), '๐œต”');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 0, 1, 1, 0), '๐œต•');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 0, 1, 1, 0), '๐œต–');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 0, 1, 1, 0), '๐œต—');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 0, 1, 1, 0), '๐œต˜');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 0, 1, 1, 0), '๐œต™');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 0, 1, 1, 0), '๐œตš');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 0, 1, 1, 0), '๐œต›');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 0, 1, 1, 0), '๐œตœ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 0, 1, 1, 0), '๐œต');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 0, 1, 1, 0), '๐œตž');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 0, 1, 1, 0), '๐œตŸ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 0, 1, 1, 0), '๐œต ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 1, 1, 1, 0), '๐œตก');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 1, 1, 1, 0), '๐œตข');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 1, 1, 1, 0), '๐œตฃ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 1, 1, 1, 0), '๐œตค');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 1, 1, 1, 0), '๐œตฅ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 1, 1, 1, 0), '๐œตฆ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 1, 1, 1, 0), '๐œตง');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 1, 1, 1, 0), '๐œตจ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 1, 1, 1, 0), '๐œตฉ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 1, 1, 1, 0), '๐œตช');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 1, 1, 1, 0), '๐œตซ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 1, 1, 1, 0), '๐œตฌ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 1, 1, 1, 0), '๐œตญ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 1, 1, 1, 0), '๐œตฎ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 1, 1, 1, 0), '๐œตฏ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 1, 1, 1, 0), '๐œตฐ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 0, 0, 0, 1), '๐œบ ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 0, 0, 0, 1), '๐œตฑ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 0, 0, 0, 1), '๐œตฒ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 0, 0, 0, 1), '๐œตณ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 0, 0, 0, 1), '๐œตด');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 0, 0, 0, 1), '๐œตต');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 0, 0, 0, 1), '๐œตถ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 0, 0, 0, 1), '๐œตท');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 0, 0, 0, 1), '๐œตธ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 0, 0, 0, 1), '๐œตน');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 0, 0, 0, 1), '๐œตบ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 0, 0, 0, 1), '๐œตป');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 0, 0, 0, 1), '๐œตผ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 0, 0, 0, 1), '๐œตฝ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 0, 0, 0, 1), '๐œตพ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 0, 0, 0, 1), '๐œตฟ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 1, 0, 0, 1), '๐œถ€');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 1, 0, 0, 1), '๐œถ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 1, 0, 0, 1), '๐œถ‚');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 1, 0, 0, 1), '๐œถƒ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 1, 0, 0, 1), '๐œถ„');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 1, 0, 0, 1), '๐œถ…');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 1, 0, 0, 1), '๐œถ†');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 1, 0, 0, 1), '๐œถ‡');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 1, 0, 0, 1), '๐œถˆ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 1, 0, 0, 1), '๐œถ‰');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 1, 0, 0, 1), '๐œถŠ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 1, 0, 0, 1), '๐œถ‹');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 1, 0, 0, 1), '๐œถŒ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 1, 0, 0, 1), '๐œถ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 1, 0, 0, 1), '๐œถŽ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 1, 0, 0, 1), '๐œถ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 0, 1, 0, 1), 'โ–—');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 0, 1, 0, 1), '๐œถ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 0, 1, 0, 1), '๐œถ‘');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 0, 1, 0, 1), '๐œถ’');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 0, 1, 0, 1), '๐œถ“');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 0, 1, 0, 1), 'โ–š');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 0, 1, 0, 1), '๐œถ”');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 0, 1, 0, 1), '๐œถ•');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 0, 1, 0, 1), '๐œถ–');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 0, 1, 0, 1), '๐œถ—');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 0, 1, 0, 1), 'โ–');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 0, 1, 0, 1), '๐œถ˜');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 0, 1, 0, 1), '๐œถ™');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 0, 1, 0, 1), '๐œถš');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 0, 1, 0, 1), '๐œถ›');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 0, 1, 0, 1), 'โ–œ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 1, 1, 0, 1), '๐œถœ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 1, 1, 0, 1), '๐œถ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 1, 1, 0, 1), '๐œถž');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 1, 1, 0, 1), '๐œถŸ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 1, 1, 0, 1), '๐œถ ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 1, 1, 0, 1), '๐œถก');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 1, 1, 0, 1), '๐œถข');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 1, 1, 0, 1), '๐œถฃ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 1, 1, 0, 1), '๐œถค');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 1, 1, 0, 1), '๐œถฅ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 1, 1, 0, 1), '๐œถฆ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 1, 1, 0, 1), '๐œถง');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 1, 1, 0, 1), '๐œถจ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 1, 1, 0, 1), '๐œถฉ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 1, 1, 0, 1), '๐œถช');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 1, 1, 0, 1), '๐œถซ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 0, 0, 1, 1), 'โ–‚');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 0, 0, 1, 1), '๐œถฌ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 0, 0, 1, 1), '๐œถญ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 0, 0, 1, 1), '๐œถฎ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 0, 0, 1, 1), '๐œถฏ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 0, 0, 1, 1), '๐œถฐ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 0, 0, 1, 1), '๐œถฑ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 0, 0, 1, 1), '๐œถฒ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 0, 0, 1, 1), '๐œถณ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 0, 0, 1, 1), '๐œถด');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 0, 0, 1, 1), '๐œถต');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 0, 0, 1, 1), '๐œถถ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 0, 0, 1, 1), '๐œถท');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 0, 0, 1, 1), '๐œถธ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 0, 0, 1, 1), '๐œถน');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 0, 0, 1, 1), '๐œถบ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 1, 0, 1, 1), '๐œถป');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 1, 0, 1, 1), '๐œถผ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 1, 0, 1, 1), '๐œถฝ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 1, 0, 1, 1), '๐œถพ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 1, 0, 1, 1), '๐œถฟ');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 1, 0, 1, 1), '๐œท€');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 1, 0, 1, 1), '๐œท');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 1, 0, 1, 1), '๐œท‚');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 1, 0, 1, 1), '๐œทƒ');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 1, 0, 1, 1), '๐œท„');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 1, 0, 1, 1), '๐œท…');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 1, 0, 1, 1), '๐œท†');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 1, 0, 1, 1), '๐œท‡');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 1, 0, 1, 1), '๐œทˆ');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 1, 0, 1, 1), '๐œท‰');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 1, 0, 1, 1), '๐œทŠ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 0, 1, 1, 1), '๐œท‹');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 0, 1, 1, 1), '๐œทŒ');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 0, 1, 1, 1), '๐œท');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 0, 1, 1, 1), '๐œทŽ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 0, 1, 1, 1), '๐œท');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 0, 1, 1, 1), '๐œท');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 0, 1, 1, 1), '๐œท‘');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 0, 1, 1, 1), '๐œท’');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 0, 1, 1, 1), '๐œท“');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 0, 1, 1, 1), '๐œท”');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 0, 1, 1, 1), '๐œท•');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 0, 1, 1, 1), '๐œท–');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 0, 1, 1, 1), '๐œท—');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 0, 1, 1, 1), '๐œท˜');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 0, 1, 1, 1), '๐œท™');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 0, 1, 1, 1), '๐œทš');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 0, 1, 1, 1, 1), 'โ–„');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 0, 1, 1, 1, 1), '๐œท›');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 0, 1, 1, 1, 1), '๐œทœ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 0, 1, 1, 1, 1), '๐œท');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 0, 1, 1, 1, 1), '๐œทž');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 0, 1, 1, 1, 1), 'โ–™');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 0, 1, 1, 1, 1), '๐œทŸ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 0, 1, 1, 1, 1), '๐œท ');
        assert_eq!(get_symbol_octant_size(0, 0, 0, 1, 1, 1, 1, 1), '๐œทก');
        assert_eq!(get_symbol_octant_size(1, 0, 0, 1, 1, 1, 1, 1), '๐œทข');
        assert_eq!(get_symbol_octant_size(0, 1, 0, 1, 1, 1, 1, 1), 'โ–Ÿ');
        assert_eq!(get_symbol_octant_size(1, 1, 0, 1, 1, 1, 1, 1), '๐œทฃ');
        assert_eq!(get_symbol_octant_size(0, 0, 1, 1, 1, 1, 1, 1), 'โ–†');
        assert_eq!(get_symbol_octant_size(1, 0, 1, 1, 1, 1, 1, 1), '๐œทค');
        assert_eq!(get_symbol_octant_size(0, 1, 1, 1, 1, 1, 1, 1), '๐œทฅ');
        assert_eq!(get_symbol_octant_size(1, 1, 1, 1, 1, 1, 1, 1), 'โ–ˆ');
        Ok(())
    }

    #[test]
    fn check_half_width_symbols() -> Result<()> {
        assert_eq!(get_symbol_half_width(0, 0), ' ');
        assert_eq!(get_symbol_half_width(1, 0), 'โ–Œ');
        assert_eq!(get_symbol_half_width(0, 1), 'โ–');
        assert_eq!(get_symbol_half_width(1, 1), 'โ–ˆ');
        Ok(())
    }

    #[test]
    fn check_half_height_symbols() -> Result<()> {
        assert_eq!(get_symbol_half_height(0, 0), ' ');
        assert_eq!(get_symbol_half_height(1, 0), 'โ–€');
        assert_eq!(get_symbol_half_height(0, 1), 'โ–„');
        assert_eq!(get_symbol_half_height(1, 1), 'โ–ˆ');
        Ok(())
    }

    #[test]
    fn check_third_height_symbols() -> Result<()> {
        assert_eq!(get_symbol_third_height(0, 0, 0), ' ');
        assert_eq!(get_symbol_third_height(1, 0, 0), '๐Ÿฌ‚');
        assert_eq!(get_symbol_third_height(0, 1, 0), '๐Ÿฌ‹');
        assert_eq!(get_symbol_third_height(1, 1, 0), '๐ŸฌŽ');
        assert_eq!(get_symbol_third_height(0, 0, 1), '๐Ÿฌญ');
        assert_eq!(get_symbol_third_height(1, 0, 1), '๐Ÿฌฐ');
        assert_eq!(get_symbol_third_height(0, 1, 1), '๐Ÿฌน');
        assert_eq!(get_symbol_third_height(1, 1, 1), 'โ–ˆ');
        Ok(())
    }

    #[test]
    fn check_quarter_height_symbols() -> Result<()> {
        assert_eq!(get_symbol_quarter_height(0, 0, 0, 0), ' ');
        assert_eq!(get_symbol_quarter_height(1, 0, 0, 0), '๐Ÿฎ‚');
        assert_eq!(get_symbol_quarter_height(0, 1, 0, 0), '๐œด†');
        assert_eq!(get_symbol_quarter_height(1, 1, 0, 0), 'โ–€');
        assert_eq!(get_symbol_quarter_height(0, 0, 1, 0), '๐œดง');
        assert_eq!(get_symbol_quarter_height(1, 0, 1, 0), '๐œดช');
        assert_eq!(get_symbol_quarter_height(0, 1, 1, 0), '๐œดณ');
        assert_eq!(get_symbol_quarter_height(1, 1, 1, 0), '๐Ÿฎ…');
        assert_eq!(get_symbol_quarter_height(0, 0, 0, 1), 'โ–‚');
        assert_eq!(get_symbol_quarter_height(1, 0, 0, 1), '๐œถฎ');
        assert_eq!(get_symbol_quarter_height(0, 1, 0, 1), '๐œถท');
        assert_eq!(get_symbol_quarter_height(1, 1, 0, 1), '๐œถบ');
        assert_eq!(get_symbol_quarter_height(0, 0, 1, 1), 'โ–„');
        assert_eq!(get_symbol_quarter_height(1, 0, 1, 1), '๐œท');
        assert_eq!(get_symbol_quarter_height(0, 1, 1, 1), 'โ–†');
        assert_eq!(get_symbol_quarter_height(1, 1, 1, 1), 'โ–ˆ');
        Ok(())
    }

    #[test]
    fn check_get_symbol_for_position_in_glyph_third_height_defensive_middle() -> Result<()> {
        // In this test, we set all pixels of the glyph to 1 (all bytes are u8-max)
        // We expect that pixels out of the glyph-bounds are not set
        // Returned character is upper third filled only

        let glyph = [0xFFu8; 8];
        assert_eq!(
            PixelSize::ThirdHeight.symbol_for_position(&glyph, 7, 0),
            '๐Ÿฌ‚'
        );
        Ok(())
    }

    #[test]
    fn check_get_symbol_for_position_in_glyph_sextant_size_defensive_middle() -> Result<()> {
        // In this test, we set all pixels of the glyph to 1 (all bytes are u8-max)
        // We expect that pixels out of the glyph-bounds are not set
        // Returned character is upper third filled only

        let glyph = [0xFFu8; 8];
        assert_eq!(PixelSize::Sextant.symbol_for_position(&glyph, 7, 0), '๐Ÿฌ‚');
        Ok(())
    }
}