Hide more font-aa implementation details
Submitted by Chris Wilson
Link to original bug (#399744)
Description
As noted on bug 354063#5
, g-t should be able to avoid depending on x11 directly.
void terminal_widget_set_pango_font (GtkWidget *widget, const PangoFontDescription *font_desc, gboolean no_aa_without_render) { g_return_if_fail (font_desc != NULL);
if (!no_aa_without_render) vte_terminal_set_font (VTE_TERMINAL (widget), font_desc);
else { Display *dpy; gboolean has_render; gint event_base, error_base;
dpy = gdk_x11_display_get_xdisplay (gdk_display_get_default ());
has_render = (XRenderQueryExtension (dpy, &event_base, &error_base) &&
(XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0));
if (has_render)
vte_terminal_set_font (VTE_TERMINAL (widget), font_desc);
else
vte_terminal_set_font_full (VTE_TERMINAL (widget),
font_desc,
VTE_ANTI_ALIAS_FORCE_DISABLE);
}
}
But cannot this be provided for with the backends making their own choice for VTE_ANTI_ALIAS_DEFAULT? And this code snippet can then just be dropped in _vte_xft_font_open().
Version: 0.15.x
Resolution: RESOLVED FIXED