VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I can't find any specific information on this question, and will be grateful for any help.

For my own DOSBox-based project, I'd like to try replacing int10_font_16 in int10_memory.cpp with some other open-source sans-serif font. I know that I can load an alternate VGA font using a font-loading utility, but I'd like to try building it into the source code.

Is there a tool that converts standard .FON bitmap font files into the format used by DOSBox? Probably this is something every programmer knows, but I haven't been able to figure out it. Thanks for any info.

Reply 1 of 10, by VileR

User metadata
Rank l33t
Rank
l33t
emendelson wrote:

For my own DOSBox-based project, I'd like to try replacing int10_font_16 in int10_memory.cpp with some other open-source sans-serif font. I know that I can load an alternate VGA font using a font-loading utility, but I'd like to try building it into the source code.

It would be easiest to start with such a loadable VGA font, since the format is technically the same as int10_font_16 in the DOSBox source - you'd just have to encode the raw binary data as a series of 8-bit hex values. There are a bunch of ways to do this (I personally like Swiss File Knife, which lets you tweak the prefix, number of bytes per line, etc.)

Starting from .FON is trickier, since .FON may be one of several executable formats with any number of .FNT resources inside. I've never actually had to do that, but PSFTOOLS may help... if the notes are anything to go by, you'd have to (take a deep breath) fon2fnts, fnt2psf, psf2raw, then encode the raw data as suggested above.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 2 of 10, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for those suggestions: Swiss File Knife is clearly the tool I need, and I think I'll play it safe by starting with a loadable font. I'll report on progress (if any)

What I suppose I'd like to try to do (or imagine doing) someday is change the character size to a more comfortable size for reading on screen, and use a more modern font, changing the dimensions of mode 3, etc., to match - though that's probably far beyond my capabilities.

Reply 3 of 10, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

there is an int 0x10 function call to load a font when in dos. very popular in demos and diskmags.

sounds like you want to scale the dosbox screen up, there are config options for that

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 4 of 10, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
BloodyCactus wrote:

sounds like you want to scale the dosbox screen up, there are config options for that

Actually, what I imagine doing (I can't imagine that I'll ever know how) is to change the size of the text font character cell from 8*16 to something larger, and then create a bitmap font with the larger size, so that DOSBox I'm trying to avoid the fuzzy text of scale-up screens, and instead using a larger-resolution bitmap. If you change the font in a Windows command prompt to bitmap 10x18, you'll see more or less what I have in mind (though something like 12x24 might be best) - the idea would be to use the large font, but retain the standard 25 (or more lines).

Reply 5 of 10, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

considering that would break a tonne of dos software Im not sure the point. any changes to the internal font would then not apply to the font dosbox would be using.

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 7 of 10, by VileR

User metadata
Rank l33t
Rank
l33t

There's that vDos fork of DOSBox (focused on non-game/business applications) which supports arbitrary scalable fonts. Not open-source anymore, but perhaps the last available source already has that functionality... although it probably won't be easy to adapt to your own build, since it strips down/replaces most of the VGA emulation for that.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 9 of 10, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Yeah, DOSBox isn't LGPL. Does Vdos for instance have a separate license agreement with the authors?

All hail the Great Capacitor Brand Finder

Reply 10 of 10, by VileR

User metadata
Rank l33t
Rank
l33t

I'll correct myself a little - the wording on the site is "a small part of vDos’ proprietary code is now excluded from the source files." I suppose someone would have to verify that he's not violating the license terms with that.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]