mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 16:58:09 +02:00
never return zero cell width for a font
This commit is contained in:
@@ -386,6 +386,7 @@ calc_cell_width(Face *self) {
|
|||||||
ans = MAX(ans, (unsigned int)ceilf((float)self->face->glyph->metrics.horiAdvance / 64.f));
|
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;
|
return ans;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user