Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Multiple fonts  (Read 1752 times)

Michael

  • Bay Watcher
    • View Profile
Multiple fonts
« on: July 11, 2009, 03:40:24 am »

One annoying new feature in in the experimental 40dX series, is the Zoom.  This allows on-the-fly changes to the gridsize.

The problem is that it's somewhat easy to activate accidentally (being bound to the mousewheel), and produces ugly results since what it effectively does is rescale a bitmap font.

One way to make the feature not suck, would be to allow multiple fonts to be specified in the configuration file.  Then each zoom step could use a distinct bitmap font optimized for that layout.  You could have then have perfectly crisp text in a variety of gridsizes.

I'd never play with a sub-8x8 font, but being able to snap to one temporarily would be much better than rescaling a beautiful normal font into the same gridsize.

Another possibility is to use TrueType fonts instead of a bitmap.  Lucida Console, Courier New, Andale Mono, and DejaVu Sans Mono all feature the Code Page 437 glyphs used by DF.  The first two come with Windows, and all but Lucida Console are available on a free beer basis.
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: Multiple fonts
« Reply #1 on: July 11, 2009, 03:42:55 am »

or even better, enable support for loading CSV files.
Logged

Corona688

  • Bay Watcher
    • View Profile
Re: Multiple fonts
« Reply #2 on: July 11, 2009, 12:00:21 pm »

If you wanted beautiful, a retrofitted ASCII game is the wrong place to look.  DF does not have fonts anyway, just tilesets.  Moving graphics rendering out of the tileset completely would be very hard on modders since font editing is a much finickier beastie than graphics editing...  The ability to switch between tilesets and resolutions at runtime might be something more doable.
« Last Edit: July 11, 2009, 12:02:36 pm by Corona688 »
Logged
You never know when you might need a berserk dwarf to set loose somewhere.

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: Multiple fonts
« Reply #3 on: July 11, 2009, 12:18:52 pm »

The problem with zoom is that to zoom out, you need a smaller tileset, and a lot of people are using 16x16 as their default. To zoom out would be changing to an 8x8 tileset, which is not as widely supported.
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Multiple fonts
« Reply #4 on: July 11, 2009, 04:44:13 pm »

I like the idea of different tilesets, and im sure that if it were to be implemented there would be plenty of people willing to cook up a 8x8 their tileset, maybe even a 12x12 or 6x6.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Michael

  • Bay Watcher
    • View Profile
Re: Multiple fonts
« Reply #5 on: July 11, 2009, 07:43:03 pm »

If you wanted beautiful, a retrofitted ASCII game is the wrong place to look.  DF does not have fonts anyway, just tilesets.  Moving graphics rendering out of the tileset completely would be very hard on modders since font editing is a much finickier beastie than graphics editing...  The ability to switch between tilesets and resolutions at runtime might be something more doable.
For me, beautiful is a good-quality CP437 font.  "Tilesets" that assume position 210 is "chair", when in fact it is U+2565 BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE and nothing more, are ugly to me.  But that's not the issue.

What I really want is mutiple bitmap tilesets.  I was just commenting that, in presence of zoom, TrueType would be superior to a single bitmap tileset.
Logged

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: Multiple fonts
« Reply #6 on: July 12, 2009, 06:37:18 am »

Spoiler (click to show/hide)

Regardless of your suggestion's content, saying a new feature is 'annoying' and 'sucks' because you don't find it useful can't stop yourself from hitting the mousewheel is kinda insulting. It's also not the best way to engender community support for your suggestions regarding it.
Logged

Baughn

  • Noble Phantasm
  • The Haruhiist
  • Hiss
    • View Profile
Re: Multiple fonts
« Reply #7 on: July 14, 2009, 07:46:09 pm »

Especially when it's rebindable in d14, as it was always supposed to be. You can then turn it off.

Replying to the constructive part of your post, my current best-guess idea for handling this issue is to support SVG tilesets; generate multiple renderings, and use opengl's mip-mapping feature to make it automatically pick the best one at a given resolution.

This would, however, require someone to make an SVG tileset. So.. well, if anyone actually does so, I'll implement that.

Combining multiple tilesets would seem to be a bad idea, seeing as they might not have the same tiles, never mind styles; things would shift dramatically while zooming, and DF depends on knowing in advance what tiles it can rely on, so only the tiles that exist in all tilesets could be used.
Logged
C++ makes baby Cthulhu weep. Why settle for the lesser horror?

chucks

  • Bay Watcher
  • Have Cutlass -- Will Travel
    • View Profile
Re: Multiple fonts
« Reply #8 on: July 14, 2009, 07:49:51 pm »

The solution to bitmap rescaling issues is to utilize mipmapped tilesets.
Logged
Computer says 'No'.

Baughn

  • Noble Phantasm
  • The Haruhiist
  • Hiss
    • View Profile
Re: Multiple fonts
« Reply #9 on: July 14, 2009, 07:54:35 pm »

Logged
C++ makes baby Cthulhu weep. Why settle for the lesser horror?

chucks

  • Bay Watcher
  • Have Cutlass -- Will Travel
    • View Profile
Re: Multiple fonts
« Reply #10 on: July 14, 2009, 08:03:51 pm »

<slaps-forehead />

Sorry, Baughn.  I know you know what you're doing, but didn't immediately recognize you for who you are.
Logged
Computer says 'No'.

tsen

  • Bay Watcher
    • View Profile
Re: Multiple fonts
« Reply #11 on: July 14, 2009, 08:04:06 pm »

Even just a single truetype font that scaled smoothly would be (in my opinion) the height of elegance, since I almost never use tilesets. Mmmm.
Logged
...Unless your message is "drvn 2 hsptl 4 snak bite" or something, you seriously DO have the time to spell it out.

Michael

  • Bay Watcher
    • View Profile
Re: Multiple fonts
« Reply #12 on: July 14, 2009, 09:23:13 pm »

Especially when it's rebindable in d14, as it was always supposed to be. You can then turn it off.
Actually, I've found a way to turn it off by accident.  Setting [MOUSE:NO] disables the mousewheel too, and you want to set it that way to avoid d13's nastiest bug.

Combining multiple tilesets would seem to be a bad idea, seeing as they might not have the same tiles, never mind styles; things would shift dramatically while zooming, and DF depends on knowing in advance what tiles it can rely on, so only the tiles that exist in all tilesets could be used.
Ah, the GRAPHICS feature.  I can see how that might be a problem with differing repertoires.  But then, DF already allows seperate tilesets for windowed and fullscreen mode -- how come that can work?
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: Multiple fonts
« Reply #13 on: July 15, 2009, 03:00:37 am »

Especially when it's rebindable in d14, as it was always supposed to be. You can then turn it off.

Replying to the constructive part of your post, my current best-guess idea for handling this issue is to support SVG tilesets; generate multiple renderings, and use opengl's mip-mapping feature to make it automatically pick the best one at a given resolution.

This would, however, require someone to make an SVG tileset. So.. well, if anyone actually does so, I'll implement that.

Combining multiple tilesets would seem to be a bad idea, seeing as they might not have the same tiles, never mind styles; things would shift dramatically while zooming, and DF depends on knowing in advance what tiles it can rely on, so only the tiles that exist in all tilesets could be used.

Ok, I'll get right on it.

in face, the png I posted earlier was all vector anyways.
Logged

Michael

  • Bay Watcher
    • View Profile
Re: Multiple fonts
« Reply #14 on: July 15, 2009, 09:26:12 pm »

One thing I'd like to clarify - I am not proposing that .png tileset support be removed.  What I really want is multiple .png tilesets for different zooms.

Truetype would be a way to quickly create four (Andale,Courier,Lucida & DejaVu) large matched and antialiased tileset families with little additional effort.  But I only suggested it in passing, and not as a mandatory replacement for .png.  Even if I felt like using a TTF font for most zooms, I'd still want to use a hand-optimized bitmap font for the tiniest levels.

What I'd like to see is a configuration file that contains stanzas for different zoom levels, each specifying a separate font.


And again, regarding the problems with extended GRAPHICS tilesets -- obviously there must be a way to cope with fontsize switching, otherwise there would be no need for separate GRAPHICS_FONT and GRAPHICS_FULLFONT options.
Logged
Pages: [1] 2