From: Michael Heerdegen <michael_heerdegen@web.de>
To: Yuri D'Elia <wavexx@thregr.org>
Cc: emacs-devel@gnu.org
Subject: Re: Recent changes incorrectly calculate font size within daemon mode
Date: Wed, 29 Aug 2018 18:26:31 +0200 [thread overview]
Message-ID: <877ek916mg.fsf@web.de> (raw)
In-Reply-To: <87wos94ga3.fsf@wavexx.thregr.org> (Yuri D'Elia's message of "Wed, 29 Aug 2018 12:29:40 +0200")
Yuri D'Elia <wavexx@thregr.org> 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* micha@drachen 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.
next prev parent reply other threads:[~2018-08-29 16:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 10:29 Recent changes incorrectly calculate font size within daemon mode Yuri D'Elia
2018-08-29 11:05 ` Yuri D'Elia
2018-08-30 14:28 ` Paul Eggert
2018-08-30 14:59 ` Yuri D'Elia
2018-08-30 17:21 ` Paul Eggert
2018-08-30 17:43 ` Yuri D'Elia
2018-08-29 16:26 ` Michael Heerdegen [this message]
2018-08-30 14:39 ` Paul Eggert
2018-08-30 16:35 ` Michael Heerdegen
2018-08-30 17:27 ` Paul Eggert
2018-08-30 17:33 ` Michael Heerdegen
2018-08-30 19:07 ` Michael Heerdegen
2018-08-30 21:30 ` Paul Eggert
2018-08-30 21:51 ` Michael Heerdegen
2018-08-30 22:05 ` Yuri D'Elia
2018-08-31 17:31 ` Stefan Monnier
2018-08-31 19:45 ` Michael Heerdegen
2018-08-30 16:55 ` Drew Adams
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=877ek916mg.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=emacs-devel@gnu.org \
--cc=wavexx@thregr.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).