unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Font in mode line
@ 2013-11-24 16:15 Francesco Mazzoli
  2013-11-24 16:57 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Francesco Mazzoli @ 2013-11-24 16:15 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I'm trying to set "8x13" (one of the fonts shipped with X) to be the font in 
my mode line.

If I start emacs using `emacs -Q', and then execute

    (set-face-attribute 'mode-line nil :font "8x13")

The font is rendered wrongly: <http://i.imgur.com/QUHaWnj.png>.  Note that 
the buffer id appears differently because it follows the `mode-line-buffer-
id' face, if I set that to use 8x13 too that is rendered wrongly as well.

Weirdly, if I set "8x13" to be the default font, it renders fine (both in the 
buffer and in the mode line): <http://i.imgur.com/o9QcxLr.png>.

Am I doing something wrong?  I'm running `GNU Emacs 24.3.1 (x86_64-pc-linux-
gnu, GTK+ Version 3.8.4) of 2013-09-27 on trouble, modified by Debian' 
(`emacs24' on Debian testing).

Francesco




^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Font in mode line
@ 2013-11-26 21:22 Francesco Mazzoli
  2013-11-27  3:45 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Francesco Mazzoli @ 2013-11-26 21:22 UTC (permalink / raw)
  To: eliz, help-gnu-emacs

> > I'm not sure how to use `format-mode-line' the way you described.
>
> Like this:
>
>   C-x b *scratch* RET
>   M-x font-lock-mode RET
>   Now type this:
>
>    (insert (format-mode-line mode-line-format))
>
>   and press C-j at the rightmost closing parenthesis.
>
> > If I format `mode- line-format' there doesn't seem to be an obvious
> > way to infer the faces that are used to render the various elements.
>
> Go to one of the problematic characters and type "C-u C-x =".  Emacs
> will then show the font it used to display that character.

Thanks, the part I was missing is `insert'.

However, this doen't seem to work.  Whatever my mode line looks like,
the inserted text always look plain (font lock is on).  For example if I set

    (set-face-attribute 'mode-line-buffer-id nil :font "8x13" :foreground nil)

The buffer id in the mode line displays red, but when I execute

    (insert (format-mode-line mode-line-format))

In *scratch* I get the contents of the mode line rendered with normal
font.

Francesco



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-12-03 20:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-24 16:15 Font in mode line Francesco Mazzoli
2013-11-24 16:57 ` Eli Zaretskii
2013-11-26 17:26   ` Francesco Mazzoli
2013-11-26 18:11     ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2013-11-26 21:22 Francesco Mazzoli
2013-11-27  3:45 ` Eli Zaretskii
2013-11-27 18:47   ` Francesco Mazzoli
2013-11-27 23:10     ` Peter Dyballa
2013-11-28  0:30       ` Francesco Mazzoli
     [not found]       ` <mailman.7301.1385598665.10748.help-gnu-emacs@gnu.org>
2013-12-03 14:32         ` Jason Rumney
2013-12-03 20:48           ` Francesco Mazzoli

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