diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-12-06 18:47:32 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-12-06 18:47:32 +0000 |
| commit | 73baa4cf5fe693f4821d5f18742782dd04aab515 (patch) | |
| tree | 76ce65ee9342877d49ce44e50b47a0ce57deaafc | |
| parent | Merge branch 'kitty-kbd-event-types' (diff) | |
| parent | term: ensure cell dimensions are non-zero (diff) | |
Merge branch 'ensure-cell-dimensions-are-non-zero'
Closes #830
| -rw-r--r-- | CHANGELOG.md | 5 | ||||
| -rw-r--r-- | terminal.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a4e978b4..5364108c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,11 @@ ### Deprecated ### Removed ### Fixed + +* Crash when bitmap fonts are scaled down to very small font sizes + (https://codeberg.org/dnkl/foot/issues/830). + + ### Security ### Contributors @@ -688,6 +688,11 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4]) : max(term->fonts[0]->height, 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_y_ofs = term_pt_or_px_as_pixels(term, &conf->vertical_letter_offset); |
