Finally reached parity pre-rendering overhaul

This commit is contained in:
2024-06-29 23:49:12 -04:00
parent 72eb3a1b3b
commit 2698670890
9 changed files with 43 additions and 23 deletions

View File

@ -490,7 +490,7 @@ draw_text_batch :: proc(ctx: ^Context, entry: ^Entry, shaped: ^ShapedText,
slot_position, _ := atlas_bbox( atlas, region_kind, atlas_index )
glyph_scale := bounds_size * entry.size_scale + glyph_padding
bounds_0_scaled := ceil( vbounds_0 * entry.size_scale )
dst := glyph_translate + (bounds_0_scaled - glyph_padding) * scale
dst := glyph_translate + bounds_0_scaled * scale
dst_scale := glyph_scale * scale
textspace_x_form( & slot_position, & glyph_scale, atlas_size )

View File

@ -122,7 +122,7 @@ shape_text_uncached :: proc( ctx : ^Context, font : FontID, text_utf8 : string,
position.y
})
position.x += f32(advance) * entry.size_scale
position.x += ceil(f32(advance) * entry.size_scale)
prev_codepoint = codepoint
}