liberty-xui: fix build on systems without A_ITALIC

This commit is contained in:
Přemysl Eric Janouch 2023-07-04 06:39:56 +02:00
parent 717c301207
commit 4c2874649d
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 1 deletions

View File

@ -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;