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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Fabrice Popineau <[hidden email]>
> 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?



Reply | Threaded
Open this post in threaded view
|

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

Fabrice Popineau-3


Le dim. 26 juil. 2020 à 17:31, Eli Zaretskii <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Fabrice Popineau <[hidden email]>
> Date: Sun, 26 Jul 2020 19:58:00 +0200
> Cc: [hidden email]
>
>  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.



Reply | Threaded
Open this post in threaded view
|

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

Fabrice Popineau-3

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:
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 <[hidden email]> a écrit :
> From: Fabrice Popineau <[hidden email]>
> Date: Sun, 26 Jul 2020 19:58:00 +0200
> Cc: [hidden email]
>
>  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.