mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-25 09:05:47 -04:00
parent
46cd5dfafc
commit
8b260568fb
2 changed files with 10 additions and 0 deletions
|
|
@ -47,6 +47,11 @@
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
* Crash when bitmap fonts are scaled down to very small font sizes
|
||||||
|
(https://codeberg.org/dnkl/foot/issues/830).
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
### Contributors
|
### Contributors
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -688,6 +688,11 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4])
|
||||||
: max(term->fonts[0]->height,
|
: max(term->fonts[0]->height,
|
||||||
term->fonts[0]->ascent + term->fonts[0]->descent);
|
term->fonts[0]->ascent + term->fonts[0]->descent);
|
||||||
|
|
||||||
|
if (term->cell_width <= 0)
|
||||||
|
term->cell_width = 1;
|
||||||
|
if (term->cell_height <= 0)
|
||||||
|
term->cell_height = 1;
|
||||||
|
|
||||||
term->font_x_ofs = term_pt_or_px_as_pixels(term, &conf->horizontal_letter_offset);
|
term->font_x_ofs = term_pt_or_px_as_pixels(term, &conf->horizontal_letter_offset);
|
||||||
term->font_y_ofs = term_pt_or_px_as_pixels(term, &conf->vertical_letter_offset);
|
term->font_y_ofs = term_pt_or_px_as_pixels(term, &conf->vertical_letter_offset);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue