Ensure a positive label height. Closes issue #169.

This commit is contained in:
Kris Maglione 2010-05-17 12:29:18 -04:00
parent 3898849361
commit 38ae2bcc17

View File

@ -800,7 +800,7 @@ textwidth(Font *font, char *text) {
uint
labelh(Font *font) {
return font->height + font->descent + font->pad.min.y + font->pad.max.y;
return max(font->height + font->descent + font->pad.min.y + font->pad.max.y, 1);
}
/* Misc */