Simple, performant and compatible 2D rendering crate.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jens Pitkänen 4465cc8796 Add todos for 0.6.0 пре 3 дана
examples Add fae::Error and clean up error.rs and profiler.rs пре 4 дана
src Add todos for 0.6.0 пре 3 дана
.gitignore Remove accidentally added file, prevent future accidents пре 10 месеци
Cargo.lock Clean up and update deps пре 4 дана
Cargo.toml Clean up and update deps пре 4 дана
LICENSE.md Add license, set windows subsystem in examples пре 1 година
PRE_0.5.0_CHECKED_FILES.md Clean up renderer.rs пре 4 дана
README.md Refactor public api to be easier to understand пре 5 дана
build.rs Simplify version selection пре 1 месец

README.md

Fae

Fae is a simple, performant, and compatible 2D rendering crate built on top of glutin, with optional text rendering functionality.

Fae’s main design goals are simplicity and performance while supporting older/low-end target platforms. The optional text-rendering feature text can draw multi-line, cached text with the font8x8 (a font-in-a-crate consisting of very densely encoded 8x8 glyphs) and rusttype (ttf rasterizer) crates. So no ligatures or other sophisticated font rendering.

Fae supports OpenGL 2.1 and OpenGL ES 2.0 contexts, but will do some optimizations (VAOs, instanced rendering) if a newer context (3.3+/ES 3.0+) is available.

This is not a serious contender intended to replace any general 2D rendering crates. I’m developing this as an exercise to learn about OpenGL and text rendering, with an eventual goal of being usable for my own applications. Use with caution!

Important note

Fae is currently under development, and I wouldn’t recommend it for any kind of usage yet. It’s on crates.io mostly so I don’t have to come up with another name :)

Cargo features

  • The png feature implements the Image::with_png function, which allows you to load images from PNG data. This is a very convenient feature, but not necessarily a requirement for using the crate, so it’s optional. Also, it’s a noticeable bump in executable size, so use with caution, if you’re going for minimal exes.
  • The text feature implements the text mod, which has functionality for drawing strings, including multi-line wrapping, text alignment, and glyph caching. It does not provide any functionality for rasterizing glyphs from fonts.
    • The font8x8 feature provides text rendering with the font8x8 font, via Font::with_font8x8.
    • The ttf feature provides text rendering with any TTF font (rasterized by rusttype), via Font::with_ttf. Crate recommendation for getting ttfs from the system: font-loader.
  • The profiler feature implements the profiler mod. Everything in the minreq::profiler module is a no-op if this feature is disabled.

Issues / contributing

If you come across bugs, other issues or feature requests, feel free to open an issue on GitHub. Pull requests are welcome as well, though keep in mind that this is supposed to be a relatively minimalistic crate, so I probably won’t include any considerable new functionality. If in doubt, open an issue!

License

The fae crate is distributed under the MIT license.