Big X11 Nethack Font

  • Updated for 3.4, 12/10/2002! Additional characters and config contributed from a kind user.
  • Font and config file updated AGAIN, 6/5/2000! Minor character adjustments.
  • Font and config file updated, 3/9/2000! Characters are now in place for all effects. Got rid of so-called solid rock, because it doesn't work as I expected. Fixed drawbridge assignments.

    Back in 1990 I got tired of the ugly ASCII nethack characters. I toyed with the idea of a custom font (and built most of it). But looking at the code, it looked like it would be more than a quick change to use a full 8-bit font. And xterms had some annoying limitations too. I abandoned the idea.

    But other people didn't. Now there is an X11 version of nethack, with support for 8-bit fonts. I've completed my font, and have it working nicely with Nethack version 3.2.2 and 3.2.3.

    A kind user has contributed glyphs for new characters used in Nethack 3.4 (tree, grave, and iron bars), and a new config file for them. In addition he submitted new characters for up and down stairs; I included his downstairs and chose to create my own new upstairs which are a better stylistic match for his downstairs (IMHO). The old stairs are still in the font -- the 3.2.2 config data (below) points at the old stairs, the 3.4 config data (also below) points at the new stairs. If you want to change this, the upstairs character went from 145 to 185, and downstairs went from 146 to 184.

    Currently, the style is to display a grid over which the characters move. But because of limitations of drawing the walls (nethack doesn't know which side of a wall is the room and which is unexplored) I couldn't draw all the edges of the grid. Still, it looks quite nice (IIDSSM) so I don't think I'll try a gridless version anytime soon.

    I've tried to be faithful to the style of the ASCII gameplay in my font design. For instances, ghosts are hard to notice, but are subtly different from an empty space. The mimic (when mimicing) looks a lot like armor, but not exactly (they differ by a single pixel) [at least in theory. I have NOT been able to get this to work -- from the source code it looks like the alternate mimic character is only used in shops and has about a 3/20 chance of showing up, but it never appears for me -- if you can clear this up, please let me know]. Currently all traps look identical, but I may change my mind on that one.

    A screenshot

    Some sample characters

    Weapon Armor Ring Scroll
    Potion Amulet Food Spellbook
    You Ogre Jabberwock Keystone Kop
    Floating Eye Dragon Snake Demon
    Nymph Unicorn Giant Lizard

    Getting and Using it

    I've only tested this with Nethack 3.2.2 and 3.2.3! Changes for 3.4 have been submitted by the user community.

    Download the X11 BDF font
    (third version 12/10/02, support for 3.4)

    Download the .nethackrc file configuration for version 3.2.2 (last updated 3/9/00; fixes drawbridges, adds effects).
    Or download the user-contributed configuration for version 3.4 (last updated 12/10/02; additional characters, also uses new stairs).

    This is a big font. It's based on the Sony 12x24, but I've expanded it to 14x24. You'll want at least an 1152x864 display. At that resolution, nethack is too tall, but not too wide, so you can resize it to fit and then shrink the message area by hand until everything looks right. Or, you can specify a separate, smaller font for the non-gameplay regions of the X11 window (you don't have to because this font preserves all printable characters).

    Download using the link above. Also grab the configuration, which gets added to your .nethackrc file. If you don't have one, then it is almost sufficient by itself, you'll also need at least: OPTIONS=windowtype:x11 in there somewhere to make sure it comes up in an X window. If you already have a .nethackrc file, there may be things there you want to keep. You will have to comment out any other specifications for character display that you have there.

    To install the font do the following

    > mkdir fonts
    > cd fonts
    > chmod 755 .
    > mv <wherever you saved nethackfont.txt> ./nethack.bdf
    > mkfontdir
    > :          the following chmod makes xset happy
    > chmod 644 fonts.dir nethack.bdf
    > xset fp+ <full path to this directory>/fonts
    > xset fp rehash
    
    You probably want to put the two xset commands into your X11 startup files so the fonts will always be available. I've also written a more detailed description of BDF font installation.

    Then just run "nethack -fn -sonyfine-nethack-medium-r-normal--24-170-100-100-c-120--custom" and away you go. If you don't like the obnoxious font name you have two choices: 1. edit the bdf file and change the FONT line to a name you can cope with. Or 2. make a fonts.alias file in the fonts directory containing:

        nhbig -sonyfine-nethack-medium-r-normal--24-170-100-100-c-120--custom
    
    where nhbig is the new happy font name. In either case, run the mkfontdir and xset stuff again.

    You can also set the Xresources up to give you this font without having to specify it on the command line. Wherever your X11 resources are kept (often in a file in your home directory called .Xdefaults or .Xresources), do the following:

    NetHack*font:                           variable
    NetHack*display_file*font:              fixed
    NetHack*tombstone*font:                 fixed
    NetHack*rip*font:                       -*-times-medium-r-*-*-12-*-*-*-*-*-*-*
    NetHack*menu*font:                      fixed
    NetHack*map*font:                       -sonyfine-nethack-medium-r-normal--24-170-100-100-c-120--custom
    
    This sets different areas to different fonts. If you want to use this one font everywhere, simply set the Nethack*font: to this font.

    Links

    Other X11 fonts I've made
    Notes on Nethack Weapon Skills
    What is the Best Nethack Artifact?
    What were Nethack's Polearms Really Like?
    Nethack Damage Calculator
    Weapon Recommendations for:
  • Healer
  • Samurai
  • Archaeologist
  • Knight
  • Elf
  • Tourist
    Nethack.org (the real actual home page)
    Another Nethack Home Page
    The Nethack Index
    Ali's NetHack Page

    My Home Professional Home TomSaraZac Home
    Email Work Email