This commit is contained in:
Nathan Sobo 2023-10-03 15:17:45 -06:00
parent 45429b5400
commit 4208ac2958
7 changed files with 26 additions and 66 deletions

View file

@ -631,9 +631,8 @@ impl Renderer {
glyph.origin,
) {
// Snap sprite to pixel grid.
let origin = dbg!(
dbg!((glyph.origin * scale_factor).floor()) + dbg!(sprite.offset.to_f32())
);
let origin = (glyph.origin * scale_factor).floor() + sprite.offset.to_f32();
// dbg!(origin);
sprites_by_atlas
.entry(sprite.atlas_id)
.or_insert_with(Vec::new)

View file

@ -114,7 +114,7 @@ impl SpriteCache {
let (alloc_id, atlas_bounds) = self
.atlases
.upload(glyph_bounds.size(), &mask)
.upload(dbg!(glyph_bounds.size()), &mask)
.expect("could not upload glyph");
Some(GlyphSprite {
atlas_id: alloc_id.atlas_id,