Center line around its bounding box

This commit is contained in:
Antonio Scandurra
2021-03-25 17:21:26 +01:00
parent 4dc1b1e179
commit 466f6e0479
3 changed files with 8 additions and 6 deletions
-1
View File
@@ -112,7 +112,6 @@ impl SpriteCache {
// Snap sprite to pixel grid.
let offset = glyph_bounds.origin().to_f32()
- vec2f(target_position.x().fract(), target_position.y().fract());
Some(GlyphSprite {
atlas_id: atlasses.len() - 1,
atlas_origin: atlas_bounds.origin(),