* gtkutil.c (xg_get_font): Demand an Xft font.

Fixes: debbugs:3228
This commit is contained in:
Chong Yidong 2012-08-16 14:57:48 +08:00
parent 179dad8ed1
commit a2d1936838
3 changed files with 8 additions and 3 deletions

View file

@ -1,5 +1,7 @@
2012-08-16 Chong Yidong <cyd@gnu.org>
* 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.

View file

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

View file

@ -39,7 +39,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Xft font driver. */
static Lisp_Object Qxft;
Lisp_Object Qxft;
static Lisp_Object QChinting, QCautohint, QChintstyle, QCrgba, QCembolden,
QClcdfilter;