Page 1 of 1
Open source Font Library?
Posted: Wed Feb 13, 2008 6:10 pm
by t0xic
Hey,
I have finally gotten VGA mode 13h running using VGA Ports, and I can print the character 'A' to the screen. I tried making my own character set, but I decided that I could just be lazy and use an existing library - if one exists. I know there are things like OpenType etc, but I just need something small and portable - I don't have a problem with re-writing parts of code. Also, It doesn't need to be the whole ASCII table, I'm really just interested in a-Z, 0-F.
I haven't found any thing on the forum search, wiki or google that I am interested in, so I was wondering if anyone had any ideas for me.
Thanks,
Michael
Posted: Wed Feb 13, 2008 6:45 pm
by iammisc
I'm pretty sure freetype is the de facto open source font rendering library for truetype fonts.
http://freetype.sourceforge.net/
Posted: Wed Feb 13, 2008 7:07 pm
by t0xic
Sorry, I should of said that I'm really just interested in a font for VGA mode 13h, like an 8x8 or 8x7 font size, not something like FreeType or TrueType fonts, but like the fonts described in the
Wiki.
Posted: Wed Feb 13, 2008 7:45 pm
by jerryleecooper
You can find such fonts into /drivers/video in the linux source tree.
Linux itself is GPL but theses fonts must come from DR-DOS I guess, not so Kosher. Im also searching for a font.
http://overcode.yak.net/12 font a 8x8 font.
Posted: Thu Feb 14, 2008 4:17 am
by Combuster
t0xic wrote:Sorry, I should of said that I'm really just interested in a font for VGA mode 13h
Why not ask your VGA card for the fonts? while you are in text mode the used font is stored in video memory. You just have to know where to look.
VGA Hardware might help you there.
Posted: Thu Feb 14, 2008 6:33 am
by 01000101
If you are just looking for a 8x8||8x7 font library, why not just make it yourself? it doesnt take much to make the letters A-Z in such a small array. Thats why I ended up doing. Once you get into larger arrays, then i can see it becoming extremely tedious. But as stated above, the fonts are there anyways, just look for them, or rummage through the linux source code.
Posted: Thu Feb 14, 2008 2:35 pm
by t0xic
Thanks for the replies. I'll think I use Combuster's method, and if that fails, I'll go on to making the font by hand. Thanks everyone
--Michael
Posted: Thu Feb 14, 2008 2:42 pm
by Combuster
t0xic wrote:Thanks for the replies. I'll think I use Combuster's method, and if that fails, I'll go on to making the font by hand. Thanks everyone
--Michael
I know it works
[
Sample code] [
Screenshot]
Posted: Thu Feb 14, 2008 2:53 pm
by t0xic
Wow, thanks! Didn't think to look on your site first
--Michael
Posted: Thu Feb 14, 2008 10:12 pm
by jerryleecooper
I have found a good site for some small fonts.
http://dsg4.com/04/extra/bitmap/index.html
license, you may use them as you like.
Posted: Fri Feb 15, 2008 3:56 am
by jal
t0xic wrote:Wow, thanks! Didn't think to look on your site first :D
A maybe even easier way to get to your VGA card's fonts is to use the font stored at
int 43h.
JAL
Posted: Fri Feb 15, 2008 1:50 pm
by t0xic
I'm not using vm86 to switch -- still working on implementing that, but it's not first on my list.
Posted: Fri Feb 15, 2008 2:28 pm
by jal
t0xic wrote:I'm not using vm86 to switch -- still working on implementing that, but it's not first on my list.
The beauty is, int 43h is not an interrupt, but just a pointer to a table. So read the realmode pointer at address 43h*4, convert it to an address and there's your font.
JAL