From: Chong Yidong Date: Thu, 16 Aug 2012 06:57:48 +0000 (+0800) Subject: * gtkutil.c (xg_get_font): Demand an Xft font. X-Git-Tag: emacs-24.2.90~647 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a2d1936838348d0a29e4a64f545180276f30cb99;p=emacs.git * gtkutil.c (xg_get_font): Demand an Xft font. Fixes: debbugs:3228 --- diff --git a/src/ChangeLog b/src/ChangeLog index 54215f59f8e..663035077bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2012-08-16 Chong Yidong + * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228). + * xfont.c (xfont_open): * xftfont.c (xftfont_open): Set the font's max_width field. diff --git a/src/gtkutil.c b/src/gtkutil.c index 6638f375a2c..a4de47f073c 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2016,7 +2016,7 @@ xg_get_file_name (FRAME_PTR f, #if USE_NEW_GTK_FONT_CHOOSER -extern Lisp_Object Qnormal; +extern Lisp_Object Qxft, Qnormal; extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; extern Lisp_Object Qoblique, Qitalic; @@ -2099,7 +2099,7 @@ xg_get_font (FRAME_PTR f, const char *default_name) if (desc) { - Lisp_Object args[8]; + Lisp_Object args[10]; const char *name = pango_font_description_get_family (desc); gint size = pango_font_description_get_size (desc); PangoWeight weight = pango_font_description_get_weight (desc); @@ -2117,6 +2117,9 @@ xg_get_font (FRAME_PTR f, const char *default_name) args[6] = QCslant; args[7] = XG_STYLE_TO_SYMBOL (style); + args[8] = QCtype; + args[9] = Qxft; + font = Ffont_spec (8, args); pango_font_description_free (desc); diff --git a/src/xftfont.c b/src/xftfont.c index 34c6a8fa0b4..5e60ab0c4d3 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -39,7 +39,7 @@ along with GNU Emacs. If not, see . */ /* Xft font driver. */ -static Lisp_Object Qxft; +Lisp_Object Qxft; static Lisp_Object QChinting, QCautohint, QChintstyle, QCrgba, QCembolden, QClcdfilter;