libi3/font: Log the used font
This commit is contained in:
parent
9f7247fd9c
commit
310f542937
10
libi3/font.c
10
libi3/font.c
|
@ -39,7 +39,15 @@ static bool load_pango_font(i3Font *font, const char *desc) {
|
||||||
/* Load the font description */
|
/* Load the font description */
|
||||||
font->specific.pango_desc = pango_font_description_from_string(desc);
|
font->specific.pango_desc = pango_font_description_from_string(desc);
|
||||||
if (!font->specific.pango_desc)
|
if (!font->specific.pango_desc)
|
||||||
|
{
|
||||||
|
ELOG("Could not open font %s with Pango, fallback to X font.\n", desc);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG("Using Pango font %s, size %d",
|
||||||
|
pango_font_description_get_family(font->specific.pango_desc),
|
||||||
|
pango_font_description_get_size(font->specific.pango_desc)
|
||||||
|
);
|
||||||
|
|
||||||
/* We cache root_visual_type here, since you must call
|
/* We cache root_visual_type here, since you must call
|
||||||
* load_pango_font before any other pango function
|
* load_pango_font before any other pango function
|
||||||
|
@ -178,6 +186,8 @@ i3Font load_font(const char *pattern, const bool fallback) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG("Using X font %s", pattern);
|
||||||
|
|
||||||
/* Get information (height/name) for this font */
|
/* Get information (height/name) for this font */
|
||||||
if (!(font.specific.xcb.info = xcb_query_font_reply(conn, info_cookie, NULL)))
|
if (!(font.specific.xcb.info = xcb_query_font_reply(conn, info_cookie, NULL)))
|
||||||
errx(EXIT_FAILURE, "Could not load font \"%s\"", pattern);
|
errx(EXIT_FAILURE, "Could not load font \"%s\"", pattern);
|
||||||
|
|
Loading…
Reference in New Issue