Configuring Character Sets

From CrawlWiki
Jump to: navigation, search

If you're playing in ASCII mode (as opposed to using tiles), Dungeon Crawl has an option called char_set that determines which characters are used to represent walls, doors, and other dungeon features. It also affects how these characters and encoded. Because of the history of character encodings and fonts on computers, making this work properly can be complicated, especially when playing remotely via a terminal program like PuTTY. This article will guide you through the setup process.

Why do I care?

You might not. It's largely a matter of personal preference. This humble author likes the IBM character set because it makes the walls look like continuous walls, instead of a bunch of waffles hanging around in a line. It also makes shops and gates look different from wands/staves, which can help reduce player mistakes in stressful places, such as the Abyss. The DEC and Unicode character sets are similar.

If you have tried to watch someone play on CAO only to discover that their dungeon has a whole bunch of funny-looking 'u's in it, this guide can help you set up your terminal so you can watch them. You might need to ask the player which character set they are using, so you can use the appropriate settings.

Choosing a Character Set

To enable a character set, add a char_set line to your init file. If you are playing online, use the menu to edit your options for the appropriate version of Crawl. options_guide.txt has this to say about the char_set option:

char_set = (ascii | ibm | dec | unicode)
Chooses different character sets for the game play screen. DOS and Windows users will want to use the IBM character set, Unix users will prefer DEC or plain ASCII. On Unix, Crawl may be built with Unicode support, in which case you can use char_set = unicode to use unicode characters in the map display.

When playing online using PuTTY, the IBM character set works well. If you are playing the DOS console version, Crawl seems to automatically enable IBM graphics for you, so no setup is required.

Configuring PuTTY

For IBM

  1. In PuTTY's options menu, select Window > Translation.
  2. Change the "Received data..." drop-down to CP437.
  3. Under "Handling of line drawing characters," select "Use font in both ANSI and OEM modes."
  4. (optional) Select Window > Appearance and choose the 9pt Terminal font.

For Unicode

  1. In PuTTY's options menu, select Window > Translation.
  2. Change the "Received data..." drop-down to UTF-8.
  3. Under "Handling of line drawing characters," select "Use Unicode line drawing code points."
  4. Select Window > Appearance and choose Courier New, Lucida Console, or another Unicode font.

A Note About Fonts

For your chosen character set to display properly, you need to use a font that contains the appropriate glyphs. The IBM character set requires that the font contain the codepage 437 line drawing characters, also known as the OEM/DOS character set. Some fonts contain accented characters for European languages instead of the line drawing characters. You can determine which fonts work by trial and error, or by examining the fonts in Windows's "Character Map" (charmap) utility. Choose the "Terminal" font in PuTTY (Window > Appearance) to get the same appearance as the local console version of Crawl.

If you decide to try the Unicode character set, you need a font that contains the Unicode line drawing code points. Again, try different fonts until you find one that works, or use charmap to find fonts that contain the necessary glyphs. The Unicode line drawing characters start at code point 2500. Unfortunately, some of the better Unicode fonts provided by Microsoft lack line drawing characters.