GNU bug report logs - #42539
28.0.50 font face in mode line problem ?

Previous Next

Package: emacs;

Reported by: Fabrice Popineau <fabrice.popineau <at> gmail.com>

Date: Sat, 25 Jul 2020 19:22:01 UTC

Severity: normal

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42539 in the body.
You can then email your comments to 42539 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#42539; Package emacs. (Sat, 25 Jul 2020 19:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Fabrice Popineau <fabrice.popineau <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 25 Jul 2020 19:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50 font face in mode line problem ?
Date: Sat, 25 Jul 2020 21:21:36 +0200
[Message part 1 (text/plain, inline)]
Hi,

I was trying elegant-emacs from:
https://github.com/rougier/elegant-emacs
and I hit a problem with displaying the ☰ character in the mode line.
With elegant-emacs, it is simply replaced with its code (2630 hex)
The code involved is:

><------------------------------------------------------------------------------------><
(set-face-font 'default "Roboto Mono Light 14")

(set-fontset-font "fontset-default"  '(#x2600 . #x26ff) "Fira Code 16")

(defun mode-line-render (left right)
  (let* ((available-width (- (window-width) (length left) )))
    (format (format "%%s %%%ds" available-width) left right)))

(setq-default mode-line-format
     '((:eval
        (mode-line-render
(format-mode-line
 (list
  (propertize "☰" 'face `(:inherit mode-line-buffer-id)
                       'help-echo "Mode(s) menu"
                       'mouse-face 'mode-line-highlight
                       'local-map   mode-line-major-mode-keymap)
           " %b "
           (if (and buffer-file-name (buffer-modified-p))
               (propertize "(modified)" 'face `(:inherit face-faded)))))
(format-mode-line
          (propertize "%4l:%2c  " 'face `(:inherit face-faded)))))))
><------------------------------------------------------------------------------------><
When evalutating this code from `emacs -Q', the intended character is never
displayed (I assume that it is because it is not looked in the Fira Code
font)

So I tried the following with `emacs -Q' :

(set-face-font 'default "Roboto Mono Light 14")
(set-fontset-font "fontset-default"  '(#x2600 . #x26ff) "Fira Code 16")
(setq-default mode-line-format '("☰ %b"))

and the ☰ is displayed in the mode line, but not in the mode line of a
second window if I split the window in 2 windows.

Any help welcome here.

Best regards,

Fabrice



In GNU Emacs 28.0.50 (build 3, x86_64-w64-mingw32)
 of 2020-07-25 built on CIBOLA
Repository revision: ea3e1ed03719bf31bd72edfdc66c5c10e6634202
Repository branch: windows
Windowing system distributor 'Microsoft Corp.', version 10.0.19042
System Description: Microsoft Windows 10 Education (v10.0.2009.19042.421)

Configured using:
 'configure --prefix=/c/Local/Emacs --without-imagemagick'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY W32NOTIFY ACL GNUTLS
LIBXML2 HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER
LCMS2

Important settings:
  value of $LANG: fr_FR.UTF-8
  locale-coding-system: cp1252

Major mode: ELisp/d

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads w32notify dbusbind w32 lcms2 multi-tty
make-network-process emacs)

Memory information:
((conses 16 242474 25276)
 (symbols 48 6473 1)
 (strings 32 17250 1474)
 (string-bytes 1 526893)
 (vectors 16 34742)
 (vector-slots 8 635323 22588)
 (floats 8 27 293)
 (intervals 56 350 15)
 (buffers 992 13))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42539; Package emacs. (Sun, 26 Jul 2020 15:32:02 GMT) Full text and rfc822 format available.

Message #8 received at 42539 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Fabrice Popineau <fabrice.popineau <at> gmail.com>
Cc: 42539 <at> debbugs.gnu.org
Subject: Re: bug#42539: 28.0.50 font face in mode line problem ?
Date: Sun, 26 Jul 2020 18:31:03 +0300
> From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
> Date: Sat, 25 Jul 2020 21:21:36 +0200
> 
> ><------------------------------------------------------------------------------------><
> (set-face-font 'default "Roboto Mono Light 14")
> 
> (set-fontset-font "fontset-default"  '(#x2600 . #x26ff) "Fira Code 16")
> 
> (defun mode-line-render (left right)
>   (let* ((available-width (- (window-width) (length left) )))
>     (format (format "%%s %%%ds" available-width) left right)))
> 
> (setq-default mode-line-format
>      '((:eval
>         (mode-line-render
> (format-mode-line
>  (list
>   (propertize "☰" 'face `(:inherit mode-line-buffer-id)
>                        'help-echo "Mode(s) menu"
>                        'mouse-face 'mode-line-highlight
>                        'local-map   mode-line-major-mode-keymap)
>            " %b "
>            (if (and buffer-file-name (buffer-modified-p))
>                (propertize "(modified)" 'face `(:inherit face-faded)))))
> (format-mode-line
>           (propertize "%4l:%2c  " 'face `(:inherit face-faded)))))))
> ><------------------------------------------------------------------------------------><
> When evalutating this code from `emacs -Q', the intended character is never displayed (I assume that it is
> because it is not looked in the Fira Code font)

Does it help to give the nil value to use-default-font-for-symbols?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42539; Package emacs. (Sun, 26 Jul 2020 17:59:02 GMT) Full text and rfc822 format available.

Message #11 received at 42539 <at> debbugs.gnu.org (full text, mbox):

From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 42539 <at> debbugs.gnu.org
Subject: Re: bug#42539: 28.0.50 font face in mode line problem ?
Date: Sun, 26 Jul 2020 19:58:00 +0200
[Message part 1 (text/plain, inline)]
Le dim. 26 juil. 2020 à 17:31, Eli Zaretskii <eliz <at> gnu.org> a écrit :

>
> Does it help to give the nil value to use-default-font-for-symbols?
>

Hi Eli,

Unfortunately, it does not change the behaviour.

Fabrice
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42539; Package emacs. (Sun, 26 Jul 2020 18:58:02 GMT) Full text and rfc822 format available.

Message #14 received at 42539 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Fabrice Popineau <fabrice.popineau <at> gmail.com>
Cc: 42539 <at> debbugs.gnu.org
Subject: Re: bug#42539: 28.0.50 font face in mode line problem ?
Date: Sun, 26 Jul 2020 21:57:36 +0300
> From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
> Date: Sun, 26 Jul 2020 19:58:00 +0200
> Cc: 42539 <at> debbugs.gnu.org
> 
>  Does it help to give the nil value to use-default-font-for-symbols?
> 
> Unfortunately, it does not change the behaviour. 

You mean, it doesn't cause Emacs to obey set-fontset-font setting?  If
so, I don't know what's wrong; most probably there's something in this
complicated setup you didn't show, or maybe something that you did
show has some strange effect that I cannot spot.

In general, the character you tried to display belongs to the symbol
block, and Emacs by default uses the default face's font to display
it.  Setting use-default-font-for-symbols to nil disables that, and
Emacs should obey set-fontset-font.  That's all I know.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42539; Package emacs. (Sun, 26 Jul 2020 19:36:02 GMT) Full text and rfc822 format available.

Message #17 received at 42539 <at> debbugs.gnu.org (full text, mbox):

From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 42539 <at> debbugs.gnu.org
Subject: Re: bug#42539: 28.0.50 font face in mode line problem ?
Date: Sun, 26 Jul 2020 21:34:54 +0200
[Message part 1 (text/plain, inline)]
Ok, I think I was fooled by something.

Trying to run `emacs -q -l test1.el' with test1.el:
------------------------------------------------------------
(setq use-default-font-for-symbols nil)
(set-face-font 'default "Roboto Mono Light 14")
(set-fontset-font "fontset-default"  '(#x2600 . #x26ff) "Fira Code 16")
(setq-default mode-line-format '("☰ %b"))
(split-window-vertically)
------------------------------------------------------------

I got the following screen:
[image: emacs-test1.png]
But it seems that it is not the same font that is used for both modelines.
I would have expected that it was the same.
The font used is switched if I switch windows (C-x o)
So probably I miss something here and there is no bug at all.

Fabrice



Le dim. 26 juil. 2020 à 20:57, Eli Zaretskii <eliz <at> gnu.org> a écrit :

> > From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
> > Date: Sun, 26 Jul 2020 19:58:00 +0200
> > Cc: 42539 <at> debbugs.gnu.org
> >
> >  Does it help to give the nil value to use-default-font-for-symbols?
> >
> > Unfortunately, it does not change the behaviour.
>
> You mean, it doesn't cause Emacs to obey set-fontset-font setting?  If
> so, I don't know what's wrong; most probably there's something in this
> complicated setup you didn't show, or maybe something that you did
> show has some strange effect that I cannot spot.
>
> In general, the character you tried to display belongs to the symbol
> block, and Emacs by default uses the default face's font to display
> it.  Setting use-default-font-for-symbols to nil disables that, and
> Emacs should obey set-fontset-font.  That's all I know.
>
[Message part 2 (text/html, inline)]
[emacs-test1.png (image/png, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42539; Package emacs. (Sun, 29 Aug 2021 22:13:01 GMT) Full text and rfc822 format available.

Message #20 received at 42539 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Fabrice Popineau <fabrice.popineau <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 42539 <at> debbugs.gnu.org
Subject: Re: bug#42539: 28.0.50 font face in mode line problem ?
Date: Mon, 30 Aug 2021 00:12:16 +0200
Fabrice Popineau <fabrice.popineau <at> gmail.com> writes:

> So probably I miss something here and there is no bug at all. 

OK; I'm closing this bug report, then.  If there's something more to be
done here, please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 42539 <at> debbugs.gnu.org and Fabrice Popineau <fabrice.popineau <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 29 Aug 2021 22:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Sep 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.