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

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

Emacs-21.0.104 - invalid default font value on W32


From: Shankar Unni
Subject: Emacs-21.0.104 - invalid default font value on W32
Date: Fri, 20 Jul 2001 16:54:36 -0700

Don't know if this has already been reported or not.

(OK, OK, I'm one of those guys who went googling for the source..)

On W32, Emacs-21.0.104 built non-cygwin (configure --no-cygwin --with-gcc, using gcc 2.95.3): When starting with "emacs -q" (no site-lisp anywhere), even before it pops up the first frame, it gives the error

  No fonts match `-*-Courier New-normal-r-*-*-17-102-120-120--c-*-iso8859-1'

and croaks. (Notice the "--c-" in the middle - that should be "-c-").

I'm sorry to say that after a couple of hours of debugging, I'm stumped. It's definitely coming from a block of code in lisp/term/w32-win.el, at around line 1238, but there seem to be absolutely no font patterns of this bogus form (something--c-something) anywhere in the lisp or C source:

(if (fboundp 'new-fontset)
    (progn
      ;; Create the standard fontset.

      ;; [ STUFF ELIDED ]

      (let ((font (or (cdr (assq 'font initial-frame-alist))
                      (cdr (assq 'font default-frame-alist))
                      (x-get-resource "font" "Font")))
            xlfd-fields resolved-name)
        (if (and font
                 (not (query-fontset font))
====>>>          (setq resolved-name (x-resolve-font-name font))
                 (setq xlfd-fields (x-decompose-font-name font)))

       ;; [ MORE STUFF ELIDED ]


The "font" string passed in to x-resolve-font-name at that point is this bogus string. But I'm hanged if I can figure out where it got that value from. It's rather hard to debug lisp at that point, since the first frame hasn't even come up yet.

I managed to work around this by setting the Font in the registry. I had to do some handy hackery in the C source to even get the stack trace:

Signaling:
  signal(error ("No fonts match `-*-Courier New-normal-r-*-*-17-102-120-120--c-*
-iso8859-1'"))
  error("No fonts match `%s'" "-*-Courier New-normal-r-*-*-17-102-120-120--c-*-i
so8859-1")
  x-resolve-font-name("-*-Courier New-normal-r-*-*-17-102-120-120--c-*-iso8859-1
")
  byte-code("??!?úZ ?\"?¿? ?¿?  ??A?ª  ?
??#?¿+???\"?&??'?&?ú¼ ??&!?'??'???ñ| ??'???ú?ñ ???'BB?'?        ?'\"???'???ú?? ?
???'??AB
B???'???ú¼ ????'??AB
B?*??(??ß\"???)?ú? ???)\"?ú? ?
B?*??º" [w32-standard-fontset-spec initial-frame-alist default-frame-alist resol
ved-name xlfd-fields font fboundp new-fontset create-fontset-from-fontset-spec t
 create-fontset-from-x-resource x-get-resource "font" "Font" nil query-fontset x
-resolve-font-name x-decompose-font-name "fontset" x-complement-fontset-spec cre
ate-fontset-from-ascii-font "startup" "geometry" "Geometry" x-parse-geometry top
 left (user-position . t) (user-size . t) append height width "reverseVideo" "Re
verseVideo" string-match "^\\(true\\|yes\\|on\\)$" (reverse . t) xlfd-regexp-reg
istry-subnum res-geometry parsed case-fold-search rv] 6)
  load("term/w32-win" nil t)
  byte-code(?ú?         ?ñ? ?
!?Q??#?¿??º" [window-system noninteractive term-file-prefix load symbol-name "-w
in" nil t] 4)
  command-line()
  normal-top-level()


--
Shankar Unni            IntruVert Networks, Inc.
address@hidden   (408) 434-8311


reply via email to

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