mirror of
https://github.com/BastaMasta/boxy-cli.git
synced 2026-07-28 18:35:39 +03:00
added note to depict that zwj sequences pose probems based on the terminal, and may work improperly depending on the terminal
This commit is contained in:
@@ -23,7 +23,9 @@ Dual-licensed under [Apache 2.0](https://github.com/BastaMasta/boxy-cli/blob/mai
|
||||
- **Text alignment** — left, center, or right per segment
|
||||
- **Terminal-aware sizing** — auto-sizes to terminal width, or set a fixed width
|
||||
- **Two APIs** — imperative `Boxy` struct and fluent `BoxyBuilder`
|
||||
- **Full Unicode support** — grapheme-cluster-aware word wrapping and display-width-correct alignment for CJK, emoji, combining marks, and ZWJ sequences
|
||||
- **Full Unicode support** — grapheme-cluster-aware word wrapping and display-width-correct alignment for CJK, emoji, and combining marks.
|
||||
|
||||
Note: ZWJ sequences (e.g. 👨👩👧) may display with slightly incorrect padding on some terminals due to disagreements between the Unicode standard and individual terminal emulators on ZWJ rendering width; plain emoji (🦀, 🚀) and CJK text are unaffected
|
||||
- **Macro support** — `boxy!` for quick one-liners — still a work in progress with limited functionality
|
||||
|
||||
---
|
||||
|
||||
@@ -7,7 +7,7 @@ use terminal_size::terminal_size;
|
||||
fn main() {
|
||||
let mut box1 = Boxy::new(BoxType::Bold, "#00ffff");
|
||||
println!("Terminal Size: {:?}", terminal_size());
|
||||
box1.add_text_sgmt("😀 😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀 ááááááááááááááááááááááááááááááááááááááááááááááá Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur", "#00ffff", BoxAlign::Left);
|
||||
box1.add_text_sgmt("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur", "#00ffff", BoxAlign::Left);
|
||||
box1.add_text_sgmt("Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.", "#ffff", BoxAlign::Center);
|
||||
box1.add_text_sgmt("Hello Theree", "#00ffff", BoxAlign::Center);
|
||||
box1.set_padding(BoxPad::from_tldr(1, 2, 3, 7), BoxPad::uniform(3));
|
||||
|
||||
+3
-1
@@ -23,7 +23,9 @@ Dual-licensed under [Apache 2.0](https://github.com/BastaMasta/boxy-cli/blob/mai
|
||||
- **Text alignment** — left, center, or right per segment
|
||||
- **Terminal-aware sizing** — auto-sizes to terminal width, or set a fixed width
|
||||
- **Two APIs** — imperative `Boxy` struct and fluent `BoxyBuilder`
|
||||
- **Full Unicode support** — grapheme-cluster-aware word wrapping and display-width-correct alignment for CJK, emoji, combining marks, and ZWJ sequences
|
||||
- **Full Unicode support** — grapheme-cluster-aware word wrapping and display-width-correct alignment for CJK, emoji, and combining marks.
|
||||
|
||||
Note: ZWJ sequences (e.g. 👨👩👧) may display with slightly incorrect padding on some terminals due to disagreements between the Unicode standard and individual terminal emulators on ZWJ rendering width; plain emoji (🦀, 🚀) and CJK text are unaffected
|
||||
- **Macro support** — `boxy!` for quick one-liners — still a work in progress with limited functionality
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user