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

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;