Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting the global default font size.

14 views
Skip to first unread message

Tim Visher

unread,
Feb 5, 2009, 10:28:30 AM2/5/09
to Emacs Help List
Hello Everyone,

I'm interested in setting the global font size but I'm not sure how to
do that. I tried messing around in Easy Customization in the Faces
section but that screwed up my default frame sizing for some reason.

Any thoughts? Also, I'm really interested in using Clear Type fonts.
Can you do this in Emacs?

--

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail


Joe Schafer

unread,
Feb 5, 2009, 4:16:57 PM2/5/09
to help-gn...@gnu.org
Tim Visher <tim.v...@gmail.com> writes:

> Hello Everyone,
>
> I'm interested in setting the global font size but I'm not sure how to
> do that. I tried messing around in Easy Customization in the Faces
> section but that screwed up my default frame sizing for some reason.
>
> Any thoughts? Also, I'm really interested in using Clear Type fonts.
> Can you do this in Emacs?

Here's what I have in my init file. This sets it for all frames.

(modify-all-frames-parameters
'((font . "-microsoft-consolas-medium-r-*-*-*-110-*-*-*-*-iso8859-1")))

Though for emacs23 you can write it as:

(modify-all-frames-parameters
'((font . "Consolas-11")))

I know emacs 23 supports font antialiasing and I think emacs on windows
uses clear type.


Nurullah Akkaya

unread,
Feb 10, 2009, 7:45:35 AM2/10/09
to Tim Visher, Emacs Help List
On Thu, Feb 5, 2009 at 5:28 PM, Tim Visher <tim.v...@gmail.com> wrote:
Hello Everyone,

I'm interested in setting the global font size but I'm not sure how to
do that.  I tried messing around in Easy Customization in the Faces
section but that screwed up my default frame sizing for some reason.

Any thoughts?  Also, I'm really interested in using Clear Type fonts.
Can you do this in Emacs?
--

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail


this what i have in my init file,

  (set-face-attribute 'default (selected-frame) :height 150 :width 'normal)

bigger height bigger font.

Geralt

unread,
Feb 10, 2009, 2:03:02 PM2/10/09
to Emacs Help List
A bit off-topic, but I think it fits still into this thread: I've
installed the inconsolata font[1] and I want to use it in my Emacs
color-theme but I don't know how to add it. Can you help me? I'm using
Emacs 22.

Thanks.


Geralt

[1]http://www.levien.com/type/myfonts/inconsolata.html


Nurullah Akkaya

unread,
Feb 10, 2009, 5:53:46 PM2/10/09
to Emacs Help List
for monaco font i use,
  (set-default-font "monaco")

on emacs 23 gtk.

Geralt

unread,
Feb 10, 2009, 7:20:41 PM2/10/09
to Nurullah Akkaya, Emacs Help List
Thanks, but it looks like I can't use that one with 22 :(


Manish Sharma

unread,
Feb 10, 2009, 11:06:59 PM2/10/09
to help-gn...@gnu.org
Geralt <usr.g...@googlemail.com> writes:

> A bit off-topic, but I think it fits still into this thread: I've
> installed the inconsolata font[1] and I want to use it in my Emacs
> color-theme but I don't know how to add it. Can you help me? I'm using
> Emacs 22.

What OS?

--
Manish

Geralt

unread,
Feb 11, 2009, 5:09:10 AM2/11/09
to Manish Sharma, help-gn...@gnu.org
I'm using Linux (Gentoo).


Peter Dyballa

unread,
Feb 11, 2009, 7:48:44 AM2/11/09
to Geralt, Emacs Help List

Am 10.02.2009 um 20:03 schrieb Geralt:

> I've installed the inconsolata font[1] and I want to use it in my
> Emacs color-theme but I don't know how to add it.


Make it known to your X11 fonts sub-system (that's what an
"installed" should express) and then set either an X resource à la:

Emacs.Font: -*-lucidatypewriter-medium-r-*-*-10-*-*-*-m-*-
iso10646-1

(you can additionally use, for example:

Emacs*menu*.font: -*-utopia-bold-r-*-*-11-*-*-*-*-*-iso10646-1
Emacs*pane.menubar.font: -*-lucida-bold-r-*-sans-10-*-*-*-*-*-
iso10646-1
Emacs.dialog*.font: -*-bitstream vera serif-bold-r-*-*-10-*-*-*-*-
*-iso10646-1)

or you put your default font choice into, for example:

(setq initial-frame-alist '(
(tool-bar-lines . 0)
(menu-bar-lines . 2)
(border-color . "gold1")
(cursor-color . "turquoise1")
(mouse-color . "purple3")
(foreground-color . "DarkCyan")
(background-color . "antiquewhite1")
(vertical-scroll-bars . right)
(internal-border-width . 5)
(top . 10) (left . 625) (width . 80) (height . 50)
;• (font . "fontset-global")
))

– and there's also default-frame-alist!

--
Greetings

Pete

Basic, n.:
A programming language. Related to certain social diseases in
that those who have it will not admit it in polite company.

Geralt

unread,
Feb 12, 2009, 11:52:42 AM2/12/09
to Peter Dyballa, Emacs Help List
Hi,

thanks for the suggestion, but it's not really working. The reason is:
I can find the inconsolata font using fc-cat or fc-list but I can't
find it in xfontsel, so I don't know the string that I should write
into my .Xresources file.
How can I find that one out?

Geralt.


Peter Dyballa

unread,
Feb 12, 2009, 1:38:54 PM2/12/09
to Geralt, Emacs Help List

Am 12.02.2009 um 17:52 schrieb Geralt:

> I can find the inconsolata font using fc-cat or fc-list but I can't
> find it in xfontsel

So you obviously need to install it on your system!

--
Greetings

Pete

Bake pizza not war!

Geralt

unread,
Feb 12, 2009, 1:49:45 PM2/12/09
to Peter Dyballa, Emacs Help List
On Thu, Feb 12, 2009 at 7:38 PM, Peter Dyballa <Peter_...@web.de> wrote:
>
> Am 12.02.2009 um 17:52 schrieb Geralt:
>
>> I can find the inconsolata font using fc-cat or fc-list but I can't
>> find it in xfontsel
>
> So you obviously need to install it on your system!
>
>

But how? I can select it for example in Opera, or in XFCE's settings dialog.

Geralt.


Peter Dyballa

unread,
Feb 12, 2009, 4:12:02 PM2/12/09
to Geralt, Emacs Help List

Am 12.02.2009 um 19:49 schrieb Geralt:

>>> I can find the inconsolata font using fc-cat or fc-list but I can't
>>> find it in xfontsel
>>
>> So you obviously need to install it on your system!
>>
>>
>
> But how? I can select it for example in Opera, or in XFCE's
> settings dialog.

The X11 server needs the files created by (sudo) mkfontscale and
(sudo) mkfontdir. X11 looks into the directories of font path (xset
q). The command 'xset fp rehash' updates server font information.
Xfontsel or xlsfonts are clients of the X11 server-side fonts sub-
system.

When you're user of the client-side fonts sub-system (fontconfig) fc-
cache, which accepts -v, is your friend. This programme follows a
setup given by configuration files like fonts.conf.

--
Greetings

Pete

If all else fails read the instructions.
- Donald Knuth

Geralt

unread,
Feb 12, 2009, 5:21:33 PM2/12/09
to Peter Dyballa, Emacs Help List
Thanks, turns out that I had to add /usr/share/fonts/inconsolata to
xorg.conf with LoadPath, now I can find the font, and I have the
following in my .Xresources:
Emacs.font: -misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1

But Emacs is still not using it, list-fontsets is still
Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
Fontset: -*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard

Do I have to do something special inside Emacs? Oh and just to be sure
that's the output of "emacs -Q", so there's no color theme that could
change it.


Geralt.


Peter Dyballa

unread,
Feb 12, 2009, 6:19:47 PM2/12/09
to Geralt, Emacs Help List

Am 12.02.2009 um 23:21 schrieb Geralt:

> I have the
> following in my .Xresources:
> Emacs.font: -misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1

You can put what you want into .Xresources – no X client ever reads
this file. Except one: xrdb. And it has the choice between
~/.Xresources and ~/.Xdefaults, by default. If xrdb's data base was
not updated, then GNU Emacs does not see any changes in the selected
base file.

--
Greetings

Pete

Atheism is a non prophet organization.


Geralt

unread,
Feb 13, 2009, 4:20:06 PM2/13/09
to Peter Dyballa, Emacs Help List
On Fri, Feb 13, 2009 at 12:19 AM, Peter Dyballa <Peter_...@web.de> wrote:
>
> Am 12.02.2009 um 23:21 schrieb Geralt:
>
>> I have the
>> following in my .Xresources:
>> Emacs.font: -misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1
>
> You can put what you want into .Xresources – no X client ever reads this
> file. Except one: xrdb. And it has the choice between ~/.Xresources and
> ~/.Xdefaults, by default. If xrdb's data base was not updated, then GNU
> Emacs does not see any changes in the selected base file.
>
The only effect this has is that list-fontsets is now one line longer:
Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
Fontset: -*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard
Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-startup

But no inconsolata there :(

Geralt.


Peter Dyballa

unread,
Feb 13, 2009, 4:53:07 PM2/13/09
to Geralt, Emacs Help List

Am 13.02.2009 um 22:20 schrieb Geralt:

>>> I have the
>>> following in my .Xresources:
>>> Emacs.font: -misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1
>>
>> You can put what you want into .Xresources – no X client ever
>> reads this
>> file. Except one: xrdb. And it has the choice between
>> ~/.Xresources and
>> ~/.Xdefaults, by default. If xrdb's data base was not updated,
>> then GNU
>> Emacs does not see any changes in the selected base file.
>>
> The only effect this has is that list-fontsets is now one line longer:
> Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
> Fontset: -*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard
> Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-startup
>
> But no inconsolata there :(


Is it somewhere documented that from setting a font X resource for
GNU Emacs you get a fontset?

--
Greetings

Pete

Government is actually the worst failure of civilized man. There has
never been a really good one, and even those that are most tolerable
are arbitrary, cruel, grasping and unintelligent.
– H. L. Mencken

Geralt

unread,
Feb 13, 2009, 5:03:28 PM2/13/09
to Peter Dyballa, Emacs Help List
On Fri, Feb 13, 2009 at 10:53 PM, Peter Dyballa <Peter_...@web.de> wrote:
>
> Am 13.02.2009 um 22:20 schrieb Geralt:
>
>>>> I have the
>>>> following in my .Xresources:
>>>> Emacs.font: -misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1
>>>
>>> You can put what you want into .Xresources – no X client ever reads this
>>> file. Except one: xrdb. And it has the choice between ~/.Xresources and
>>> ~/.Xdefaults, by default. If xrdb's data base was not updated, then GNU
>>> Emacs does not see any changes in the selected base file.
>>>
>> The only effect this has is that list-fontsets is now one line longer:
>> Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
>> Fontset: -*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard
>> Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-startup
>>
>> But no inconsolata there :(
>
>
> Is it somewhere documented that from setting a font X resource for GNU Emacs
> you get a fontset?
>
I tried now inside Emacs "(modify-all-frames-parameters '((font .
"-misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1")))", but when
evaluating this line I get the following error "Debugger entered--Lisp
error: (error "Font `-misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1'
is not defined")", so I guess there's still something I'm missing?


Geralt.


Peter Dyballa

unread,
Feb 13, 2009, 5:46:47 PM2/13/09
to Geralt, Emacs Help List

Am 13.02.2009 um 23:03 schrieb Geralt:

> I tried now inside Emacs "(modify-all-frames-parameters '((font .
> "-misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1")))", but when
> evaluating this line I get the following error "Debugger entered--Lisp
> error: (error "Font `-misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1'
> is not defined")", so I guess there's still something I'm missing?


M-x set-frame-font TAB TAB produces a large *Completions* buffer with
fonts GNU Emacs "sees." It's also possible to evaluate

(x-list-fonts "*-inconsolata-*")

in *scratch* buffer. I found a line

(font . "-adobe-courier-medium-r-*-11-*-iso10646-1")

– and it still works!

--
Greetings

Pete

"What do you think of Western Civilisation?"
"I think it would be a good idea!"
– Mohandas Karamchand Gandhi

Geralt

unread,
Feb 14, 2009, 5:28:25 AM2/14/09
to Peter Dyballa, Emacs Help List
On Fri, Feb 13, 2009 at 11:46 PM, Peter Dyballa <Peter_...@web.de> wrote:
>
> Am 13.02.2009 um 23:03 schrieb Geralt:
>
>> I tried now inside Emacs "(modify-all-frames-parameters '((font .
>> "-misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1")))", but when
>> evaluating this line I get the following error "Debugger entered--Lisp
>> error: (error "Font `-misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1'
>> is not defined")", so I guess there's still something I'm missing?
>
>
> M-x set-frame-font TAB TAB produces a large *Completions* buffer with fonts
> GNU Emacs "sees." It's also possible to evaluate
>
> (x-list-fonts "*-inconsolata-*")
>
> in *scratch* buffer. I found a line
>
> (font . "-adobe-courier-medium-r-*-11-*-iso10646-1")
>
> – and it still works!
>
Ok, I can find the font in the completion of set-frame-font and
x-list-fonts, but setting one of the inconsolata fonts with
set-frame-font results in "byte-code: Font
`-misc-inconsolata-medium-r-normal--0-0-0-0-p-0-iso10646-1' is not
defined" (displayed in the echo area/ *Messages* buffer), the same
happens with 8859-1 encoding.

Geralt.


Peter Dyballa

unread,
Feb 14, 2009, 9:24:55 AM2/14/09
to Geralt, Emacs Help List

Am 14.02.2009 um 11:28 schrieb Geralt:

Three possible options:

• RTFM
• change syntax
• use different font

The fourth option would be to think of the possible use of
proportional-spaced font of size 0.

--
Greetings

Pete <]
o __o |__ o HPV, the real
___o /I -\<, |o \ -\),-% high speed!
___/\ /\___./ \___...O/ O____.....`-O-'-()--o_________________


Geralt

unread,
Feb 14, 2009, 9:47:28 AM2/14/09
to Peter Dyballa, Emacs Help List
On Sat, Feb 14, 2009 at 3:24 PM, Peter Dyballa <Peter_...@web.de> wrote:
>
> Am 14.02.2009 um 11:28 schrieb Geralt:
>
>> On Fri, Feb 13, 2009 at 11:46 PM, Peter Dyballa wrote:
>>>
>>> Am 13.02.2009 um 23:03 schrieb Geralt:
>>>
>>>> I tried now inside Emacs "(modify-all-frames-parameters '((font .
>>>> "-misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1")))", but when
>>>> evaluating this line I get the following error "Debugger entered--Lisp
>>>> error: (error "Font `-misc-inconsolata-*-*-*-*-*-*-*-*-*-*-iso8859-1'
>>>> is not defined")", so I guess there's still something I'm missing?
>>>
>>>
>>> M-x set-frame-font TAB TAB produces a large *Completions* buffer with
>>> fonts
>>> GNU Emacs "sees." It's also possible to evaluate
>>>
>>> (x-list-fonts "*-inconsolata-*")
>>>
>>> in *scratch* buffer. I found a line
>>>
>>> (font . "-adobe-courier-medium-r-*-11-*-iso10646-1")
>>>
>>> – and it still works!
>>>
>> Ok, I can find the font in the completion of set-frame-font and
>> x-list-fonts, but setting one of the inconsolata fonts with
>> set-frame-font results in "byte-code: Font
>> `-misc-inconsolata-medium-r-normal--0-0-0-0-p-0-iso10646-1' is not
>> defined" (displayed in the echo area/ *Messages* buffer), the same
>> happens with 8859-1 encoding.
>>
>
> Three possible options:
>
> • RTFM
>
Which manual then? I don't even know if it's an X related problem or
an Emacs related problem.

> • change syntax
>
In which way? I've used the function you told me about and used the
completion Emacs suggested to me
> • use different font
>
I am not sure that this would help, because if I install another font
I'm likely to run into the very same issue again (and I know that
others are using this font, at least with 23).

> The fourth option would be to think of the possible use of
> proportional-spaced font of size 0.
>

Do you have a specific one in mind? I couldn't find a way to select a
generic one in xfontsel.

And thanks for your effort and time :-)


Geralt.


Peter Dyballa

unread,
Feb 14, 2009, 1:51:53 PM2/14/09
to Geralt, Emacs Help List

Am 14.02.2009 um 15:47 schrieb Geralt:

>> Three possible options:
>>
>> • RTFM
>>
> Which manual then?

It's obviously a problem that GNU Emacs has with the given font name,
which does not seem to have a relation to an existing one. So what
you give to GNU Emacs some correction.

>
>> • change syntax
>>
> In which way? I've used the function you told me about and used the
> completion Emacs suggested to me

Did you read my example with Adobe Courier?

--
Greetings

Pete

These are my principles and if you don't like them... well, I have
others.
- Groucho Marx

Geralt

unread,
Feb 17, 2009, 11:19:59 AM2/17/09
to Emacs Help List
Hi,

today I discovered by chance this link[1], in which stands at the top
"Font anti-aliasing using the Xft library and FreeType fonts is
currently only available for the app-editors/emacs-cvs-23.0.9999
ebuild.", considering that statement it makes sense that I can see the
Inconsolata font, but I can't set it in Emacs.

Geralt.


[1]http://www.gentoo.org/proj/en/lisp/emacs/xft.xml


0 new messages