Home

Awesome

RustType

crates.io docs.rs

RustType is a pure Rust alternative to libraries like FreeType.

The current capabilities of RustType:

Notable things that RustType does not support yet:

Testing & examples

Heavier examples, tests & benchmarks are in the ./dev directory. This avoids dev-dependency feature bleed.

Run all tests with cargo test --all --all-features.

Run examples with cargo run --example <NAME> -p dev

Getting Started

To hit the ground running with RustType, look at dev/examples/ascii.rs supplied with the crate. It demonstrates loading a font file, rasterising an arbitrary string, and displaying the result as ASCII art. If you prefer to just look at the documentation, the entry point for loading fonts is Font, from which you can access individual fonts, then their glyphs.

Future Plans

The initial motivation for the project was to provide easy-to-use font rendering for games. There are numerous avenues for improving RustType. Ideas:

If you think you could help with achieving any of these goals, feel free to open a tracking issue for discussing them.

Minimum supported rust compiler

This crate is maintained with latest stable rust.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See Also