textbox.c
// set an Xft font by name
set an Xft font by name
set an Xft font by name
void textbox_font(textbox *tb, char *font, char *fg, char *bg)
{
	if (tb->font) XftFontClose(display, tb->font);
	tb->font = XftFontOpenName(display, screen_id, font);
	XftColorAllocName(display, DefaultVisual(display, screen_id), DefaultColormap(display, screen_id), fg, &tb->color_fg);
	XftColorAllocName(display, DefaultVisual(display, screen_id), DefaultColormap(display, screen_id), bg, &tb->color_bg);
}
void textbox_font ( textbox * tb , char * font , char * fg , char * bg ) { if ( tb -> font ) XftFontClose ( display , tb -> font ) ; tb -> font = XftFontOpenName ( display , screen_id , font ) ; XftColorAllocName ( display , DefaultVisual ( display , screen_id ) , DefaultColormap ( display , screen_id ) , fg , & tb -> color_fg ) ; XftColorAllocName ( display , DefaultVisual ( display , screen_id ) , DefaultColormap ( display , screen_id ) , bg , & tb -> color_bg ) ; }
set an Xft font by name
set an Xft font by name