How do I get my Emacs to *always* use 6x13 on X11

后端 未结 3 609
闹比i
闹比i 2021-02-04 09:33

I recently declared .emacs bankrupcy and reorganized my init stuff. In the process, I ripped out all the hacky font selection stuff I had accrued over the years, figuring there

相关标签:
3条回答
  • 2021-02-04 10:19

    You want to set the default frame parameters in your .emacs.

    • find out the name of the font you want to use
    • add the needed value to the default-frame-alist.

    The easiest way, actually, is to use customize and customize default-frame-alist, but can also use elisp and write

    (setq default-frame-alist 
       '(font . "-*-*-medium-r-normal--16-*-*-*-*-*-fontset-hiramin_w6"))
    

    That's stolen from my emacs, you'll need to find the full font name (xfontsel?) for the font you want.

    See also the EmacsWiki on setting fonts and faces.

    0 讨论(0)
  • 2021-02-04 10:20

    I control this stuff from my .Xresources file.

    Personally I have

    emacs.reverseVideo:     true
    emacs.font:             7x13bold
    

    (And I quite agree... long live the bitmap fonts! I'll take my xterm with

    XTerm*foreground:       green
    XTerm*background:       black
    XTerm*font:             7x13bold
    

    ... over the Gnome terminal any day).

    If you're playing with .Xresources from within a session, xrdb command is useful to reload them.

    0 讨论(0)
  • 2021-02-04 10:36

    For anyone reading this with a recent Linux distribution you will have to install 6x13 first (yes, sounds obvious..). There are instructions here for Ubuntu/Debian which should work on other distros too if you skip the apt-getting of random fonts. Install the "FixedSC" .tgz from there (it unpacks to /usr/local/share/fonts) then follow the instructions to add it to the font cache so it will appear in the Gnome Font selection dialog.

    0 讨论(0)
提交回复
热议问题