From: Chong Yidong <cyd@stupidchicken.com>
To: Kenichi Handa <handa@m17n.org>
Cc: 1785@emacsbugs.donarmstrong.com
Subject: bug#1785: bug#1547: face-font-rescale-alist has no effect
Date: Sat, 18 Apr 2009 00:11:20 -0400 [thread overview]
Message-ID: <87bpquiot3.fsf@cyd.mit.edu> (raw)
> > What I currently don't understand is that the font rescaling doesn't
> > work for the default font in the above case even after
> > (clear-face-cache t). I'm now investigating the reason.
>
> I think the problem here is that the opened font objects are already
> stored in the LFACE_FONT entry of the default face. Note that
>
> M-: (set-face-attribute 'default nil :font (font-spec)) RET
>
> successfully refreshes the face with the correct rescaling.
Until a better solution comes along, I propose dealing with this
situation with the following hack in startup.el: check to see if the
init file changed face-font-rescale-alist, and reload the default face
if necessary.
What do you think?
*** trunk/lisp/startup.el.~1.527.~ 2009-02-20 10:20:55.000000000 -0500
--- trunk/lisp/startup.el 2009-04-18 00:07:05.000000000 -0400
***************
*** 499,505 ****
(delete (concat "PWD=" pwd)
process-environment)))))
(setq default-directory (abbreviate-file-name default-directory))
! (let ((menubar-bindings-done nil))
(unwind-protect
(command-line)
;; Do this again, in case .emacs defined more abbreviations.
--- 499,506 ----
(delete (concat "PWD=" pwd)
process-environment)))))
(setq default-directory (abbreviate-file-name default-directory))
! (let ((menubar-bindings-done nil)
! (old-face-font-rescale-alist face-font-rescale-alist))
(unwind-protect
(command-line)
;; Do this again, in case .emacs defined more abbreviations.
***************
*** 540,545 ****
--- 541,551 ----
(not (and initial-window-system
(not noninteractive)
(not (eq initial-window-system 'pc)))))
+ ;; If face-font-rescale-alist has changed, reload the
+ ;; default font.
+ (unless (eq face-font-rescale-alist
+ old-face-font-rescale-alist)
+ (set-face-attribute 'default nil :font (font-spec)))
;; Modify the initial frame based on what .emacs puts into
;; ...-frame-alist.
(if (fboundp 'frame-notice-user-settings)
Diff finished. Sat Apr 18 00:07:09 2009
next reply other threads:[~2009-04-18 4:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-18 4:11 Chong Yidong [this message]
2009-04-18 18:14 ` bug#1785: bug#1547: face-font-rescale-alist has no effect Stefan Monnier
2009-04-22 14:04 ` Chong Yidong
-- strict thread matches above, loose matches on Subject: below --
2009-04-25 14:26 Chong Yidong
2009-04-17 4:23 Chong Yidong
2008-12-12 10:53 Juanma Barranquero
2008-12-13 3:30 ` Kenichi Handa
2019-10-31 17:58 ` bug#1785: " Lars Ingebrigtsen
2016-01-07 4:14 ` Andrew Hyatt
2016-07-09 19:40 ` npostavs
2016-07-14 4:04 ` Andrew Hyatt
2016-07-14 15:08 ` Eli Zaretskii
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=87bpquiot3.fsf@cyd.mit.edu \
--to=cyd@stupidchicken.com \
--cc=1785@emacsbugs.donarmstrong.com \
--cc=handa@m17n.org \
/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).