I have some vga 8x16 fonts, that I want to convert to drawstring fonts.
I can convert them easy enough to bitmap fonts.
They will need to be anti-aliased, and then converted to drawstring fonts.
Any idea how I can anti-alias them, and then convert them to drawstring fonts?
How do I convert old vga fonts to drawstring font?
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
Re: How do I convert old vga fonts to drawstring font?
Here are a couple of potentially useful posts/threads about custom fonts:
viewtopic.php?p=104790#p104790
https://freebasic.net/forum/viewtopic.php?f=9&t=25355
The wiki gives a simple example of generating/using one with the built-in character set: KeyPgDrawString
I don't know about antialiasing - I wouldn't have thought that would apply to VGA fonts. But as best I can recall, transparency is achieved using palette entry 0, or magenta (&hffff00ff), depending on the bit depth.
viewtopic.php?p=104790#p104790
https://freebasic.net/forum/viewtopic.php?f=9&t=25355
The wiki gives a simple example of generating/using one with the built-in character set: KeyPgDrawString
I don't know about antialiasing - I wouldn't have thought that would apply to VGA fonts. But as best I can recall, transparency is achieved using palette entry 0, or magenta (&hffff00ff), depending on the bit depth.
Re: How do I convert old vga fonts to drawstring font?
I don't think an 8x16 font can be antialiased! It would look terrible.
I don't know what drawstring is, but if it can work with TrueType fonts, here are a couple of TrueType versions of the classic IBM 8x16 font that I've used for years. Should do what you want:
http://laemeur.sdf.org/fonts/
https://www.dafont.com/nouveau-ibm.font
I don't know what drawstring is, but if it can work with TrueType fonts, here are a couple of TrueType versions of the classic IBM 8x16 font that I've used for years. Should do what you want:
http://laemeur.sdf.org/fonts/
https://www.dafont.com/nouveau-ibm.font
Re: How do I convert old vga fonts to drawstring font?
Draw String is a FreeBASIC command that draws text on a graphic screen at pixel perfect location.caseih wrote:I don't know what drawstring is,
Here in the manual
It works natively with the built in system font but this is not very useful as the system font is small and can't be sized.
You can use a custom font with Draw String. In this context, the command essentially uses a bitmap image of each font.
It takes a bit of work to convert a TTF font to be able to use it with Draw String.
There is a couple of FB tools that have been made that convert them for you.
Here is one that I used and it worked well. The links are dead, but the code is in the thread.
I cannot help with anti-aliasing.
Re: How do I convert old vga fonts to drawstring font?
I figured out how to improve the vga font using xbrz 2x scaler.
Does DrawString support transparency using alpha mode?
Does DrawString support transparency using alpha mode?
Re: How do I convert old vga fonts to drawstring font?
Yes. For details see: FB-Manuallassar wrote:Does 'Draw String' support transparency using alpha mode?