Subject: bug#42539: 28.0.50 font face in mode line problem ?

From: Fabrice Popineau <[email-masked]>
Date: Sat, 25 Jul 2020 21:21:36 +0200

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))