never return zero cell width for a font

This commit is contained in:
Kovid Goyal
2024-08-24 11:19:44 +05:30
parent 60601a6dba
commit e5321f96a3

View File

@@ -386,6 +386,7 @@ calc_cell_width(Face *self) {
ans = MAX(ans, (unsigned int)ceilf((float)self->face->glyph->metrics.horiAdvance / 64.f));
}
}
if (!ans) ans = (unsigned int)ceilf(self->face->size->metrics.max_advance / 64.f);
return ans;
}