Fix get_glyph_shape panic consola \u{feff}

Panics with
```
let consolas = 
    stb_truetype::FontInfo::new(&include_bytes!("../consola.ttf")[..], 
0).ok_or("bad font")?;
let feff_id = consolas.find_glyph_index('\u{feff}' as u32);
let _ = consolas.get_glyph_shape(feff_id);
```
Fixes #19
parent 191b3ef4
......@@ -909,9 +909,9 @@ impl<Data: Deref<Target = [u8]>> FontInfo<Data> {
scx = x;
scy = y;
let (next_flags, next_x, next_y) = {
let peek = &iter.peek().unwrap().1;
(peek.flags, peek.x, peek.y)
let (next_flags, next_x, next_y) = match iter.peek() {
Some((_, fd)) => (fd.flags, fd.x, fd.y),
None => break,
};
if next_flags & 1 == 0 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment