unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Cannot load font?
@ 2008-11-16  4:57 George Roman
  2008-11-16 11:04 ` Peter Dyballa
  0 siblings, 1 reply; 8+ messages in thread
From: George Roman @ 2008-11-16  4:57 UTC (permalink / raw)
  To: help-gnu-emacs

I can't get a font to load in Emacs, yet Emacs sees the font and the
font works fine with xterm.

Background: I'm running Xming on Vista and have installed the Dina PCF
fonts.  I can login to my Linux server and start xfontsel, selecting a
Dina font.  I can start an xterm and use the Dina font that I selected.

When I start Emacs (v22.1/CentOS), I see the Dina fonts listed with
(x-list-fonts "*dina*"), but when I try to use one with

  (set-face-font 'default
      "-windows-dina-medium-r-normal-*-16-100-96-96-c-80-microsoft-cp1252")

or

  (set-default-font
    "-windows-dina-medium-r-normal-*-16-100-96-96-c-80-microsoft-cp1252"
    nil)

Emacs loads

  -adobe-courier-medium-r-normal--17-120-100-100-m-100-iso8859-1

instead.

What am I doing wrong?  And why do xterm, xfontsel, and xfd all display
the Dina font just fine?





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

* Re: Cannot load font?
  2008-11-16  4:57 Cannot load font? George Roman
@ 2008-11-16 11:04 ` Peter Dyballa
  2008-11-16 20:40   ` George Roman
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2008-11-16 11:04 UTC (permalink / raw)
  To: George Roman; +Cc: help-gnu-emacs


Am 16.11.2008 um 05:57 schrieb George Roman:

> What am I doing wrong?


Choosing the wrong font? To see a list of all the fonts GNU Emacs  
sees, you can just try to create this list of completions:

	M-x set-frame-font RET TAB TAB

and save the buffer (if you try file name completion to save it you  
might substitute its contents with possible file name completions).  
Now can choose from the list an existing font that the X server  
provides.

Another option would be to use:

	(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 . "-apple-courier std-medium-r-normal--0-0-0-0-m-0-mac-roman")
	  (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 . "-*-*-medium-r-normal--10-*-*-*-*-*-fontset-osaka")
	  (top . 50) (left . 150) (width . 89) (height . 56)))


--
Greetings

   Pete

We have to expect it, otherwise we would be surprised.







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

* Re: Cannot load font?
       [not found] <mailman.503.1226823175.26697.help-gnu-emacs@gnu.org>
@ 2008-11-16 17:02 ` Marc Tfardy
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Tfardy @ 2008-11-16 17:02 UTC (permalink / raw)
  To: help-gnu-emacs

George Roman schrieb:
> I can't get a font to load in Emacs, yet Emacs sees the font and the
> font works fine with xterm.
> 
> Background: I'm running Xming on Vista and have installed the Dina PCF
> fonts.  I can login to my Linux server and start xfontsel, selecting a
> Dina font.  I can start an xterm and use the Dina font that I selected.
> 
> When I start Emacs (v22.1/CentOS), I see the Dina fonts listed with
> (x-list-fonts "*dina*"), but when I try to use one with
> 
>   (set-face-font 'default
>       "-windows-dina-medium-r-normal-*-16-100-96-96-c-80-microsoft-cp1252")
> 
> or
> 
>   (set-default-font
>     "-windows-dina-medium-r-normal-*-16-100-96-96-c-80-microsoft-cp1252"
>     nil)

I use Dina too. Try instead this:

"-raster-Dina-normal-r-normal-normal-13-97-96-96-c-*-iso8859-1"


regards
Marc



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

* RE: Cannot load font?
  2008-11-16 11:04 ` Peter Dyballa
@ 2008-11-16 20:40   ` George Roman
  2008-11-17 12:06     ` Peter Dyballa
  0 siblings, 1 reply; 8+ messages in thread
From: George Roman @ 2008-11-16 20:40 UTC (permalink / raw)
  To: Peter_Dyballa; +Cc: help-gnu-emacs

On Sunday, November 16, 2008 6:04 AM, Peter Dyballa wrote:
> > What am I doing wrong?
> 
> Choosing the wrong font? To see a list of all the fonts GNU Emacs sees,
> you can just try to create this list of completions:
> 
> 	M-x set-frame-font RET TAB TAB
> 
> and save the buffer (if you try file name completion to save it you
> might substitute its contents with possible file name completions).  Now
> can choose from the list an existing font that the X server provides.

OK, did that and I can see the Dina fonts in the output.  When I select
any one of the Dina entries, however, Emacs winds up using a different
font.

Emacs is silently ignoring the Dina fonts and picking something else
instead.  Why?





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

* Re: Cannot load font?
  2008-11-16 20:40   ` George Roman
@ 2008-11-17 12:06     ` Peter Dyballa
  2008-11-24  5:08       ` George Roman
       [not found]       ` <mailman.1084.1227504373.26697.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Dyballa @ 2008-11-17 12:06 UTC (permalink / raw)
  To: George Roman; +Cc: help-gnu-emacs


Am 16.11.2008 um 21:40 schrieb George Roman:

> Emacs is silently ignoring the Dina fonts and picking something else
> instead.  Why?


Does it also happen with the *-frame-alist's? Does it happen also  
when you copy the font names from the *Completions* buffer? If so and  
if so in an Emacs launched with -Q then it's worth a bug report (from  
Help menu).

--
Greetings

   Pete

Eat the rich – the poor are tough and stringy.







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

* RE: Cannot load font?
  2008-11-17 12:06     ` Peter Dyballa
@ 2008-11-24  5:08       ` George Roman
  2008-11-24  9:37         ` Peter Dyballa
       [not found]       ` <mailman.1084.1227504373.26697.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 8+ messages in thread
From: George Roman @ 2008-11-24  5:08 UTC (permalink / raw)
  To: Peter_Dyballa; +Cc: help-gnu-emacs

On Monday, November 17, 2008 7:06 AM, Peter Dyballa wrote:
> > Emacs is silently ignoring the Dina fonts and picking something else
> > instead.  Why?
>
> Does it also happen with the *-frame-alist's? Does it happen also when
> you copy the font names from the *Completions* buffer? If so and if so
> in an Emacs launched with -Q then it's worth a bug report (from Help
> menu).

Here's the output from a *scratch* buffer in a session launched with -Q


(cdr (assoc 'font (frame-parameters)))
"-Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO8859-1"


(x-list-fonts "*dina-medium-r-*-100-*")
("-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252")


(set-default-font
 "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252" nil)
nil
;; My screen resets (font changes, but it's not Dina)


(cdr (assoc 'font (frame-parameters)))
"-Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1"


(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 . "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252")
        (top . 25) (left . 650) (width . 91) (height . 50)))
((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
. "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252") (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 . "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252")
        (top . 50) (left . 150) (width . 89) (height . 56)))
((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 .
"-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252") (top . 50) (left . 150) (width
. 89) ...)


(cdr (assoc 'font (frame-parameters)))
"-Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1"


;; Trying to open a new window via "C-x 5 b" yields a window with the
;; above Adobe font (...--17-120-100-...)


(set-default-font
 "-dec-terminal-medium-r-normal--14-140-75-75-c-80-iso8859-1" nil)
nil
;; My screen resets (new font being used)


(cdr (assoc 'font (frame-parameters)))
"-DEC-Terminal-Medium-R-Normal--14-140-75-75-C-80-ISO8859-1"


Does this provide any new insights?  If not, I'll create the bug report.





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

* Re: Cannot load font?
  2008-11-24  5:08       ` George Roman
@ 2008-11-24  9:37         ` Peter Dyballa
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2008-11-24  9:37 UTC (permalink / raw)
  To: George Roman; +Cc: help-gnu-emacs


Am 24.11.2008 um 06:08 schrieb George Roman:

> (set-default-font
>  "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft- 
> cp1252" nil)
> nil
> ;; My screen resets (font changes, but it's not Dina)


There is also the modern function set-frame-font ...


Obviously something fails, because set-default-font returns nil. You  
could try to use edebug to see more details – actually I am not  
really experienced in this. At least you could use your time while  
waiting for a response to your bug report ...

--
Greetings

   Pete                                           0
                                            %-/\_//
                                             (*)(*)






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

* Re: Cannot load font?
       [not found]       ` <mailman.1084.1227504373.26697.help-gnu-emacs@gnu.org>
@ 2008-11-24 22:26         ` Tim X
  0 siblings, 0 replies; 8+ messages in thread
From: Tim X @ 2008-11-24 22:26 UTC (permalink / raw)
  To: help-gnu-emacs

"George Roman" <glroman@gmail.com> writes:

> On Monday, November 17, 2008 7:06 AM, Peter Dyballa wrote:
>> > Emacs is silently ignoring the Dina fonts and picking something else
>> > instead.  Why?
>>
>> Does it also happen with the *-frame-alist's? Does it happen also when
>> you copy the font names from the *Completions* buffer? If so and if so
>> in an Emacs launched with -Q then it's worth a bug report (from Help
>> menu).
>
> Here's the output from a *scratch* buffer in a session launched with -Q
>
>
> (cdr (assoc 'font (frame-parameters)))
> "-Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO8859-1"
>
>
> (x-list-fonts "*dina-medium-r-*-100-*")
> ("-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252")
>
>
> (set-default-font
>  "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252" nil)
> nil
> ;; My screen resets (font changes, but it's not Dina)
>
>
> (cdr (assoc 'font (frame-parameters)))
> "-Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1"
>
>
> (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 . "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252")
>         (top . 25) (left . 650) (width . 91) (height . 50)))
> ((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
> . "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252") (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 . "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252")
>         (top . 50) (left . 150) (width . 89) (height . 56)))
> ((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 .
> "-windows-dina-medium-r-normal--16-100-96-96-c-80-microsoft-cp1252") (top . 50) (left . 150) (width
> . 89) ...)
>
>
> (cdr (assoc 'font (frame-parameters)))
> "-Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1"
>
>
> ;; Trying to open a new window via "C-x 5 b" yields a window with the
> ;; above Adobe font (...--17-120-100-...)
>
>
> (set-default-font
>  "-dec-terminal-medium-r-normal--14-140-75-75-c-80-iso8859-1" nil)
> nil
> ;; My screen resets (new font being used)
>
>
> (cdr (assoc 'font (frame-parameters)))
> "-DEC-Terminal-Medium-R-Normal--14-140-75-75-C-80-ISO8859-1"
>
>

Are you running emacs 23? Was it working and then stopped after an emacs
upgrade?

If so, the problem may be you need to tell emacs which font backend to
use. I had a similar problem some weeks  back and solved it by putting

Emacs.fontBackend: xft

in my .Xresources file

Tim


-- 
tcross (at) rapttech dot com dot au


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

end of thread, other threads:[~2008-11-24 22:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-16  4:57 Cannot load font? George Roman
2008-11-16 11:04 ` Peter Dyballa
2008-11-16 20:40   ` George Roman
2008-11-17 12:06     ` Peter Dyballa
2008-11-24  5:08       ` George Roman
2008-11-24  9:37         ` Peter Dyballa
     [not found]       ` <mailman.1084.1227504373.26697.help-gnu-emacs@gnu.org>
2008-11-24 22:26         ` Tim X
     [not found] <mailman.503.1226823175.26697.help-gnu-emacs@gnu.org>
2008-11-16 17:02 ` Marc Tfardy

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