mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
feature: add resize-keep-grid to allow text reflow on font changes
This commit is contained in:
parent
a2fc2a986e
commit
1969717527
5 changed files with 23 additions and 1 deletions
|
|
@ -819,11 +819,15 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4],
|
|||
* render_resize() after this function */
|
||||
if (resize_grid) {
|
||||
/* Use force, since cell-width/height may have changed */
|
||||
enum resize_options resize_opts = RESIZE_FORCE;
|
||||
if (conf->resize_keep_grid)
|
||||
resize_opts |= RESIZE_KEEP_GRID;
|
||||
|
||||
render_resize(
|
||||
term,
|
||||
(int)roundf(term->width / term->scale),
|
||||
(int)roundf(term->height / term->scale),
|
||||
RESIZE_FORCE | RESIZE_KEEP_GRID);
|
||||
resize_opts);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue