PistonDevelopers / gfx_text

Draw text for gfx using freetype
http://docs.piston.rs/gfx_text/gfx_text/
MIT License
22 stars 12 forks source link

Measuring text size #25

Closed LaylBongers closed 8 years ago

LaylBongers commented 9 years ago

This is a feature required to do common things such as centering text and implementing a text box. Perhaps like this:

let mut text = gfx_text::new(factory).build().unwrap();
let size: [i32; 2] = text.measure("Test Value");
kvark commented 9 years ago

:+1:

Kagami commented 8 years ago

@LaylConway please check measure function in 0.5.1. See #31 for details.