newsGNU FreeDink - News: More work on fonts; sound

 
 
Latest News
New FreeDink game data release posted by Beuc, Tue 02 Sep 2014 07:00:04 PM UTC - 0 replies
New website design posted by Beuc, Sat 16 Jun 2012 09:27:04 AM UTC - 0 replies
New releases posted by Beuc, Sat 16 Jun 2012 09:03:16 AM UTC - 0 replies
New FreeDink sound replacements! posted by Beuc, Sun 16 Oct 2011 08:26:41 PM UTC - 0 replies
New freedink releases posted by Beuc, Sun 14 Nov 2010 11:26:45 AM UTC - 0 replies
[Submit News]
[41 news in archive]

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

Comments:

No messages in More work on fonts; sound

 

Back to the top


Powered by Savane 3.1-cleanup