aboutsummaryrefslogtreecommitdiff
path: root/drw.c
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-04-11 10:38:06 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-04-11 10:38:06 +0200
commitceb2880f91b79de5024b3884991419d74466dec6 (patch)
treec921ebbd77edfaff356a35906f2ac8b3e560785b /drw.c
parent65745aff10ec35dfcae8e2909715156db6d653f2 (diff)
add font weights
Diffstat (limited to 'drw.c')
-rw-r--r--drw.c6
1 files changed, 4 insertions, 2 deletions
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;