Opened 10 years ago

Last modified 8 years ago

#1268 confirmed change

Switch to ttf fonts in SDL port

Reported by: d_m Owned by:
Milestone: Future Keywords: sdl

Description (last modified by noz)

Some of the SDL fonts don't support the new character used for the floor glyph (the dot) and many more don't support Latin-1 characters, which breaks xchars.

Given that there are currently a ton of these fonts, and that most users will assume that the size of a font shouldn't change it's appearance, I think we should do at least one of the following:

  1. prune or update the "bad" fonts
  1. separate out the different font faces (serif, sans) and styles (bold) from the size (making sure that we can support bold/non-bold versions of the different fonts)
  1. move to truetype fonts for SDL which can be displayed at different point sizes.

I am not a font expert so maybe I have misused some of the font terms, but I think the point should be clear.

Change History (6)

comment:1 Changed 10 years ago by magnate

  • Keywords font removed
  • Milestone changed from Triage to 4.0
  • Status changed from new to confirmed
  • Summary changed from Some SDL fonts are bad to Switch to ttf fonts in SDL port
  • Type changed from bug to change

Not confirmed: all SDL fonts support both xchars and centred dots IME. Changing this ticket to an aspiration to use sdl-ttf. (In the meantime, point 2 can be dealt with in #1267).

I think Sangband (which is SDL-only) handles TTFs, so we could look at that implementation.

comment:2 Changed 10 years ago by takkaria

we already use sdl-ttf2 -- just need a UI for selecting font sizes for TTF fonts.

comment:3 Changed 9 years ago by magnate

  • Milestone changed from 4.0 to 3.5.0

Missed this one, but it's not an "experimental" issue.

comment:4 Changed 8 years ago by noz

  • Description modified (diff)

I'm going to stick my neck out here, and argue against using TTF fonts (under some circumstances). Hard-coded font sizes cannot be beaten for sheer readable information density, particularly in the small sizes. When you only have say 5 pixels by 9 pixels, no amount of clever scaling of a single glyph will do better than a pixel-optimised arrangement.

I've still not got rid of the old X-fonts on my system for precisely that reason - I can get about 25% more on the screen using them.

comment:5 Changed 8 years ago by noz

(Damn, that was meant to be a comment, not a Description change...)

comment:6 Changed 8 years ago by takkaria

  • Milestone changed from 3.5.0 to Future
Note: See TracTickets for help on using tickets.