I was getting incorrect bounds for glyphs after rasterizing the space(' ') glyph.
In rasterize_glyph(), there is an early return if the bitmap buffer is null (as it is a space) and because of that the char size is not reset correctly.
Then if you call raster_bounds for another glyph it loads it with the rasterize char size.
So I just removed the early return and add an else block, so the reset is called at the end.
I was getting incorrect bounds for glyphs after rasterizing the space(' ') glyph.
In rasterize_glyph(), there is an early return if the bitmap buffer is null (as it is a space) and because of that the char size is not reset correctly. Then if you call raster_bounds for another glyph it loads it with the rasterize char size.
So I just removed the early return and add an else block, so the reset is called at the end.