Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: libtcud + custom fontS (used at the same time!)  (Read 1901 times)

Abalieno

  • Bay Watcher
    • View Profile
libtcud + custom fontS (used at the same time!)
« on: August 08, 2012, 09:27:24 pm »

I thought that maybe I could find here people who are good at programming and have experience with libtcud. I've discussed this problem at length in this thread (the last pages): http://www.quartertothree.com/game-talk/showthread.php?t=70123

My problem is that I want to use a big enough font/tile for the main game window. Like 16x16. But I also need to have enough space for a message log.

16x16 for a game window is enough to show full Unicode characters (that otherwise would be too small):



But it is way too large for just a text window like a message log. It would take too much space.

The ideal solution would be to load different fonts, and use them in the different windows. So for example I use a 16x16 font in the main game window, and a smaller one for the only-text areas like a message log.

See for example this in Cataclysm:



Or even how Angband allows you to spawn different windows, each with a custom font: http://www.youtube.com/watch?v=QyKVmQBrw4g

The problem is that by default libtcud only allows you to use ONE font. And so use one grid size for the root console, as well the offscreen consoles.

Does anyone know (or is able to) how to "hack" the library so that it can load and store in memory more than one font, and then use one for each offscreen consoles?

Can this be achieved with some minor adjustment, or it really requires a lot of work on the library itself to support such a feature?
Logged
 HRose / Abalieno
cesspit.net

ductape

  • Bay Watcher
  • MAD BOMBER
    • View Profile
    • Alchemy WebDev
Re: libtcud + custom fontS (used at the same time!)
« Reply #1 on: August 09, 2012, 09:04:56 pm »

its actually libtcod

stand for library The Chronicles of Doryen

also, totally wrong forums section. Maybe in Creative Projects?
Logged
I got nothing