help-gnu-emacs
[Top][All Lists]
Advanced

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

`:font' of `default' face doesn't match fontconfig settings


From: Maksym Brieiev
Subject: `:font' of `default' face doesn't match fontconfig settings
Date: Tue, 2 Mar 2021 18:20:28 +0200

According to fontconfig configuration a match for default monospace
font would be Inconsolata:

[max@arch-max ~]$ fc-match Monospace
Inconsolata-Regular.ttf: "Inconsolata" "Regular"

However, inside Emacs (27.1, started with -q or -Q) things are not consistent.

The text in '*GNU Emacs*' buffer is displayed using Inconsolata font,
as expected 
(ftcrhb:-CYRE-Inconsolata-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1)

However, '*scratch*' buffer and any other freshly created buffers
(info, help, file visiting buffers etc) display text in a different
font: 'C-u C-x =' show 'ftcrhb:-ADBO-Source Code
Pro-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1'

It seems default values for Emacs and fontconfig are different:

(font-get-system-font) => "Source Code Pro 10"

(face-attribute 'default :font) =>
#<font-object "-ADBO-Source Code
Pro-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1">

(face-attribute 'default :fontset) =>
"-ADBO-Source Code Pro-normal-normal-normal-*-13-*-*-*-m-0-fontset-startup"

Then I discovered that Source Code Pro font was installed by a
dependency of gtk3, which also installed some desktop schemas:

$ gsettings get org.gnome.desktop.interface monospace-font-name
'Source Code Pro 10'

I don't actually use gnome and I don't want to manage my system
settings through gnome settings machinery. It is just a coincidence
that part of gnome dependencies were installed by gtk3, unfortunately.

This sort of explains the problem. However, my questions are:

1. Emacs displays '*GNU Emacs*' buffer in a default font as specified
by fontconfig (Inconsolata). However, it displays every other buffer
in a font as defined by gsettings (Source Code Pro). This doesn't seem
consistent.

2. Am I right that fontconfig configuration is ignored in favor of
gsettings configuration? If so, is it possible to change what backend
emacs uses to choose fonts?

Thanks

--
Best regards,
Maksym



reply via email to

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