Dont abort for too small scaled font sizes

This commit is contained in:
Kovid Goyal 2025-02-18 17:06:12 +05:30
parent c520b0b1b9
commit 45d931f61c
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -837,7 +837,7 @@ effective_scale(RunFont rf) {
static float
scaled_cell_dimensions(RunFont rf, unsigned *width, unsigned *height) {
float frac = effective_scale(rf);
float frac = MAX(effective_scale(rf), 4.0f / *width);
*width = (unsigned)ceilf(frac * *width);
*height = (unsigned)ceilf(frac * *height);
return frac;