* bug#42539: 28.0.50 font face in mode line problem ?
@ 2020-07-25 19:21 Fabrice Popineau
2020-07-26 15:31 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Popineau @ 2020-07-25 19:21 UTC (permalink / raw)
To: 42539
[-- Attachment #1: Type: text/plain, Size: 4641 bytes --]
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))
[-- Attachment #2: Type: text/html, Size: 5550 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#42539: 28.0.50 font face in mode line problem ?
2020-07-25 19:21 bug#42539: 28.0.50 font face in mode line problem ? Fabrice Popineau
@ 2020-07-26 15:31 ` Eli Zaretskii
2020-07-26 17:58 ` Fabrice Popineau
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-07-26 15:31 UTC (permalink / raw)
To: Fabrice Popineau; +Cc: 42539
> From: Fabrice Popineau <fabrice.popineau@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?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#42539: 28.0.50 font face in mode line problem ?
2020-07-26 15:31 ` Eli Zaretskii
@ 2020-07-26 17:58 ` Fabrice Popineau
2020-07-26 18:57 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Popineau @ 2020-07-26 17:58 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 42539
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
Le dim. 26 juil. 2020 à 17:31, Eli Zaretskii <eliz@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
[-- Attachment #2: Type: text/html, Size: 592 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#42539: 28.0.50 font face in mode line problem ?
2020-07-26 17:58 ` Fabrice Popineau
@ 2020-07-26 18:57 ` Eli Zaretskii
2020-07-26 19:34 ` Fabrice Popineau
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-07-26 18:57 UTC (permalink / raw)
To: Fabrice Popineau; +Cc: 42539
> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Sun, 26 Jul 2020 19:58:00 +0200
> Cc: 42539@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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#42539: 28.0.50 font face in mode line problem ?
2020-07-26 18:57 ` Eli Zaretskii
@ 2020-07-26 19:34 ` Fabrice Popineau
2021-08-29 22:12 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Popineau @ 2020-07-26 19:34 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 42539
[-- Attachment #1.1: Type: text/plain, Size: 1663 bytes --]
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@gnu.org> a écrit :
> > From: Fabrice Popineau <fabrice.popineau@gmail.com>
> > Date: Sun, 26 Jul 2020 19:58:00 +0200
> > Cc: 42539@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.
>
[-- Attachment #1.2: Type: text/html, Size: 2492 bytes --]
[-- Attachment #2: emacs-test1.png --]
[-- Type: image/png, Size: 115711 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#42539: 28.0.50 font face in mode line problem ?
2020-07-26 19:34 ` Fabrice Popineau
@ 2021-08-29 22:12 ` Lars Ingebrigtsen
0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-29 22:12 UTC (permalink / raw)
To: Fabrice Popineau; +Cc: 42539
Fabrice Popineau <fabrice.popineau@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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-29 22:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-25 19:21 bug#42539: 28.0.50 font face in mode line problem ? Fabrice Popineau
2020-07-26 15:31 ` Eli Zaretskii
2020-07-26 17:58 ` Fabrice Popineau
2020-07-26 18:57 ` Eli Zaretskii
2020-07-26 19:34 ` Fabrice Popineau
2021-08-29 22:12 ` Lars Ingebrigtsen
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).