* bug#1547: face-font-rescale-alist has no effect
@ 2008-12-12 10:53 Juanma Barranquero
2008-12-13 3:30 ` Kenichi Handa
2016-01-07 4:14 ` Andrew Hyatt
0 siblings, 2 replies; 14+ messages in thread
From: Juanma Barranquero @ 2008-12-12 10:53 UTC (permalink / raw)
To: Bug-Gnu-Emacs
Package: emacs
Version: 23.0.60
X-Debbugs-CC: handa@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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1547: face-font-rescale-alist has no effect
2008-12-12 10:53 bug#1547: face-font-rescale-alist has no effect Juanma Barranquero
@ 2008-12-13 3:30 ` Kenichi Handa
2008-12-14 13:00 ` Juanma Barranquero
2019-10-31 17:58 ` bug#1785: " Lars Ingebrigtsen
2016-01-07 4:14 ` Andrew Hyatt
1 sibling, 2 replies; 14+ messages in thread
From: Kenichi Handa @ 2008-12-13 3:30 UTC (permalink / raw)
To: Juanma Barranquero, 1547; +Cc: bug-gnu-emacs, bug-submit-list
In article <f7ccd24b0812120253m5f1b4f9en3a23f0ccc26b6b2d@mail.gmail.com>, "Juanma Barranquero" <lekktu@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@m17n.org
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1547: face-font-rescale-alist has no effect
2008-12-13 3:30 ` Kenichi Handa
@ 2008-12-14 13:00 ` Juanma Barranquero
2008-12-16 11:33 ` Kenichi Handa
2019-10-31 17:58 ` bug#1785: " Lars Ingebrigtsen
1 sibling, 1 reply; 14+ messages in thread
From: Juanma Barranquero @ 2008-12-14 13:00 UTC (permalink / raw)
To: Kenichi Handa; +Cc: 1547
On Sat, Dec 13, 2008 at 04:30, Kenichi Handa <handa@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1547: face-font-rescale-alist has no effect
2008-12-14 13:00 ` Juanma Barranquero
@ 2008-12-16 11:33 ` Kenichi Handa
0 siblings, 0 replies; 14+ messages in thread
From: Kenichi Handa @ 2008-12-16 11:33 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: 1547
In article <f7ccd24b0812140500t21cce387p3b267d4ccf08443d@mail.gmail.com>, "Juanma Barranquero" <lekktu@gmail.com> writes:
> On Sat, Dec 13, 2008 at 04:30, Kenichi Handa <handa@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@m17n.org
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
2008-12-13 3:30 ` Kenichi Handa
2008-12-14 13:00 ` Juanma Barranquero
@ 2019-10-31 17:58 ` Lars Ingebrigtsen
1 sibling, 0 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-31 17:58 UTC (permalink / raw)
To: Kenichi Handa; +Cc: Juanma Barranquero, 1547, 1785
Kenichi Handa <handa@m17n.org> writes:
> In article
> <f7ccd24b0812120253m5f1b4f9en3a23f0ccc26b6b2d@mail.gmail.com>, "Juanma
> Barranquero" <lekktu@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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
2008-12-12 10:53 bug#1547: face-font-rescale-alist has no effect Juanma Barranquero
2008-12-13 3:30 ` Kenichi Handa
@ 2016-01-07 4:14 ` Andrew Hyatt
2016-07-09 19:40 ` npostavs
1 sibling, 1 reply; 14+ messages in thread
From: Andrew Hyatt @ 2016-01-07 4:14 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: 1547, 1785
"Juanma Barranquero" <lekktu@gmail.com> writes:
> Package: emacs
> Version: 23.0.60
> X-Debbugs-CC: handa@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
2016-01-07 4:14 ` Andrew Hyatt
@ 2016-07-09 19:40 ` npostavs
2016-07-14 4:04 ` Andrew Hyatt
0 siblings, 1 reply; 14+ messages in thread
From: npostavs @ 2016-07-09 19:40 UTC (permalink / raw)
To: Andrew Hyatt; +Cc: Juanma Barranquero, 1547, 1785
Andrew Hyatt <ahyatt@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
2016-07-09 19:40 ` npostavs
@ 2016-07-14 4:04 ` Andrew Hyatt
2016-07-14 15:08 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Andrew Hyatt @ 2016-07-14 4:04 UTC (permalink / raw)
To: npostavs; +Cc: Juanma Barranquero, 1547, 1785
npostavs@users.sourceforge.net writes:
> Andrew Hyatt <ahyatt@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
2016-07-14 4:04 ` Andrew Hyatt
@ 2016-07-14 15:08 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2016-07-14 15:08 UTC (permalink / raw)
To: Andrew Hyatt; +Cc: lekktu, 1547, npostavs, 1785
> From: Andrew Hyatt <ahyatt@gmail.com>
> Date: Thu, 14 Jul 2016 00:04:16 -0400
> Cc: Juanma Barranquero <lekktu@gmail.com>, 1547@debbugs.gnu.org,
> 1785@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
@ 2009-04-17 4:23 Chong Yidong
0 siblings, 0 replies; 14+ messages in thread
From: Chong Yidong @ 2009-04-17 4:23 UTC (permalink / raw)
To: Kenichi Handa; +Cc: 1785
> 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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
@ 2009-04-18 4:11 Chong Yidong
2009-04-18 18:14 ` Stefan Monnier
0 siblings, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2009-04-18 4:11 UTC (permalink / raw)
To: Kenichi Handa; +Cc: 1785
> > 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
2009-04-18 4:11 Chong Yidong
@ 2009-04-18 18:14 ` Stefan Monnier
2009-04-22 14:04 ` Chong Yidong
0 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2009-04-18 18:14 UTC (permalink / raw)
To: Chong Yidong; +Cc: 1785
>> > 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
2009-04-18 18:14 ` Stefan Monnier
@ 2009-04-22 14:04 ` Chong Yidong
0 siblings, 0 replies; 14+ messages in thread
From: Chong Yidong @ 2009-04-22 14:04 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 1785
Stefan Monnier <monnier@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#1785: bug#1547: face-font-rescale-alist has no effect
@ 2009-04-25 14:26 Chong Yidong
0 siblings, 0 replies; 14+ messages in thread
From: Chong Yidong @ 2009-04-25 14:26 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 1785
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.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2019-10-31 17:58 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-12 10:53 bug#1547: face-font-rescale-alist has no effect Juanma Barranquero
2008-12-13 3:30 ` Kenichi Handa
2008-12-14 13:00 ` Juanma Barranquero
2008-12-16 11:33 ` 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
-- strict thread matches above, loose matches on Subject: below --
2009-04-17 4:23 Chong Yidong
2009-04-18 4:11 Chong Yidong
2009-04-18 18:14 ` Stefan Monnier
2009-04-22 14:04 ` Chong Yidong
2009-04-25 14:26 Chong Yidong
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).