#ascii-art #ascii #figlet #font

no-std figlet-rs

Rust implementation of FIGlet to create ascii art

6 releases

0.1.5 Feb 14, 2023
0.1.4 Oct 2, 2022
0.1.3 Mar 22, 2020
0.1.2 Jun 23, 2019

#19 in No standard library

Download history 1589/week @ 2024-08-15 1326/week @ 2024-08-22 1715/week @ 2024-08-29 1382/week @ 2024-09-05 1268/week @ 2024-09-12 1295/week @ 2024-09-19 1390/week @ 2024-09-26 1308/week @ 2024-10-03 1287/week @ 2024-10-10 1405/week @ 2024-10-17 1355/week @ 2024-10-24 1675/week @ 2024-10-31 1248/week @ 2024-11-07 1046/week @ 2024-11-14 1204/week @ 2024-11-21 1211/week @ 2024-11-28

5,061 downloads per month
Used in 48 crates (32 directly)

Apache-2.0

22KB
449 lines

figlet-rs

CI docs crates.io

A Rust library for FIGlet to generate ascii art.

Example

use figlet_rs::FIGfont;

fn main() {
    let standard_font = FIGfont::standard().unwrap();
    let figure = standard_font.convert("Hello Rust");
    assert!(figure.is_some());
    println!("{}", figure.unwrap());
}

figlet-sample

License

rs-figlet is distributed under the terms of the Apache License (Version 2.0).

See LICENSE-APACHE and COPYRIGHT for details.


lib.rs:

you can visit figlet and figfont to find more details. you can visit fongdb to find more font.

Examples

download small.flf and place it to the resources folder.

convert string literal using standard or specified font:

use figlet_rs::FIGfont;

let standard_font = FIGfont::standard().unwrap();
let figure = standard_font.convert("FIGlet");
assert!(figure.is_some());

let small_font = FIGfont::from_file("resources/small.flf").unwrap();
let figure = small_font.convert("FIGlet");
assert!(figure.is_some());

No runtime deps