[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recent changes incorrectly calculate font size within daemon mode
From: |
Michael Heerdegen |
Subject: |
Re: Recent changes incorrectly calculate font size within daemon mode |
Date: |
Wed, 29 Aug 2018 18:26:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Yuri D'Elia <address@hidden> writes:
> I've updated my current emacs build to discover a new quirk:
>
> - if I start emacs normally, all is good
> - if I start it through emacsclient -c, the screen DPI is not correctly
> calculated. It looks like my fontconfig/Xres DPI settings are ignored.
Maybe something related: when I use `enlarge-font' from "frame-cmds.el",
I get the error
| Debugger entered--Lisp error: (wrong-type-argument stringp nil)
| string-to-number(nil)
| (+ (string-to-number (aref xlfd-fields xlfd-regexp-pixelsize-subnum))
increment)
| (let ((new-size (+ (string-to-number (aref xlfd-fields
xlfd-regexp-pixelsize-subnum)) increment))) (if (> new-size 0) nil (signal
'font-too-small (list new-size))) (aset xlfd-fields
xlfd-regexp-pixelsize-subnum (number-to-string new-size)))
| (let ((xlfd-fields (x-decompose-font-name fontname))) (if xlfd-fields nil
(error "Cannot decompose font name")) (let ((new-size (+ (string-to-number
(aref xlfd-fields xlfd-regexp-pixelsize-subnum)) increment))) (if (> new-size
0) nil (signal 'font-too-small (list new-size))) (aset xlfd-fields
xlfd-regexp-pixelsize-subnum (number-to-string new-size))) (aset xlfd-fields
xlfd-regexp-pointsize-subnum "*") (aset xlfd-fields xlfd-regexp-avgwidth-subnum
"*") (x-compose-font-name xlfd-fields))
| frcmds-enlarged-font-name("-PfEd-DejaVu Sans
Mono-normal-normal-normal-*-*-*-..." #<frame *scratch* address@hidden
0x8eb3510> 1)
| (setq fontname (frcmds-enlarged-font-name fontname frame increment))
| (let ((fontname (cdr (assq 'font (frame-parameters frame)))) (count
enlarge-font-tries)) (setq fontname (frcmds-enlarged-font-name fontname frame
increment)) (while (and (not (x-list-fonts fontname)) (wholenump (setq count
(1- count)))) (setq fontname (frcmds-enlarged-font-name fontname frame
increment))) (if (x-list-fonts fontname) nil (error "Cannot change font size"))
(modify-frame-parameters frame (list (cons 'font fontname))) (if (<
emacs-major-version 21) (progn (frame-update-faces frame))))
| enlarge-font(1)
The problem is that (aref xlfd-fields xlfd-regexp-pixelsize-subnum)
returns nil which I guess is not correct.
Resetting to d77d01d22902acdc45c2c7059de4f1b158ab5806 as mentioned in
Yuri's other messages fixes this problem. I'm not starting Emacs
through emacsclient, though.
HTH,
Michael.
Re: Recent changes incorrectly calculate font size within daemon mode,
Michael Heerdegen <=
- Re: Recent changes incorrectly calculate font size within daemon mode, Paul Eggert, 2018/08/30
- Re: Recent changes incorrectly calculate font size within daemon mode, Michael Heerdegen, 2018/08/30
- Re: Recent changes incorrectly calculate font size within daemon mode, Paul Eggert, 2018/08/30
- Re: Recent changes incorrectly calculate font size within daemon mode, Michael Heerdegen, 2018/08/30
- Re: Recent changes incorrectly calculate font size within daemon mode, Michael Heerdegen, 2018/08/30
- Re: Recent changes incorrectly calculate font size within daemon mode, Paul Eggert, 2018/08/30
- Re: Recent changes incorrectly calculate font size within daemon mode, Michael Heerdegen, 2018/08/30
- Re: Recent changes incorrectly calculate font size within daemon mode, Yuri D'Elia, 2018/08/30
Re: Recent changes incorrectly calculate font size within daemon mode, Stefan Monnier, 2018/08/31
Re: Recent changes incorrectly calculate font size within daemon mode, Michael Heerdegen, 2018/08/31