2 releases
0.3.1 | Oct 25, 2023 |
---|---|
0.3.0 | Oct 25, 2023 |
#16 in #braille
22KB
531 lines
Text to ASCII Art
A text art generator can include any kind of characters depending on the font. The art is composed of Braille characters like ⠐ ⠝ ⠿ ⣫ ⣷ (total 255) Does not support emoji and some strange characters.
Usage:
use text_art_cn::{generate, Options, TextDirect};
let opt = Options {
text: "A".to_string(),
font: "/System/Library/Fonts/PingFang.ttc".to_string(),
..Default::default()
};
let art = generate(opt).unwrap();
println!("{}", art);
// Output:
// ⠀⠀⠀⠀⠀⣠⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⢰⡟⢻⡄⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⢠⡿⠀⠈⢿⡀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⢀⣾⣧⣤⣤⣼⣷⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⣼⠏⠀⠀⠀⠀⠹⣧⠀⠀⠀⠀⠀⠀
// ⠀⠐⠋⠀⠀⠀⠀⠀⠀⠛⠂⠀⠀⠀⠀⠀
//
Dependencies
~15MB
~266K SLoC