bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early


From: Eli Zaretskii
Subject: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early
Date: Wed, 15 Jun 2016 17:55:52 +0300

> From: Paul Moore <p.f.moore@gmail.com>
> Date: Wed, 15 Jun 2016 12:11:45 +0100
> Cc: 23689@debbugs.gnu.org
> 
> (create-fontset-from-fontset-spec
> "-*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-xxx")
> (set-fontset-font "fontset-xxx" nil "Source Code Pro-14")
> (set-fontset-font "fontset-xxx" nil "DejaVu Sans Mono-14" nil 'append)
> (set-fontset-font "fontset-xxx" nil "Consolas-14" nil 'append)
> (set-fontset-font "fontset-xxx" nil "Courier New-14" nil 'append)
> (setq default-frame-alist '((font . "fontset-xxx") (vertical-scroll-bars)))
> 
> If I then create a new frame, I get the error "Font 'fontset-xxx' is
> not defined".

You cannot define a fontset using the name of a font that doesn't exist
on the system.  The doc string of create-fontset-from-fontset-spec
hints on this:

  When a frame uses the fontset as the ‘font’ parameter, the frame’s
  default font name is derived from FONTSET-NAME by substituting
  "iso8859-1" for the tail part "fontset-XXX".

Since there's no fixed-medium font on Windows, Emacs barfs because the
default font of the frame doesn't exist.

You need instead to start with a name of a font that surely exists on
Windows, like "-*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-xxx".
Then the above will work as expected.

On Unix, you should probably start with fixed-medium, as you did.  If
you want to do that in platform-independent way, you could look up
"fontset-standard" in the list returned by fontset-list, and chop off
the "fontset-standard" part.

Hmm... which could mean it might be easier for you to just modify the
standard fontset, by adding your fonts as covering the full range of
the characters each one supports.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]