Ticket #1268 (confirmed change)
Switch to ttf fonts in SDL port
| Reported by: | d_m | Owned by: | |
|---|---|---|---|
| Milestone: | Future | Keywords: | sdl |
| Cc: |
Description (last modified by noz) (diff)
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:
- prune or update the "bad" fonts
- 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)
- 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
comment:1 Changed 2 years ago by magnate
- Keywords font removed
- 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
- Milestone changed from Triage to 4.0
comment:2 Changed 2 years ago by takkaria
we already use sdl-ttf2 -- just need a UI for selecting font sizes for TTF fonts.
comment:3 Changed 19 months 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 9 months 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.

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.