aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-08 15:57:58 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-08 15:57:58 +0000
commit83a10402af38e74ac53a6cc5d362de9daecd5a2e (patch)
treeb30f9436b34aa24258f72c2cb25a8beaabf851e1
parentcsi: cancel selection *before* switching grid (diff)
font: improve logging
-rw-r--r--font.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/font.c b/font.c
index 8deb2a3a..56213c12 100644
--- a/font.c
+++ b/font.c
@@ -280,16 +280,13 @@ glyph_for_wchar(struct font *font, wchar_t wc, struct glyph *glyph)
FT_UInt idx = FT_Get_Char_Index(font->face, wc);
if (idx == 0) {
- LOG_DBG("no glyph found for %02x %02x %02x %02x",
- (unsigned char)utf8[0], (unsigned char)utf8[1],
- (unsigned char)utf8[2], (unsigned char)utf8[3]);
-
- /* Try fallback fonts */
+ /* No glyph in this font, try fallback fonts */
tll_foreach(font->fallbacks, it) {
struct font fallback;
if (from_name(it->item, NULL, "", &fallback, true)) {
if (glyph_for_wchar(&fallback, wc, glyph)) {
- LOG_DBG("used fallback %s (fixup = %f)", it->item, fallback.pixel_size_fixup);
+ LOG_DBG("%C: used fallback %s (fixup = %f)",
+ wc, it->item, fallback.pixel_size_fixup);
font_destroy(&fallback);
return true;
}
@@ -300,6 +297,9 @@ glyph_for_wchar(struct font *font, wchar_t wc, struct glyph *glyph)
if (font->is_fallback)
return false;
+
+ LOG_WARN("%C: no glyph found (in neither the main font, "
+ "nor any fallback fonts)", wc);
}
err = FT_Load_Glyph(font->face, idx, font->load_flags);