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

@ -167,6 +167,10 @@ ui_box_compute_layout :: proc( box : ^UI_Box,
if len(box.text.str) > 0
{
ascent, descent, line_gap := get_font_vertical_metrics(style.font, layout.font_size)
offset := text_size
offset += { 0, -descent }
content_size := content_bounds.max - content_bounds.min
text_pos : Vec2
text_pos = content_bounds.min