From ceb2880f91b79de5024b3884991419d74466dec6 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Tue, 11 Apr 2023 10:38:06 +0200 Subject: add font weights --- drw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drw.c') diff --git a/drw.c b/drw.c index 79f4ab1..0b780c6 100644 --- a/drw.c +++ b/drw.c @@ -172,10 +172,8 @@ font_cache_generate_box(FontCache *fontcache) { Font *font = get_font_with_charcode(fontcache, 0); FT_Set_Pixel_Sizes(font->face, 0, fontcache->fontsize); - fprintf(stderr, "fontsize: %i\n", fontcache->fontsize); fontcache->box.width = (font->face->size->metrics.max_advance) >> 6; fontcache->box.height = (font->face->size->metrics.height) >> 6; - fprintf(stderr, "width: %i, height: %i\n", fontcache->box.width, fontcache->box.height); } @@ -300,6 +298,10 @@ get_font_with_charcode(FontCache *fontcache, uint_least32_t charcode) for (; element; element = element->next) { font = &(*element->family)[fontcache->fonttype]; + + if (!font->path) + continue; + if (!font->loaded) { init_font(font); font->loaded = 1; -- cgit v1.2.3-70-g09d2