Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The single_glyph example might crash #196

Open
baskerville opened this issue Nov 26, 2016 · 2 comments
Open

The single_glyph example might crash #196

baskerville opened this issue Nov 26, 2016 · 2 comments
Labels

Comments

@baskerville
Copy link

Steps to reproduce:

cargo run --example single_glyph DejaVuSans-Oblique.ttf A
@lucklove lucklove added the bug label Nov 27, 2016
@lucklove
Copy link

lucklove commented Nov 27, 2016

In my tests(debug mode), It not work with these characters: ['A' , 'J', 'X', 'Z', 'p', 'x', 'y', 'z', ...], the crash message is:

cargo run --example single_glyph DejaVuSans-Oblique.ttf A
    Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target/debug/examples/single_glyph DejaVuSans-Oblique.ttf A`
thread 'main' panicked at 'attempt to add with overflow', examples/single_glyph.rs:14
note: Run with `RUST_BACKTRACE=1` for a backtrace.

It seems there is an usize overflow.

@baskerville
Copy link
Author

Yes, glyph.bitmap_left() can be negative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants