McRogueFace/deps_windows/libtcod-1.23.1-x86_64-msvc/data/fonts
John McCardle d0d2eae762 Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
..
README.md Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
Tamzen5x9r.bdf Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
dejavu8x8_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
dejavu10x10_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
dejavu12x12_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
dejavu16x16_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
dejavu_wide12x12_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
dejavu_wide16x16_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal7x7_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal8x8_gs_ro.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal8x8_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal8x12_gs_ro.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal8x12_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal8x14_gs_ro.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal10x10_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal10x16_gs_ro.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal10x16_gs_tc.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal10x18_gs_ro.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal12x12_gs_ro.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00
terminal16x16_gs_ro.png Initial Commit / Linux Combined Proof of Concept example 2023-02-23 19:37:13 -05:00

README.md

Libtcod font examples

This directory contains some example fonts for libtcod. These fonts are generally free to use, but the license for the terminal tilesets has not been accounted for correctly.

Tilesets

Tilesets are a smaller collection of glyphs arranged in a specific layout, usually Code Page 437.

All standard Code Page 437 tilesets are loaded with the following call:

auto tileset = tcod::load_tilesheet("path/to/tileset.png", {32, 32}, tcod::CHARMAP_CP437);

Libtcod is able to load tilesets from the Dwarf Fortress Tileset Repository with the above extra configuration. It also supports all the tilesets from this tileset browser.

The file names in this directory are composed with:

<font_name><font_size>_<type>_<layout>.png
<type> : gs 8-bit or less greyscale PNG
<layout> : ro standard Code Page 437 layout in standard row-major order
           tc Deprecated TCOD layout

BDF

Libtcod also supports BDF files. These fonts usually have decent Unicode support.

BDF files can be loaded in libtcod with the following call:

auto tileset = tcod::load_bdf("path/to/font.bdf");

You can find BDF's in various places. Recommended fonts are: Unicode fonts for X11, Cozette, Tamzen, and Envypn.

TrueType Font

TrueType font files are aliased and have good Unicode support.

Tilesets can be generated from TTF files using a tool like Typesheet.

There is limited support for loading TTF files in libtcod. This experimental function is provisional and may change in the future:

TCOD_Tileset* tileset = TCOD_load_truetype_font_("path/to/font.ttf", 20, 10);  // 20 pixels high, half-width glyphs.
TCOD_Tileset* tileset = TCOD_load_truetype_font_("path/to/font.ttf", 20, 20);  // 20 pixels high, monospaced glyphs.

To get the most of a TTF you should regenerate the tileset with a size closely matching your tile size whenever the window is resized. Otherwise you'll get scaling artifacts from the font being rendered at a low resolution and then scaled up.