Load fonts as vector graphics in pure Rust with advanced text layout. When you want to render text, fonterator gives you an iterator over footile
PathOps, which you can easily pass right into footile.
use fonterator as font; // For parsing font file. use ; // For rendering font text. use ; // For saving PNG const FONT_SIZE: f32 = 32.0;
- Load TTF/OTF fonts and font collections.
- Automatic kerning and font layout.
- Horizontal and vertical text layout.
- Left-to-right and right-to-left text layout.
- Use fallback fonts if a character is not available from one font.
- Align text left/center/right/vertical
- Line Wrapping
- Arabic and other script text shaping
- Better interoperability for monospace when mixing scripts.
Contributors are always welcome! Whether it is a bug report, bug fix, feature request, feature implementation or whatever. Don't be shy about getting involved. I always make time to fix bugs, so usually a patched version of the library will be out soon after a report. Features take me longer, though. I'll also always listen to any design critiques you have. If you have any questions you can email me at email@example.com. Otherwise, here's a link to the issues on GitHub.
And, as always, make sure to always follow the code of conduct. Happy coding!
This repository is licensed under either of the following:
- MIT License (MIT) - See accompanying file LICENSE_MIT.txt or copy at https://opensource.org/licenses/MIT
- Boost Software License (BSL-1.0) - See accompanying file LICENSE_BSL.txt or copy at https://www.boost.org/LICENSE_1_0.txt
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above without any additional terms or conditions.