newsGNU FreeDink - News: More work on fonts; sound

Latest News
New FreeDink game data release posted by Beuc, Sun Apr 2 08:34:27 2017 - 0 replies
GNU FreeDink 108.4 posted by Beuc, Wed Oct 22 20:22:43 2014 - 0 replies
New FreeDink DFArc frontend 3.12 release posted by Beuc, Thu Oct 16 21:54:46 2014 - 0 replies
New FreeDink game data release posted by Beuc, Tue Sep 2 19:00:04 2014 - 0 replies
New website design posted by Beuc, Sat Jun 16 09:27:04 2012 - 0 replies
[Submit News]
[44 news in archive]

More work on fonts; sound

Item posted by Sylvain Beucler <Beuc> on Mon Nov 19 19:37:34 2007.

I managed to display fonts with exactly the same metrics than the original game (that is, the same as MS Woe does). This involved finding the good size ratio, finding how to reproduce semi-boldness, finding metric-compatible replacements for arial.ttf and vgasys.fon (used by Dinkedit), writing sample programs and checking results under Woe and Wine, using different versions of FreeType (with or without the bytecode interpreter enabled - yes, rendering TrueType fonts does involve a virtual machine, who knew? :)).

I also reworked the text wrapping code from sabetts, and fixed title placement in text dialogs (tip: when text is marked as vertically aligned in the Dink source code, well, that actually never worked ;)).

It was pretty interested to dive into the work of font rendering - but thanksfully I could reuse existing libraries as-is and avoid writing lots of code.

Now I'm on one of the last missing features: changeable sound frequency for sound effects (playing the same sound very slowly or very quickly to get totally different results).

SDL_mixer does not provide that feature, but there're chances I can find a workaround, without having to try and combine SDL_mixer with another sound library such as Allegro's or OpenAL, which both support frequency changes. I find sticking to SDL_mixer important because that's the only library that decently plays MIDIs (and also, to a less extent, audio CDs sound tracks).


No messages in More work on fonts; sound


Back to the top

Powered by Savane 3.1-cleanup1