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

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

RE: setting default font name


From: Drew Adams
Subject: RE: setting default font name
Date: Mon, 19 May 2014 13:51:17 -0700 (PDT)

> >> If I open emacs -Q the font used for the scratch buffer header is Deju
> >> Sans. I can go to Options, Set Default Font, and change the header to
> >> bitstream Courier 10 pitch.
> >
> > And does that change visibly to the font you want?
> 
> Yes, but only temporarily. If I repeat, next time the scratch is back to
> default mono.

You mean next time you start Emacs?  Yes, of course it is, since that
menu item affects only the current session.

But the question was whether the font you see is in fact bitstream
Courier 10 pitch.  IOW, did it work?

> >> If I then click "Save Options", I get the
> >> warning: "Saving options from 'emacs -q' would overwrite existing
> >> configutations". I don't understand.
> >
> > When you use `emacs -q' you are not using your init file, which is
> > where Emacs would normally save any changes.  Ignore this warning,
> > and do not try to save such changes if you started without your
> > init file.
> 
> ? I thought to specify an init file you had to use the syntax:
> emacs -q -l <initfile>.

emacs -q does not load any init file.  The warning is telling
you that you cannot save changes to your init file.  That's all.

> But as I demonstrated above, I get this warning when I am using an init
> file (emacs -q -l .emacs-test). 

That's not using an init file.  That's just starting without an
init file and then loading a file - any file you specify.  That
file is not considered your init file by Emacs.  As far as Emacs
is concerned, it knows init file to write customizations to.

> > M-: (face-font 'default)
> 
> This shows the courier bitstream font. "-bitstream-Courier 10
> Pitch-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1" (line break only
> here). I can't Save Options until after I've resaved the test file
> itself.

Which seems to be the same as the font you tried before, except it
is 15 instead of 16.  (I assume that you left a space between10 and
pitch.)

> > That will show you the string that is the font name for face
> > `default', which is the same thing as the default font name.
> >
> > If this string is not the same as the string you were trying earlier,
> > try this one instead.

Did you try it, i.e., 15 instead of 16?  If not, try it.  Maybe
that is the only problem.

> > IOW, this is a font name that works - perhaps
> > the name you were trying before is not correct.
> 
> In .emacs-test I write the two lines:
> 
> (set-face-attribute
> '(default ((t (:family "Courier 10 Pitch" :foundry "bitstream" :slant
> normal :weight normal :height 113 :width normal))))) [line break only in
> this message]

Just try it the same way you tried before, but using 15 instead of 16.

You don't seem to be paying much attention to the functions you are
using.  See the doc of `set-face-attribute'.  Just do what you did
previously.

> The produces an error. A lot of hex/? garbage (204V^@...), but including
> "[args frame foundary family spec where purecopy 0 nil (0t) ..)"

See above - you did not use `set-face-attribute' correctly.



reply via email to

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