From: Kenichi Handa <handa@m17n.org>
Cc: wilde@sha-bang.de, jyavner@member.fsf.org, emacs-devel@gnu.org,
rms@gnu.org, monnier@iro.umontreal.ca
Subject: Re: Default face problem
Date: Wed, 10 May 2006 13:17:56 +0900 [thread overview]
Message-ID: <E1Fdg96-0004PL-00@etlken> (raw)
In-Reply-To: <m3r734u2s5.fsf@kfs-l.imdomain.dk> (storm@cua.dk)
In article <m3r734u2s5.fsf@kfs-l.imdomain.dk>, storm@cua.dk (Kim F. Storm) writes:
> Kenichi Handa <handa@m17n.org> 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.
Ummm.
> 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_WINDOW_SYSTEM
+ #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
now.
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
handa@m17n.org
next prev parent reply other threads:[~2006-05-10 4:17 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-20 22:35 incomplete header-line with 3d boxes and prop fonts Stefan Monnier
2006-04-24 0:25 ` Kim F. Storm
2006-04-24 6:58 ` Stefan Monnier
2006-04-24 11:51 ` Richard Stallman
2006-04-24 12:11 ` Kim F. Storm
2006-04-25 3:16 ` Jonathan Yavner
2006-04-25 22:04 ` Richard Stallman
2006-04-25 12:38 ` Sascha Wilde
2006-04-25 14:47 ` Kim F. Storm
2006-04-25 15:11 ` Sascha Wilde
2006-04-27 22:53 ` Kim F. Storm
2006-04-28 11:34 ` Default face problem [was: Re: incomplete header-line with 3d boxes and prop fonts] Kim F. Storm
2006-05-01 2:41 ` Kenichi Handa
2006-05-01 3:14 ` Default face problem Stefan Monnier
2006-05-01 4:32 ` Kenichi Handa
2006-05-01 12:34 ` Stefan Monnier
2006-05-01 12:51 ` Kenichi Handa
2006-05-01 13:58 ` Stefan Monnier
2006-05-02 0:42 ` Kenichi Handa
2006-05-01 8:25 ` Kim F. Storm
2006-05-01 12:35 ` Stefan Monnier
2006-05-01 12:49 ` Kim F. Storm
2006-05-08 5:51 ` Kenichi Handa
2006-05-08 8:47 ` Kim F. Storm
2006-05-08 11:50 ` Kenichi Handa
2006-05-08 12:19 ` Kim F. Storm
2006-05-10 4:17 ` Kenichi Handa [this message]
2006-05-10 12:21 ` Kim F. Storm
2006-05-10 12:41 ` Kenichi Handa
2006-05-10 17:45 ` Eli Zaretskii
2006-05-11 0:36 ` Kenichi Handa
2006-05-11 3:40 ` Eli Zaretskii
2006-05-11 4:35 ` Kenichi Handa
2006-05-13 13:04 ` Eli Zaretskii
2006-05-15 1:41 ` Kenichi Handa
2006-05-15 3:33 ` Eli Zaretskii
2006-05-15 4:47 ` Kenichi Handa
2006-05-10 17:45 ` Eli Zaretskii
2006-04-24 13:02 ` incomplete header-line with 3d boxes and prop fonts Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Fdg96-0004PL-00@etlken \
--to=handa@m17n.org \
--cc=emacs-devel@gnu.org \
--cc=jyavner@member.fsf.org \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
--cc=wilde@sha-bang.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).