Skip to content

Fork from the "initials" rust crate that adds a few additional features and minor tweaks

License

Notifications You must be signed in to change notification settings

ygormartins/initials-revamped.rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

initials-revamped

initials-revamped is a fork from the initials crate that allows generating customizable avatars with the initial characters from arbitrary name values.

Fork To-Do List

  • Change lib path from initials to initials-revamped
  • Submit crate to crates.io
  • Use a more readable, fitting font (Roboto)
  • Add support for directly using font bytes content (as opposed to paths)
  • Update documention to include new features & change outdated info
  • Better integration with the image crate
  • Add a write_to method to write raw bytes data to an array

Setup and Usage

In your Cargo.toml, add the following:

[dependencies]
initials_revamped = "*"
use initials_crate::{AvatarBuilder, AvatarResult};

fn avatar() -> AvatarResult {
    AvatarBuilder::new("Avatar")
        .with_font_color("#000000")?
        .with_background_color("#FAFAFA")?
        .with_width(200)?
        .with_height(200)
}

fn main() {
    let avatar = avatar().unwrap();
    let image = avatar.draw();
    // use the generated image
}

See Documentation (original docs - still haven't written my own)

Local Server

Doc

License

MIT

Credits

All the credit goes to Onur Sönmez, the original creator of this awesome lib.

About

Fork from the "initials" rust crate that adds a few additional features and minor tweaks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 73.4%
  • HTML 26.5%
  • Procfile 0.1%