[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Determining font weight
From: |
goncholden |
Subject: |
Re: Determining font weight |
Date: |
Tue, 08 Feb 2022 02:00:37 +0000 |
------- Original Message -------
On Tuesday, February 8th, 2022 at 1:48 AM, goncholden
<goncholden@protonmail.com> wrote:
> ------- Original Message -------
>
> On Tuesday, February 8th, 2022 at 1:26 AM, Emanuel Berg via Users list for
> the GNU Emacs text editor help-gnu-emacs@gnu.org wrote:
>
> > goncholden wrote:
> >
> > > > > Is there a way to determine the font weight resulting from
> > > > >
> > > > > the command
> > > > >
> > > > > (set-face-attribute 'default nil :height 160 :weight
> > > > >
> > > > > 'ultra-bold)
> > > >
> > > > `face-attribute' or` get-char-property' ... maybe.
> > >
> > > I am changing font-lock-comment-face to normal weight.
> > >
> > > (set-face-attribute 'font-lock-comment-face nil :weight 'normal))
> > >
> > > But want to be able to change it back again to the default
> > >
> > > setting done initially using
> > >
> > > (set-face-attribute 'default nil :height 160 :weight 'ultra-bold)
> >
> > Do it.
>
> The problem is that I would not know what weight was used in the user init
> file, so I got to capture the weight (you mentioned face-attribute). But I
> do not know hon to use to set the comment face back to the original weight.
I would use (face-attribute face :weight), however what face should I use? so
that
I con reset the weight of font-lock-comment-face?