-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
With version 0.115.0, this following code panics:
use piston_window::*;
fn main() {
let mut window: PistonWindow = WindowSettings::new("test", [800; 2]).build().unwrap();
let mut glyphs = window.load_font("firacode.ttf").unwrap();
while let Some(event) = window.next() {
window.draw_2d(&event, |Context { transform, .. }, g, device| {
clear([0.0, 0.0, 0.0, 1.0], g);
text(
[1.0; 4],
80,
"Hellow World!",
&mut glyphs,
transform.trans(20.0, 100.0),
g,
)
.unwrap();
glyphs.factory.encoder.flush(device);
});
}
}
Looking at the backtrace, the actual panic originates from rusttype
. Not sure if this is a problem with piston
, rusttype
, or the font I am using, but this font did not cause problems in previous versions.
Metadata
Metadata
Assignees
Labels
No labels