This commit is contained in:
Grayson MacKenzie 2014-07-22 15:20:21 -04:00
parent f3e9df4a97
commit d22cd1561b
1 changed files with 5 additions and 1 deletions

6
bar.c
View File

@ -296,8 +296,12 @@ area_add (char *str, const char *optend, char **end, monitor_t *mon, const int x
font_t *
select_drawable_font (uint16_t c)
{
/* if the font is null, stop and return it, if it is outside of the character
* set or has a width of zero then move on; it cannot display the character.
*/
int i = 0;
while (all_fonts[i] != NULL && (c < all_fonts[i]->char_min || c > all_fonts[i]->char_max))
while (all_fonts[i] != NULL && (c < all_fonts[i]->char_min || c > all_fonts[i]->char_max
|| all_fonts[i]->width_lut[c - all_fonts[i]->char_min].character_width == 0))
i++;
return all_fonts[i];