GNU bug report logs -
#1785
Font scaling does not work for the default font in some cases
Previous Next
Reported by: "Juanma Barranquero" <lekktu <at> gmail.com>
Date: Fri, 12 Dec 2008 11:00:02 UTC
Severity: normal
Found in version 23.0.60
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1785 in the body.
You can then email your comments to 1785 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, handa <at> m17n.org, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1547
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Juanma Barranquero" <lekktu <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
handa <at> m17n.org, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Package: emacs
Version: 23.0.60
X-Debbugs-CC: handa <at> m17n.org
[Just a reminder, so the issue is not lost]
Font rescaling is unimplemented in the new font backend.
It was already discussed on the list:
http://lists.gnu.org/archive/html/emacs-devel/2008-06/msg01155.html
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1547
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Kenichi Handa <handa <at> m17n.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
In article <f7ccd24b0812120253m5f1b4f9en3a23f0ccc26b6b2d <at> mail.gmail.com>, "Juanma Barranquero" <lekktu <at> gmail.com> writes:
> [Just a reminder, so the issue is not lost]
> Font rescaling is unimplemented in the new font backend.
Thank you for the reminder. I've just installed a fix.
---
Kenichi Handa
handa <at> m17n.org
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1547
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Kenichi Handa <handa <at> m17n.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1547
; Package
emacs
.
(Wed, 17 Dec 2008 06:25:41 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kenichi Handa <handa <at> m17n.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 17 Dec 2008 06:25:42 GMT)
Full text and
rfc822 format available.
Message #20 received at 1547 <at> emacsbugs.donarmstrong.com (full text, mbox):
In article <f7ccd24b0812140500t21cce387p3b267d4ccf08443d <at> mail.gmail.com>, "Juanma Barranquero" <lekktu <at> gmail.com> writes:
> On Sat, Dec 13, 2008 at 04:30, Kenichi Handa <handa <at> m17n.org> wrote:
> > Thank you for the reminder. I've just installed a fix.
> Font rescaling is a bit weird, though.
> Using a test file with just two lines:
> aeiou
> áéíóú
> and running emacs with this:
> emacs -q --eval "(add-to-list 'face-font-rescale-alist '(\"Courier
> New\" . 1.5))" test.txt
> the fonts used for the two lines are, respectively:
> uniscribe:-outline-Courier
> New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1
> uniscribe:-outline-Courier
> New-normal-normal-normal-mono-19-*-*-*-c-*-iso10646-1
> so the fist line appears normal, while the second one is rescaled.
When Emacs creates the initial frame and selects the default
font, "(add-to-list ...)" is not yet evaluated, so if your
default fonts is 'Courier New', it is opened without
scaling.
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.
---
Kenichi Handa
handa <at> m17n.org
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1547
; Package
emacs
.
(Wed, 17 Dec 2008 06:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Juanma Barranquero" <lekktu <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 17 Dec 2008 06:35:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 1547 <at> emacsbugs.donarmstrong.com (full text, mbox):
On Sat, Dec 13, 2008 at 04:30, Kenichi Handa <handa <at> m17n.org> wrote:
> Thank you for the reminder. I've just installed a fix.
Font rescaling is a bit weird, though.
Using a test file with just two lines:
aeiou
áéíóú
and running emacs with this:
emacs -q --eval "(add-to-list 'face-font-rescale-alist '(\"Courier
New\" . 1.5))" test.txt
the fonts used for the two lines are, respectively:
uniscribe:-outline-Courier
New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1
uniscribe:-outline-Courier
New-normal-normal-normal-mono-19-*-*-*-c-*-iso10646-1
so the fist line appears normal, while the second one is rescaled.
bug 1547 cloned as bug 1785.
Request was from
"Juanma Barranquero" <lekktu <at> gmail.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Sun, 04 Jan 2009 19:55:03 GMT)
Full text and
rfc822 format available.
Changed bug title to `Font scaling does not work for the default font in some cases' from `face-font-rescale-alist has no effect'.
Request was from
"Juanma Barranquero" <lekktu <at> gmail.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Sun, 04 Jan 2009 19:55:04 GMT)
Full text and
rfc822 format available.
Severity set to `serious' from `normal'
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Fri, 27 Mar 2009 03:05:09 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1785
; Package
emacs
.
(Fri, 17 Apr 2009 04:30:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 17 Apr 2009 04:30:03 GMT)
Full text and
rfc822 format available.
Message #36 received at 1785 <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1785
; Package
emacs
.
(Sat, 18 Apr 2009 04:15:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sat, 18 Apr 2009 04:15:03 GMT)
Full text and
rfc822 format available.
Message #41 received at 1785 <at> emacsbugs.donarmstrong.com (full text, mbox):
> > 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
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1785
; Package
emacs
.
(Sat, 18 Apr 2009 18:20:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sat, 18 Apr 2009 18:20:04 GMT)
Full text and
rfc822 format available.
Message #46 received at 1785 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> > 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.
Can't we fix it right and make clear-face-cache refresh the default face
as well? If the right fix is really too much trouble, then I guess your
workaround is OK, but then it needs to come with a heavy dose of
comments explaining why it's there and how to get rid of it.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1785
; Package
emacs
.
(Wed, 22 Apr 2009 14:10:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 22 Apr 2009 14:10:04 GMT)
Full text and
rfc822 format available.
Message #51 received at 1785 <at> emacsbugs.donarmstrong.com (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> 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.
>
> Can't we fix it right and make clear-face-cache refresh the default face
> as well? If the right fix is really too much trouble, then I guess your
> workaround is OK, but then it needs to come with a heavy dose of
> comments explaining why it's there and how to get rid of it.
I think the right fix is to refresh all font objects that have already
been created. However, there's currently no way to find them. At
startup, however, I think only the default face has a font object
assigned to it---that's why I suggested this hack.
Yeah, it's a pretty awful hack, but I don't see a better short-term
solution.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1785
; Package
emacs
.
(Sat, 25 Apr 2009 14:35:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sat, 25 Apr 2009 14:35:05 GMT)
Full text and
rfc822 format available.
Message #56 received at 1785 <at> emacsbugs.donarmstrong.com (full text, mbox):
I have checked in the work-around for this bug. A more comprehenssive
fix can wait till after the release. In the meantime, I'll downgrade
the bug severity to normal.
Severity set to `normal' from `serious'
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Sat, 25 Apr 2009 14:35:06 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1785
; Package
emacs
.
(Thu, 07 Jan 2016 04:15:03 GMT)
Full text and
rfc822 format available.
Message #61 received at 1785 <at> debbugs.gnu.org (full text, mbox):
"Juanma Barranquero" <lekktu <at> gmail.com> writes:
> Package: emacs
> Version: 23.0.60
> X-Debbugs-CC: handa <at> m17n.org
>
> [Just a reminder, so the issue is not lost]
>
> Font rescaling is unimplemented in the new font backend.
>
> It was already discussed on the list:
>
> http://lists.gnu.org/archive/html/emacs-devel/2008-06/msg01155.html
I'm looking at this for Emacs 25, just to see if it can reproduce. I
believe this is still the case. Here's how I attempted to reproduce it
(keep in mind I don't have any particular knowledge of this
functionality).
1) Start emacs with "emacs -Q" in a window (X-windows, or other system
capable of handling different fonts)
2) Eval, in the scratch buffer, (add-to-list 'face-font-rescale-alist
(cons (font-at 1) 4.0)).
From the variable docs, I would expect the text to get 4 times bigger
after changing the variable, but instead nothing happens.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1785
; Package
emacs
.
(Sat, 09 Jul 2016 19:41:02 GMT)
Full text and
rfc822 format available.
Message #64 received at 1785 <at> debbugs.gnu.org (full text, mbox):
Andrew Hyatt <ahyatt <at> gmail.com> writes:
> I'm looking at this for Emacs 25, just to see if it can reproduce. I
> believe this is still the case. Here's how I attempted to reproduce it
> (keep in mind I don't have any particular knowledge of this
> functionality).
>
> 1) Start emacs with "emacs -Q" in a window (X-windows, or other system
> capable of handling different fonts)
> 2) Eval, in the scratch buffer, (add-to-list 'face-font-rescale-alist
> (cons (font-at 1) 4.0)).
I think that's not right format for face-font-rescale-alist, the car
should be a string, not a font object. Doing
(add-to-list 'face-font-rescale-alist '(".*" . 4.0))
and tnen opening a new frame gives enlarged text in the new frame, and
causes only buffer name in the modeline the original frame to be
enlarged. Also it looks like the buffer name in the modeline of the new
frame is enlarged twice. So it mostly works, but there is some
difficulty with the existing faces used in the current frame.
Doing
emacs -Q --eval "(add-to-list 'face-font-rescale-alist '(\".*\" . 4.0))"
does give enlarged text in the initial frame.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1785
; Package
emacs
.
(Thu, 14 Jul 2016 04:05:02 GMT)
Full text and
rfc822 format available.
Message #67 received at 1785 <at> debbugs.gnu.org (full text, mbox):
npostavs <at> users.sourceforge.net writes:
> Andrew Hyatt <ahyatt <at> gmail.com> writes:
>> I'm looking at this for Emacs 25, just to see if it can reproduce. I
>> believe this is still the case. Here's how I attempted to reproduce it
>> (keep in mind I don't have any particular knowledge of this
>> functionality).
>>
>> 1) Start emacs with "emacs -Q" in a window (X-windows, or other system
>> capable of handling different fonts)
>> 2) Eval, in the scratch buffer, (add-to-list 'face-font-rescale-alist
>> (cons (font-at 1) 4.0)).
>
> I think that's not right format for face-font-rescale-alist, the car
> should be a string, not a font object. Doing
>
> (add-to-list 'face-font-rescale-alist '(".*" . 4.0))
>
> and tnen opening a new frame gives enlarged text in the new frame, and
> causes only buffer name in the modeline the original frame to be
> enlarged. Also it looks like the buffer name in the modeline of the new
> frame is enlarged twice. So it mostly works, but there is some
> difficulty with the existing faces used in the current frame.
>
> Doing
>
> emacs -Q --eval "(add-to-list 'face-font-rescale-alist '(\".*\" . 4.0))"
>
> does give enlarged text in the initial frame.
Thanks for the information. I tried this out on a Mac and found that,
with your corrected expression, I was able to see roughly what you see,
with the exception that some faces were not rescaled for some reason,
except when I started it with the rescale list eval'd at emacs start
time.
So, as you note, there are still some bugs here, enough (IMHO) to leave
this open and at the same priority.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1785
; Package
emacs
.
(Thu, 14 Jul 2016 15:10:02 GMT)
Full text and
rfc822 format available.
Message #70 received at 1785 <at> debbugs.gnu.org (full text, mbox):
> From: Andrew Hyatt <ahyatt <at> gmail.com>
> Date: Thu, 14 Jul 2016 00:04:16 -0400
> Cc: Juanma Barranquero <lekktu <at> gmail.com>, 1547 <at> debbugs.gnu.org,
> 1785 <at> debbugs.gnu.org
>
> > emacs -Q --eval "(add-to-list 'face-font-rescale-alist '(\".*\" . 4.0))"
> >
> > does give enlarged text in the initial frame.
>
> Thanks for the information. I tried this out on a Mac and found that,
> with your corrected expression, I was able to see roughly what you see,
> with the exception that some faces were not rescaled for some reason,
> except when I started it with the rescale list eval'd at emacs start
> time.
>
> So, as you note, there are still some bugs here, enough (IMHO) to leave
> this open and at the same priority.
Actually, I'd think the priority should be lowered, as rescaling all
the fonts makes little sense to me. FWIW.
Of course, if someone wants to work on this, I will gladly help by
whatever advice I can give.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1785
; Package
emacs
.
(Thu, 31 Oct 2019 17:59:02 GMT)
Full text and
rfc822 format available.
Message #73 received at 1785 <at> debbugs.gnu.org (full text, mbox):
Kenichi Handa <handa <at> m17n.org> writes:
> In article
> <f7ccd24b0812120253m5f1b4f9en3a23f0ccc26b6b2d <at> mail.gmail.com>, "Juanma
> Barranquero" <lekktu <at> gmail.com> writes:
>
>> [Just a reminder, so the issue is not lost]
>
>> Font rescaling is unimplemented in the new font backend.
>
> Thank you for the reminder. I've just installed a fix.
This was ten years ago, and as far as I can tell, font scaling works
just fine these days. So I'm closing this bug report. Please reopen if
there are any further issues that haven't been addressed in the meantime.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
1785 <at> debbugs.gnu.org and "Juanma Barranquero" <lekktu <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 31 Oct 2019 17:59:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 29 Nov 2019 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 24 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.