From d22cd1561bd8073414c42002f35f4d5dcbdd7a5e Mon Sep 17 00:00:00 2001 From: Grayson MacKenzie Date: Tue, 22 Jul 2014 15:20:21 -0400 Subject: [PATCH] Fixed #68 --- bar.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bar.c b/bar.c index 26826e4..29859a4 100644 --- a/bar.c +++ b/bar.c @@ -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];