Author Topic: Libtcod fonts  (Read 9892 times)

woperri

  • Newcomer
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Libtcod fonts
« on: February 26, 2015, 04:07:43 PM »
Not sure if this is the right place to ask this, but in my download of libtcod, there are a number of nice-looking font images. I'm wondering if anyone knows how these fonts were created. Were they generated using a program, or were they drawn by hand? If they were generated with a program, could I create larger square fonts with it?

Cfyz

  • Rogueliker
  • ***
  • Posts: 194
  • Karma: +0/-0
    • View Profile
    • Email
Re: Libtcod fonts
« Reply #1 on: February 26, 2015, 10:59:38 PM »
You may notice they are named like arial, consolas or courier -- vector fonts you've probably seen or even used here and there, so they are unlikely to be drawn by hand.

There is a number of programs for rasterising 'normal' fonts into image tilesets, all with a varying degree of suitability:
* Ultimate Bitmap Font Generator (lots of features but somehow no most basic regular grid placement)
* Littera (web-based, mostly for highly decorative fonts)
* Nameless DF-related web-based font generator (codepage 437 only)
* etc. Just google 'bitmap font generator' or smth like this.

The problem is, they are usually either totally out of date (like CBFG which handles only a portion of ASCII) or made for more sophisticated applications (just look at all those packing algorithms!) and surprisingly useless for plain roguelike projects. Obviously I may miss something, if anyone know any useful ones, please share.

And here is the obligatory note about my alternative-to-libtcod BearLibTerminal pseudoterminal library which allows using vector fonts directly without intermediate font images. There is no FOV though.

woperri

  • Newcomer
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Libtcod fonts
« Reply #2 on: February 28, 2015, 12:24:02 AM »
Yeah, I noticed that as well. I also found and downloaded a bunch of different font generators previously (including one called the "libtcod font maker"), but I'm mainly interested in square fonts only, where the width is equal to the height. Unfortunately, with regards to this, it seems like most of the programs I've found allow you to specify a font size, but that's it. However, many of the libtcod fonts are square, which led me to wonder exactly how they were made.

Cfyz

  • Rogueliker
  • ***
  • Posts: 194
  • Karma: +0/-0
    • View Profile
    • Email
Re: Libtcod fonts
« Reply #3 on: February 28, 2015, 03:00:46 AM »
If you are talking about fonts that come with libtcod package, like 'consolas12x12_gs_tc.png', -- those are not square. True, the tilesets they rasterized to have square tiles but glyphs are still the same from regular fonts. Note how better they look with more usual cell proportions: