diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-11 10:38:06 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-11 10:38:06 +0200 |
| commit | ceb2880f91b79de5024b3884991419d74466dec6 (patch) | |
| tree | c921ebbd77edfaff356a35906f2ac8b3e560785b /drw.c | |
| parent | 65745aff10ec35dfcae8e2909715156db6d653f2 (diff) | |
add font weights
Diffstat (limited to 'drw.c')
| -rw-r--r-- | drw.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |