[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default face problem

From: Kenichi Handa
Subject: Re: Default face problem
Date: Wed, 10 May 2006 13:17:56 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, address@hidden (Kim F. Storm) writes:

> Kenichi Handa <address@hidden> writes:
>> When a font-related attribute of the default face is
>> changed, set_font_frame_param (xfaces.c) is called.  So,
>> perhaps calling it or simulating what it does is the right
>> thing.

> Well, the Fmodify_frame_parameters call in that function
> will cause a call to x_set_font.

> x_set_font calls recompute_basic_faces which calls
> realize_basic_faces, which calls realize_default_face.


> To me, it sound like realize_default_face would be a good
> place to fix this, but I'm not an expert on this.

It seems that there's no expert other than Gerd.

Anyway, I've just tried this patch along your idea.

*** xfaces.c    13 Apr 2006 09:46:44 +0900      1.345
--- xfaces.c    10 May 2006 13:06:28 +0900      
*** 7072,7077 ****
--- 7072,7087 ----
    check_lface (lface);
    bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs);
    face = realize_face (c, attrs, 0, NULL, DEFAULT_FACE_ID);
+ #ifdef HAVE_X_WINDOWS  
+   if (face->font != FRAME_FONT (f))
+     /* As the font specified for the frame was not acceptable as a
+        font for the default face (perhaps because auto-scaled fonts
+        are rejected), we must adjust the frame font.  */
+     x_set_font (f, build_string (face->font_name), Qnil);
+ #endif        /* HAVE_X_WINDOWS */
+ #endif        /* HAVE_WINDOW_SYSTEM */
    return 1;
It seems that it works well.  I tried:
% emacs -fn -*-terminus-medium-r-*-*-17-*-*-*-*-*-iso8859-1
and did M-x ses-mode.  Column alignment seems to be correct

But, I really don't know if it's ok to call
recompute_basic_faces recursively.  Could you also test and
verify it?

Kenichi Handa

reply via email to

[Prev in Thread] Current Thread [Next in Thread]