run command
cargo run --example single_glyph examples/assets/FiraSans-Regular.ttf j
The problem meets.
bitmap_left() is possible <0
let x = if glyph.bitmap_left() > 0 {glyph.bitmap_left() as usize } else {(-glyph.bitmap_left()) as usize};
j is a little special case. But I did not know how to make the sample better for get correct gylyph height and width. It seems bitmap_xxx api is not get the outline of the character. bbox may be helpful.