emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45920: closed (28.0.50; set-face-attribute cannot read :family when


From: GNU bug Tracking System
Subject: bug#45920: closed (28.0.50; set-face-attribute cannot read :family when different :weight exist)
Date: Sun, 17 Jan 2021 03:30:02 +0000

Your message dated Sun, 17 Jan 2021 05:29:20 +0200
with message-id <83o8ho8cmn.fsf@gnu.org>
and subject line Re: bug#45920: 28.0.50; set-face-attribute cannot read :family 
when different :weight exist
has caused the debbugs.gnu.org bug report #45920,
regarding 28.0.50; set-face-attribute cannot read :family when different 
:weight exist
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
45920: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45920
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 28.0.50; set-face-attribute cannot read :family when different :weight exist Date: Sat, 16 Jan 2021 22:09:54 +0200
Dear maintainers,

I have noticed that setting fonts via 'set-face-attribute' works as
intended except in the following scenario (on 'emacs -Q'):

   ;; Sample 1
   (set-face-attribute 'default nil
                       :family "Source Code Pro"
                       :weight 'light)

   ;; Sample 2
   (set-face-attribute 'default nil
                       :family "Hack"
                       :weight 'normal)

If you evaluate sample 1, you will get the desired behaviour.  Namely,
the font family for the default face is the one specified, as is the
typographic weight.

Now if you proceed to evaluate sample 2, you will notice that only the
weight gets updated.  The family continues to be that of sample 1.

At this point, to get the family of sample 2, you need to evaluate
sample 2 one more time.

I tried various combinations and my impression is that the problem
occurs when the :weight properties are different.  Other properties,
such as :height, do not exhibit this behaviour.

Can you reproduce this on your end?

All the best,
Protesilaos

-- 
Protesilaos Stavrou
protesilaos.com



--- End Message ---
--- Begin Message --- Subject: Re: bug#45920: 28.0.50; set-face-attribute cannot read :family when different :weight exist Date: Sun, 17 Jan 2021 05:29:20 +0200
> From: Protesilaos Stavrou <info@protesilaos.com>
> Cc: 45920@debbugs.gnu.org
> Date: Sat, 16 Jan 2021 23:02:24 +0200
> 
> Following your input, I tried alternating between those two and they
> both give me the right results:
> 
>    (progn
>      (internal-set-lisp-face-attribute 'default :family "Source Code Pro" 0)
>      (internal-set-lisp-face-attribute 'default :weight 'light 0))
>    
>    (progn
>      (internal-set-lisp-face-attribute 'default :weight 'normal 0)
>      (internal-set-lisp-face-attribute 'default :family "Hack" 0))
> 
> Please feel free to close this.

Done.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]