Open source Font Library?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Open source Font Library?

Post 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
iammisc
Member
Member
Posts: 269
Joined: Thu Nov 09, 2006 6:23 pm

Post by iammisc »

I'm pretty sure freetype is the de facto open source font rendering library for truetype fonts.

http://freetype.sourceforge.net/
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post 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.
User avatar
jerryleecooper
Member
Member
Posts: 233
Joined: Mon Aug 06, 2007 6:32 pm
Location: Canada

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post 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.
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post 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
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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 :wink:
[Sample code] [Screenshot]
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post by t0xic »

Wow, thanks! Didn't think to look on your site first :D

--Michael
User avatar
jerryleecooper
Member
Member
Posts: 233
Joined: Mon Aug 06, 2007 6:32 pm
Location: Canada

Post 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.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post 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
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post by t0xic »

I'm not using vm86 to switch -- still working on implementing that, but it's not first on my list.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post 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
Post Reply