mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
fix run-list size calculation, accounting for advance vs. end pad
This commit is contained in:
@@ -104,6 +104,11 @@ d_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, F_RunFlag
|
||||
run_list.dim.x += dst_n->v.run.dim.x;
|
||||
run_list.dim.y = Max(run_list.dim.y, dst_n->v.run.dim.y);
|
||||
base_align_px += dst_n->v.run.dim.x;
|
||||
if(n->next != 0)
|
||||
{
|
||||
run_list.dim.x -= dst_n->v.run.end_pad;
|
||||
base_align_px -= dst_n->v.run.end_pad;
|
||||
}
|
||||
}
|
||||
ProfEnd();
|
||||
return run_list;
|
||||
|
||||
@@ -839,6 +839,7 @@ f_push_run_from_string(Arena *arena, F_Tag tag, F32 size, F32 base_align_px, F32
|
||||
}
|
||||
run.dim = dim;
|
||||
run.dim.x += last_piece_end_pad;
|
||||
run.end_pad = last_piece_end_pad;
|
||||
run.ascent = hash2style_node->ascent;
|
||||
run.descent = hash2style_node->descent;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ struct F_Run
|
||||
{
|
||||
F_PieceArray pieces;
|
||||
Vec2F32 dim;
|
||||
F32 end_pad;
|
||||
F32 ascent;
|
||||
F32 descent;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user