mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-23 05:33:57 -04:00
render: use rounding for fractional scale
If we truncate the buffer dimensions we may accidentally submit a buffer with inappropriate size.
This commit is contained in:
parent
d1df98e0ca
commit
b7100d5716
4 changed files with 12 additions and 4 deletions
|
|
@ -778,7 +778,10 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4])
|
|||
sixel_cell_size_changed(term);
|
||||
|
||||
/* Use force, since cell-width/height may have changed */
|
||||
render_resize_force(term, term->width / term->scale, term->height / term->scale);
|
||||
render_resize_force(
|
||||
term,
|
||||
round(term->width / term->scale),
|
||||
round(term->height / term->scale));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue