Skip to content

Commit

Permalink
feat: add wide and tall proportional border set (#848)
Browse files Browse the repository at this point in the history
Adds `PROPORTIONAL_WIDE` and `PROPORTIONAL_TALL` border sets.

`symbols::border::PROPORTIONAL_WIDE`
```
β–„β–„β–„β–„
β–ˆxxβ–ˆ
β–ˆxxβ–ˆ
β–€β–€β–€β–€
```

`symbols::border::PROPORTIONAL_TALL`
```
β–ˆβ–€β–€β–ˆ
β–ˆxxβ–ˆ
β–ˆxxβ–ˆ
β–ˆβ–„β–„β–ˆ
```

Fixes: #834
  • Loading branch information
Emivvvvv authored Jan 19, 2024
1 parent b3a57f3 commit 405a125
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,50 @@ pub mod border {
horizontal_top: ONE_EIGHTH_TOP_EIGHT,
horizontal_bottom: ONE_EIGHTH_BOTTOM_EIGHT,
};

/// Wide proportional (visually equal width and height) border with using set of quadrants.
///
/// The border is created by using half blocks for top and bottom, and full
/// blocks for right and left sides to make horizontal and vertical borders seem equal.
///
/// ```text
/// β–„β–„β–„β–„
/// β–ˆxxβ–ˆ
/// β–ˆxxβ–ˆ
/// β–€β–€β–€β–€
/// ```
pub const PROPORTIONAL_WIDE: Set = Set {
top_right: QUADRANT_BOTTOM_HALF,
top_left: QUADRANT_BOTTOM_HALF,
bottom_right: QUADRANT_TOP_HALF,
bottom_left: QUADRANT_TOP_HALF,
vertical_left: QUADRANT_BLOCK,
vertical_right: QUADRANT_BLOCK,
horizontal_top: QUADRANT_BOTTOM_HALF,
horizontal_bottom: QUADRANT_TOP_HALF,
};

/// Tall proportional (visually equal width and height) border with using set of quadrants.
///
/// The border is created by using full blocks for all sides, except for the top and bottom,
/// which use half blocks to make horizontal and vertical borders seem equal.
///
/// ```text
/// β–•β–ˆβ–€β–€β–ˆ
/// β–•β–ˆxxβ–ˆ
/// β–•β–ˆxxβ–ˆ
/// β–•β–ˆβ–„β–„β–ˆ
/// ```
pub const PROPORTIONAL_TALL: Set = Set {
top_right: QUADRANT_BLOCK,
top_left: QUADRANT_BLOCK,
bottom_right: QUADRANT_BLOCK,
bottom_left: QUADRANT_BLOCK,
vertical_left: QUADRANT_BLOCK,
vertical_right: QUADRANT_BLOCK,
horizontal_top: QUADRANT_TOP_HALF,
horizontal_bottom: QUADRANT_BOTTOM_HALF,
};
}

pub const DOT: &str = "β€’";
Expand Down

0 comments on commit 405a125

Please sign in to comment.