mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
Merge pull request 'limit font size to non-negative values'
Closes https://codeberg.org/dnkl/foot/issues/38
This commit is contained in:
commit
9eb9a3d8a5
2 changed files with 3 additions and 1 deletions
|
|
@ -105,6 +105,8 @@
|
|||
* A multi-column character that does not fit on the current line is
|
||||
now printed on the next line, instead of only printing half the
|
||||
character.
|
||||
* Font size can no longer be reduced to negative values
|
||||
(https://codeberg.org/dnkl/foot/issues/38).
|
||||
|
||||
|
||||
### Security
|
||||
|
|
|
|||
|
|
@ -1430,7 +1430,7 @@ term_font_size_adjust(struct terminal *term, double amount)
|
|||
old_pt_size = term->font_sizes[i].px_size * 72. / dpi;
|
||||
}
|
||||
|
||||
term->font_sizes[i].pt_size = old_pt_size + amount;
|
||||
term->font_sizes[i].pt_size = fmax(old_pt_size + amount, 0);
|
||||
term->font_sizes[i].px_size = -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue