newsGNU FreeDink - News: More work on fonts; sound

 
 
Latest News
New Maintainer posted by kjharcombe, Wed 01 Jun 2022 12:32:32 PM UTC
GNU FreeDink 109.6 posted by Beuc, Sun 17 Feb 2019 12:48:16 AM UTC
New FreeDink game data release posted by Beuc, Sun 20 Jan 2019 05:18:16 PM UTC
New FreeDink DFArc frontend 3.14 release posted by Beuc, Wed 06 Jun 2018 07:03:46 PM UTC
New FreeDink game data release posted by Beuc, Sun 02 Apr 2017 08:34:27 AM UTC

More work on fonts; sound

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

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).

 

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code