Skip to main content

retroglyph_core/symbols/
border.rs

1use super::BorderSet;
2
3/// Single-line box-drawing characters (`┌─┐│└┘`).
4pub const PLAIN: BorderSet = BorderSet {
5    top_left: '┌',
6    top_right: '┐',
7    bottom_left: '└',
8    bottom_right: '┘',
9    horizontal: '─',
10    vertical: '│',
11};
12
13/// [`PLAIN`] with rounded corners (`╭─╮│╰╯`).
14///
15/// The 4 corners (`╭╮╰╯`) have no glyph in any font this crate bundles; drawing with
16/// `ROUNDED` through `retroglyph_window`'s fullest bundled `FontChain` falls back
17/// to the notdef substitute for those 4 entries (`horizontal`/`vertical` are shared with
18/// [`PLAIN`], which CP437 does cover). Supply a font with real corner glyphs to draw this
19/// set as intended.
20pub const ROUNDED: BorderSet = BorderSet {
21    top_left: '╭',
22    top_right: '╮',
23    bottom_left: '╰',
24    bottom_right: '╯',
25    horizontal: '─',
26    vertical: '│',
27};
28
29/// Double-line box-drawing characters (`╔═╗║╚╝`).
30pub const DOUBLE: BorderSet = BorderSet {
31    top_left: '╔',
32    top_right: '╗',
33    bottom_left: '╚',
34    bottom_right: '╝',
35    horizontal: '═',
36    vertical: '║',
37};
38
39/// Heavy (thick) single-line box-drawing characters (`┏━┓┃┗┛`).
40///
41/// No glyph in any font this crate bundles covers any of these 6 entries; drawing with
42/// `THICK` through `retroglyph_window`'s fullest bundled `FontChain` falls back to
43/// the notdef substitute for the whole set. Supply a font with real heavy-line glyphs to
44/// draw this set as intended.
45pub const THICK: BorderSet = BorderSet {
46    top_left: '┏',
47    top_right: '┓',
48    bottom_left: '┗',
49    bottom_right: '┛',
50    horizontal: '━',
51    vertical: '┃',
52};