unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* The relationship of settings for font in init.el and the one shown on "Pick a font" UI.
@ 2021-01-06  8:33 Hongyi Zhao
  2021-01-06  8:34 ` Hongyi Zhao
  2021-01-06 15:27 ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Hongyi Zhao @ 2021-01-06  8:33 UTC (permalink / raw)
  To: help-gnu-emacs

On the "Pick a font" UI, I select the following font and then "Save Options":

"DejaVuSansMono Nerd Font Mono Book"

Then I noticed that emacs will generate the following settings in the init.el:

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:family "DejaVuSansMono Nerd Font Mono" :foundry
"PfEd" :slant normal :weight normal :height 143 :width normal)))))

I still can't find out the exact correspondence between the settings
for font in init.el and the one shown on "Pick a font" UI. Any hints
will be highly appreciated.

BR,
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



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

* Re: The relationship of settings for font in init.el and the one shown on "Pick a font" UI.
  2021-01-06  8:33 The relationship of settings for font in init.el and the one shown on "Pick a font" UI Hongyi Zhao
@ 2021-01-06  8:34 ` Hongyi Zhao
  2021-01-06 15:27 ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Hongyi Zhao @ 2021-01-06  8:34 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, Jan 6, 2021 at 4:33 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On the "Pick a font" UI, I select the following font and then "Save Options":
>
> "DejaVuSansMono Nerd Font Mono Book"

Additional remark: with the font size set to 14.

>
> Then I noticed that emacs will generate the following settings in the init.el:
>
> (custom-set-faces
>  ;; custom-set-faces was added by Custom.
>  ;; If you edit it by hand, you could mess it up, so be careful.
>  ;; Your init file should contain only one such instance.
>  ;; If there is more than one, they won't work right.
>  '(default ((t (:family "DejaVuSansMono Nerd Font Mono" :foundry
> "PfEd" :slant normal :weight normal :height 143 :width normal)))))
>
> I still can't find out the exact correspondence between the settings
> for font in init.el and the one shown on "Pick a font" UI. Any hints
> will be highly appreciated.
>
> BR,
> --
> Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
> Theory and Simulation of Materials
> Hebei Polytechnic University of Science and Technology engineering
> NO. 552 North Gangtie Road, Xingtai, China



-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



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

* Re: The relationship of settings for font in init.el and the one shown on "Pick a font" UI.
  2021-01-06  8:33 The relationship of settings for font in init.el and the one shown on "Pick a font" UI Hongyi Zhao
  2021-01-06  8:34 ` Hongyi Zhao
@ 2021-01-06 15:27 ` Eli Zaretskii
  2021-01-07  2:25   ` Hongyi Zhao
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-01-06 15:27 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Wed, 6 Jan 2021 16:33:13 +0800
> 
> On the "Pick a font" UI, I select the following font and then "Save Options":
> 
> "DejaVuSansMono Nerd Font Mono Book"
> 
> Then I noticed that emacs will generate the following settings in the init.el:
> 
> (custom-set-faces
>  ;; custom-set-faces was added by Custom.
>  ;; If you edit it by hand, you could mess it up, so be careful.
>  ;; Your init file should contain only one such instance.
>  ;; If there is more than one, they won't work right.
>  '(default ((t (:family "DejaVuSansMono Nerd Font Mono" :foundry
> "PfEd" :slant normal :weight normal :height 143 :width normal)))))
> 
> I still can't find out the exact correspondence between the settings
> for font in init.el and the one shown on "Pick a font" UI. Any hints
> will be highly appreciated.

Which is the problematic part?  The font name got recorded as
"family", is that the problem?  If not what is?



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

* Re: The relationship of settings for font in init.el and the one shown on "Pick a font" UI.
  2021-01-06 15:27 ` Eli Zaretskii
@ 2021-01-07  2:25   ` Hongyi Zhao
  2021-01-07  2:27     ` Hongyi Zhao
  2021-01-07 14:11     ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Hongyi Zhao @ 2021-01-07  2:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Wed, Jan 6, 2021 at 11:30 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Wed, 6 Jan 2021 16:33:13 +0800
> >
> > On the "Pick a font" UI, I select the following font and then "Save Options":
> >
> > "DejaVuSansMono Nerd Font Mono Book"
> >
> > Then I noticed that emacs will generate the following settings in the init.el:
> >
> > (custom-set-faces
> >  ;; custom-set-faces was added by Custom.
> >  ;; If you edit it by hand, you could mess it up, so be careful.
> >  ;; Your init file should contain only one such instance.
> >  ;; If there is more than one, they won't work right.
> >  '(default ((t (:family "DejaVuSansMono Nerd Font Mono" :foundry
> > "PfEd" :slant normal :weight normal :height 143 :width normal)))))
> >
> > I still can't find out the exact correspondence between the settings
> > for font in init.el and the one shown on "Pick a font" UI. Any hints
> > will be highly appreciated.
>
> Which is the problematic part?  The font name got recorded as
> "family", is that the problem?  If not what is?

I mean the following relationships:

Book -- normal
Font size 14 --  height 143

BR,
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



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

* Re: The relationship of settings for font in init.el and the one shown on "Pick a font" UI.
  2021-01-07  2:25   ` Hongyi Zhao
@ 2021-01-07  2:27     ` Hongyi Zhao
  2021-01-07 14:12       ` Eli Zaretskii
  2021-01-07 14:11     ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Hongyi Zhao @ 2021-01-07  2:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Thu, Jan 7, 2021 at 10:25 AM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Wed, Jan 6, 2021 at 11:30 PM Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > > Date: Wed, 6 Jan 2021 16:33:13 +0800
> > >
> > > On the "Pick a font" UI, I select the following font and then "Save Options":
> > >
> > > "DejaVuSansMono Nerd Font Mono Book"
> > >
> > > Then I noticed that emacs will generate the following settings in the init.el:
> > >
> > > (custom-set-faces
> > >  ;; custom-set-faces was added by Custom.
> > >  ;; If you edit it by hand, you could mess it up, so be careful.
> > >  ;; Your init file should contain only one such instance.
> > >  ;; If there is more than one, they won't work right.
> > >  '(default ((t (:family "DejaVuSansMono Nerd Font Mono" :foundry
> > > "PfEd" :slant normal :weight normal :height 143 :width normal)))))
> > >
> > > I still can't find out the exact correspondence between the settings
> > > for font in init.el and the one shown on "Pick a font" UI. Any hints
> > > will be highly appreciated.
> >
> > Which is the problematic part?  The font name got recorded as
> > "family", is that the problem?  If not what is?
>
> I mean the following relationships:
>
> Book -- normal
> Font size 14 --  height 143

As well as the following additional info which doesn't appear on the
"Pick a font" UI:

foundry
 "PfEd"

BR,
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



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

* Re: The relationship of settings for font in init.el and the one shown on "Pick a font" UI.
  2021-01-07  2:25   ` Hongyi Zhao
  2021-01-07  2:27     ` Hongyi Zhao
@ 2021-01-07 14:11     ` Eli Zaretskii
  2021-01-07 14:39       ` Hongyi Zhao
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-01-07 14:11 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Thu, 7 Jan 2021 10:25:44 +0800
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> > Which is the problematic part?  The font name got recorded as
> > "family", is that the problem?  If not what is?
> 
> I mean the following relationships:
> 
> Book -- normal

That's expected: you cannot tell Emacs to use non-normal font for the
default face's font.  Emacs needs to be able to express "bold",
"italics", and "bold-italics" faces from the default font.

> Font size 14 --  height 143

Pixels vs font units.



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

* Re: The relationship of settings for font in init.el and the one shown on "Pick a font" UI.
  2021-01-07  2:27     ` Hongyi Zhao
@ 2021-01-07 14:12       ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-01-07 14:12 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Thu, 7 Jan 2021 10:27:34 +0800
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> As well as the following additional info which doesn't appear on the
> "Pick a font" UI:
> 
> foundry
>  "PfEd"

I think Emacs just uses the first font it finds, and that is its
foundry.  You shouldn't normally care about the foundry.



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

* Re: The relationship of settings for font in init.el and the one shown on "Pick a font" UI.
  2021-01-07 14:11     ` Eli Zaretskii
@ 2021-01-07 14:39       ` Hongyi Zhao
  2021-01-07 15:04         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Hongyi Zhao @ 2021-01-07 14:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Thu, Jan 7, 2021 at 10:12 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Thu, 7 Jan 2021 10:25:44 +0800
> > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> >
> > > Which is the problematic part?  The font name got recorded as
> > > "family", is that the problem?  If not what is?
> >
> > I mean the following relationships:
> >
> > Book -- normal
>
> That's expected: you cannot tell Emacs to use non-normal font for the
> default face's font.  Emacs needs to be able to express "bold",
> "italics", and "bold-italics" faces from the default font.
>
> > Font size 14 --  height 143
>
> Pixels vs font units.

Do you mean 1Pixel = 1/10pt?

BR,
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China



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

* Re: The relationship of settings for font in init.el and the one shown on "Pick a font" UI.
  2021-01-07 14:39       ` Hongyi Zhao
@ 2021-01-07 15:04         ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-01-07 15:04 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Thu, 7 Jan 2021 22:39:10 +0800
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> > > Font size 14 --  height 143
> >
> > Pixels vs font units.
> 
> Do you mean 1Pixel = 1/10pt?

I think it's called "points" or something.  I'm not really an expert
on font design, so please forgive me that I don't remember for sure.



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

end of thread, other threads:[~2021-01-07 15:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-06  8:33 The relationship of settings for font in init.el and the one shown on "Pick a font" UI Hongyi Zhao
2021-01-06  8:34 ` Hongyi Zhao
2021-01-06 15:27 ` Eli Zaretskii
2021-01-07  2:25   ` Hongyi Zhao
2021-01-07  2:27     ` Hongyi Zhao
2021-01-07 14:12       ` Eli Zaretskii
2021-01-07 14:11     ` Eli Zaretskii
2021-01-07 14:39       ` Hongyi Zhao
2021-01-07 15:04         ` Eli Zaretskii

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).