aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-07-04 06:39:56 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-07-04 06:40:54 +0200
commit4c2874649d4b1d2414793d60915d309f0bf67117 (patch)
treec897a7916d9112fc667a60f03aca97cab9913e68
parent717c30120790e5b1d8b11231996f70f30a1dada8 (diff)
downloadliberty-4c2874649d4b1d2414793d60915d309f0bf67117.tar.gz
liberty-4c2874649d4b1d2414793d60915d309f0bf67117.tar.xz
liberty-4c2874649d4b1d2414793d60915d309f0bf67117.zip
liberty-xui: fix build on systems without A_ITALIC
-rw-r--r--liberty-xui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/liberty-xui.c b/liberty-xui.c
index 125985e..45a6d90 100644
--- a/liberty-xui.c
+++ b/liberty-xui.c
@@ -1030,7 +1030,6 @@ x11_font_destroy (struct x11_font *self)
LIST_FOR_EACH (struct x11_font_link, iter, self->list)
x11_font_link_destroy (iter);
free (self);
-
}
/// Find or instantiate a font that can render the character given by cp.
@@ -1161,8 +1160,10 @@ x11_widget_font (struct widget *self)
unsigned style = 0;
if (self->attrs & A_BOLD)
style |= X11_FONT_BOLD;
+#ifdef A_ITALIC
if (self->attrs & A_ITALIC)
style |= X11_FONT_ITALIC;
+#endif // A_ITALIC
if (self->extended_attrs & XUI_ATTR_MONOSPACE)
style |= X11_FONT_MONOSPACE;