unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: 58912@debbugs.gnu.org
Cc: luangruo@yahoo.com, eliz@gnu.org, dgutov@yandex.ru
Subject: bug#58912: 29.0.50; set-face-attribute call in init.el has no lasting effect
Date: Tue, 01 Nov 2022 19:34:40 +0200	[thread overview]
Message-ID: <868rkuk2vk.fsf@mail.linkov.net> (raw)
In-Reply-To: <87iljzh4ia.fsf@yahoo.com> (Po Lu via's message of "Tue, 01 Nov 2022 09:01:33 +0800")

I have the same problem.

GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)

$ xrdb -query
emacs.font:	DejaVu Sans Mono-12

/tmp/test.el:
(custom-set-faces
 '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight normal :height 120 :width normal)))))

emacs -Q -nbc -l /tmp/test.el
shows incorrect font

font-use-system-font
=> nil

(face-attribute 'default :font (selected-frame) 'default)
#<font-object "-PfEd-DejaVu Sans Mono-regular-normal-normal-*-13-*-*-*-m-0-ISO10646-1">

but after applying the following patch I get correct fonts:

(face-attribute 'default :font (selected-frame) 'default)
#<font-object "-PfEd-DejaVu Sans Mono-regular-normal-normal-*-16-*-*-*-m-0-iso10646-1">

diff --git a/src/xsettings.c b/src/xsettings.c
index 15e7ff54995..403117f8271 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -806,9 +806,7 @@ read_settings (Display_Info *dpyinfo, struct xsettings *settings)
 apply_xft_settings (Display_Info *dpyinfo,
                     struct xsettings *settings)
 {
-#if defined HAVE_XFT					\
-  || (defined USE_CAIRO && defined CAIRO_HAS_FC_FONT	\
-      && defined CAIRO_HAS_FT_FONT)
+#if defined HAVE_XFT
   FcPattern *pat;
   struct xsettings oldsettings;
   bool changed = false;





  parent reply	other threads:[~2022-11-01 17:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31  0:44 bug#58912: 29.0.50; set-face-attribute call in init.el has no lasting effect Dmitry Gutov
2022-10-31 13:32 ` Eli Zaretskii
2022-10-31 13:57   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-31 14:11     ` Dmitry Gutov
2022-11-01  0:32       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-01  0:56         ` Dmitry Gutov
2022-11-01  1:01           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-01  2:20             ` Matt Armstrong
2022-11-01  2:58               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-02 21:55                 ` Matt Armstrong
2022-11-03  6:23                   ` Eli Zaretskii
2022-11-03  7:17                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-03  8:38                       ` Eli Zaretskii
2022-11-03 11:09                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-05 18:50                     ` Matt Armstrong
2022-11-05 19:03                       ` Eli Zaretskii
2022-11-01 10:25             ` Dmitry Gutov
2022-11-01 10:34               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-02 21:12                 ` Matt Armstrong
2022-11-19  6:02               ` bug#58912: bug#59283: 29.0.50; `custom-set-faces' does not respect :height when set on start-up Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-19 14:10                 ` Dmitry Gutov
2022-11-20  0:34                   ` bug#59283: " Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-01 17:34             ` Juri Linkov [this message]
2022-11-02  0:54               ` bug#58912: 29.0.50; set-face-attribute call in init.el has no lasting effect Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-02 17:24                 ` Juri Linkov
2022-11-08 18:56               ` Juri Linkov

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=868rkuk2vk.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=58912@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    /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).