hecrj / coffee

An opinionated 2D game engine for Rust
https://docs.rs/coffee
MIT License
1.09k stars 55 forks source link

Fix `Font::measure` and `Text` widget #51

Closed hecrj closed 5 years ago

hecrj commented 5 years ago

Fixes #43.

The fix consists in using the brand new GlyphBrush::glyph_bounds method instead of GlyphBrush::pixel_bounds (see https://github.com/alexheretic/glyph-brush/issues/68). The Text widget measure function can directly return the result now!