unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Protesilaos Stavrou <info@protesilaos.com>
To: 45920@debbugs.gnu.org
Subject: bug#45920: 28.0.50; set-face-attribute cannot read :family when different :weight exist
Date: Sat, 16 Jan 2021 22:09:54 +0200	[thread overview]
Message-ID: <875z3wprsd.fsf@protesilaos.com> (raw)

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





             reply	other threads:[~2021-01-16 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-16 20:09 Protesilaos Stavrou [this message]
2021-01-16 20:25 ` bug#45920: 28.0.50; set-face-attribute cannot read :family when different :weight exist Eli Zaretskii
2021-01-16 21:02   ` Protesilaos Stavrou
2021-01-17  3:29     ` Eli Zaretskii

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=875z3wprsd.fsf@protesilaos.com \
    --to=info@protesilaos.com \
    --cc=45920@debbugs.gnu.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).