all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is this "save practice" (setting default font scale)?
@ 2020-11-20 14:51 Arthur Miller
  2020-11-20 15:06 ` Daniele Nicolodi
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Arthur Miller @ 2020-11-20 14:51 UTC (permalink / raw)
  To: emacs-devel

For few years now I have been using this to set default font height
in my .emacs, as told by Mr. Eliz some few years ago in some social
media thread:

(add-hook 'after-make-frame-functions
            (lambda (frame) 
              (set-face-attribute 'default nil :height 160)))

This also seem to be THE way to customize fonts as found on numerous
SX/Reddit/blogs/etc discussions. So far so good.

I have refactored my init file and trying to push some things to
early-init to save some load time. What I have found is that above
little code adds ~200 ms to the init time; take or give.

Maybe it shouldn't but I have profiled several times and it always add
to startup time.

Furthre investigation discovered a giant list of faces in Emacs:
face-new-frame-alist. Setting corresponding value in face vector for
'default seems to achieve exactly same, but without measurable
difference at startup:

(aset (cdr (assoc 'default face-new-frame-defaults)) 4 160)

So my question is, is this safe to do, any pitfals I am not aware of
(more then me poking into internals which may change in future)?




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-11-21 17:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-20 14:51 Is this "save practice" (setting default font scale)? Arthur Miller
2020-11-20 15:06 ` Daniele Nicolodi
2020-11-20 15:26   ` Arthur Miller
2020-11-20 15:14 ` Eli Zaretskii
2020-11-20 15:37   ` Arthur Miller
2020-11-20 20:05     ` Eli Zaretskii
2020-11-21  6:33       ` Arthur Miller
2020-11-20 22:47     ` chad
2020-11-21  6:43       ` Arthur Miller
2020-11-21  7:18         ` Manuel Uberti
2020-11-21 13:45           ` Arthur Miller
2020-11-21 16:04             ` Eli Zaretskii
2020-11-21 17:05               ` arthur miller
2020-11-20 15:52 ` Stefan Monnier
2020-11-21  6:12   ` Arthur Miller

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.