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

Invalid font name

373 views
Skip to first unread message

Joon Ro

unread,
Jun 14, 2013, 10:33:20 AM6/14/13
to help-gn...@gnu.org
Hi,

I am using GNU Emacs 24.3.1 (x86_64-suse-linux-gnu, GTK+ Version 3.6.4). I
have custom font Inconsolata-g in my ~/.fonts folder, and I have set it as
the Monospace font in ~/.config/fontconfig/fonts.conf.

It works well except Emacs is giving me error: Invalid font name,
-unknown-Inconsolata-g-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1 at
launch.

If I change monospace font (to a DejaVu Sans Mono, for example), then Emacs
launch without problem, but when I do M-x set-default-font, and select
-unknown-Inconsolata-g-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1, I
also get Invalid font name:
"-unknown-Inconsolata-g-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1",
even though I inputted it through auto-completion.

Best,

Joon

Peter Dyballa

unread,
Jun 14, 2013, 12:44:46 PM6/14/13
to Joon Ro, help-gn...@gnu.org

Am 14.06.2013 um 16:33 schrieb Joon Ro:

> I
> have custom font Inconsolata-g in my ~/.fonts folder, and I have set it as
> the Monospace font in ~/.config/fontconfig/fonts.conf.
>
> It works well except Emacs is giving me error: Invalid font name,
> -unknown-Inconsolata-g-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1 at
> launch.

You are mixing up font related things! The fonts.conf file is related to libfontconfig (see for example fontconfig-user.pdf or fontconfig-user.html). The font name you pass is according to the XLFD – pretty old, last millennium, needs to set up differently (with xset).

Give GNU Emacs the fontconfig font name:

emacs -fn Inconsolata-g-15

And maybe it fails again, because the "-" character is used as a separator…

--
Greetings

Pete

Be careful of reading health books, you might die of a misprint.
– Mark Twain


Joon Ro

unread,
Jun 14, 2013, 4:57:12 PM6/14/13
to help-gnu-emacs
On Fri, Jun 14, 2013 at 11:44 AM, Peter Dyballa <Peter_...@web.de>wrote:

> You are mixing up font related things! The fonts.conf file is related to
> libfontconfig (see for example fontconfig-user.pdf or
> fontconfig-user.html). The font name you pass is according to the XLFD –
> pretty old, last millennium, needs to set up differently (with xset).
>
>
Thanks for the reply. But I am not mixing up the settings - what I meant
was that in my system, Inconsolata-g is set as default Monospace font, and
when I run Emacs it raises the error. I had the following font settings in
.emacs file, ::

(set-face-attribute 'default nil :font "Monospace 10")

Of course I have tried

(set-face-attribute 'default nil :font "Inconsolata-g-10")

as well, but emacs raised the same error.


> Give GNU Emacs the fontconfig font name:
>
> emacs -fn Inconsolata-g-15
>
>
Actually this did work! Thanks. How do I put this option to .emacs?

Best,
Joon

Peter Dyballa

unread,
Jun 14, 2013, 6:10:45 PM6/14/13
to Joon Ro, help-gnu-emacs

Am 14.06.2013 um 22:57 schrieb Joon Ro:

> How do I put this option to .emacs?

Recently I recommended this:

(setq initial-frame-alist '(
(mouse-color . "midnightblue")
(foreground-color . "grey20")
(background-color . "alice blue")
(internal-border-width . 2)
(line-spacing . 1)
(active-alpha . 0.875)
(inactive-alpha . 0.75)
(font . "Courier-9")
(top . 25) (left . 650) (width . 91) (height . 50)))

(setq default-frame-alist '(
(border-color . "#4e3831")
(foreground-color . "grey10")
(background-color . "ghost white")
(vertical-scroll-bars . left)
(cursor-color . "purple")
(cursor-type . box)
(active-alpha . 0.75)
(inactive-alpha . 0.875)
(font . "Courier New-9")
(top . 50) (left . 150) (width . 89) (height . 56)))

The important lines are those with font…

--
Greetings

Pete

It isn't pollution that's harming the environment. It's the impurities in our air and water that are doing it.


Joon Ro

unread,
Jun 17, 2013, 11:30:19 AM6/17/13
to help-gnu-emacs
On Fri, Jun 14, 2013 at 5:10 PM, Peter Dyballa <Peter_...@web.de> wrote:

>
>
> Recently I recommended this:
>
> (setq initial-frame-alist '(
> (mouse-color . "midnightblue")
> (foreground-color . "grey20")
> (background-color . "alice blue")
> (internal-border-width . 2)
> (line-spacing . 1)
> (active-alpha . 0.875)
> (inactive-alpha . 0.75)
> (font . "Courier-9")
> (top . 25) (left . 650) (width . 91) (height . 50)))
>
> (setq default-frame-alist '(
> (border-color . "#4e3831")
> (foreground-color . "grey10")
> (background-color . "ghost white")
> (vertical-scroll-bars . left)
> (cursor-color . "purple")
> (cursor-type . box)
> (active-alpha . 0.75)
> (inactive-alpha . 0.875)
> (font . "Courier New-9")
> (top . 50) (left . 150) (width . 89) (height . 56)))
>
> The important lines are those with font…
>
>
This worked. Thank you very much!

Best,
Joon
0 new messages