TTF Converter for DRAW STRING

User projects written in or related to FreeBASIC.
jofers
Posts: 1525
Joined: May 27, 2005 17:18
Contact:

TTF Converter for DRAW STRING

Postby jofers » Jun 27, 2006 18:16

http://www.betterwebber.com/stuff/ttf_to_gfxlib.zip

EDIT: for version 0.20, use this version:
http://betterwebber.com/stuff/ttf_to_gfxlib_v20.zip

A little Windows GUI program that makes a GfxLib font for DRAW STRING for 32-bit modes from a TTF font. Italic fonts might look a bit akward because right now the DRAW STRING font format has no left/right margin info. But most fonts look decent. Saves the fonts in BMP format.
Last edited by jofers on Jan 12, 2009 23:40, edited 1 time in total.
rdc
Posts: 1725
Joined: May 27, 2005 17:22
Location: Texas, USA
Contact:

Postby rdc » Jun 27, 2006 19:45

Very cool.
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » Jun 27, 2006 20:13

this is pimp dude...
redcrab
Posts: 619
Joined: Feb 07, 2006 15:29
Location: France / Luxemburg
Contact:

Postby redcrab » Jun 27, 2006 21:56

That's cool... a great example to insert into the FBC sample code distribution package....
Does it exist any issue with copyrighted TTF ?...
If you convert all M$ fonts into BMP to be use as Draw String Font , it's like converting a font format to another font format... then in addition if you distribute these BMP to the community...

Is it a worthly question ?
jofers
Posts: 1525
Joined: May 27, 2005 17:18
Contact:

Postby jofers » Jun 27, 2006 23:38

Fonts are protected under the law, but you can use the fonts that come standard with Windows for free, if I understand. Fancy fonts you'll probably have to buy if you want a 100% thumbs-up from Uncle Sam.
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Postby relsoft » Jun 28, 2006 0:07

Whoooa!!!!!

that's nize!!!
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Postby anonymous1337 » Jun 28, 2006 0:43

Are there any free from copyright format fonts? Maybe someone should make one if there isn't :P
jofers
Posts: 1525
Joined: May 27, 2005 17:18
Contact:

Postby jofers » Jun 28, 2006 1:09

TTF themselves aren't copyright, it's a pretty open standard, but the fonts themselves are. There are dozens of free fonts on the internet out there, just google for them.
Dr_D
Posts: 2398
Joined: May 27, 2005 4:59
Contact:

Postby Dr_D » Jun 28, 2006 1:17

Cool project. It would be nice to have an option to save the bitmap as a square(WxH), instead of just a linear image though. That would be useful for creating fonts for use with OpenGL. I guess there isn't any reason it can't be used the way it is now though. ;)


EDIT: I was unable to open the generated file with Photoshop 6.0. You got any idea why?
Last edited by Dr_D on Jun 28, 2006 1:26, edited 1 time in total.
Sisophon2001
Posts: 1704
Joined: May 27, 2005 6:34
Location: Cambodia, Thailand, Lao, Ireland etc.
Contact:

Postby Sisophon2001 » Jun 28, 2006 1:25

I have a CD full of free fonts, but the quality of free TTF tends not to be a good as the fonts the Microsoft ships with windows. I must see if I can find the CD, it had lots of font conversion programs. I am sure if you search online you will find free fonts. Search for bitstream also.

FB programs can be used on Linux, so using copyrighter windows fonts is not ideal. It would be better to find genuine free fonts.

Thanks jofers for this utility.

Garvan
jofers
Posts: 1525
Joined: May 27, 2005 17:18
Contact:

Postby jofers » Jun 28, 2006 1:46

I can open the generated file with CS2 and Paint. But the bmps are only meant to be opened by BLOAD. I don't know the OpenGL font format, but there are utilities already out there for using TTF fonts with OpenGL such as this one.

EDIT:
Arial, Courier, Georgia, Times New Roman, Trebuchet MS, Verdana, Comic Sans MS, Impact, and Webdings are all free to distribute, so don't worry about using any of the standard "web" fonts with your programs.

Also, a good place to find free fonts is to google for "open fonts", there are quite a few people collecting them.
Last edited by jofers on Jun 28, 2006 2:00, edited 1 time in total.
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Postby relsoft » Jun 28, 2006 1:49

Try this site ;*)

Courtesy of a link from DBF...
http://cooltext.com/Default.aspx

It's a free foa ll font archive!!!
Dr_D
Posts: 2398
Joined: May 27, 2005 4:59
Contact:

Postby Dr_D » Jun 28, 2006 2:12

jofers wrote:I can open the generated file with CS2 and Paint. But the bmps are only meant to be opened by BLOAD. I don't know the OpenGL font format, but there are utilities already out there for using TTF fonts with OpenGL such as this one.



I've been using that program for a while now, but I just thought it would be cool to have a FreeBASIC program that replaced it. Whenever possible, I use homegrown FB stuff. ;)

EDIT: I also wanted to show you something...

This is image is of the native FB text, saved directly from FB.
Image

This is the quality of the Font builder image of the same size.
Image
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Postby sir_mud » Dec 01, 2006 8:58

Works with WINE under linux just fine. But the produced bitmaps don't seem to be in the correct format and don't work.
jevans4949
Posts: 1154
Joined: May 08, 2006 21:58
Location: Crewe, England

Postby jevans4949 » Dec 01, 2006 10:25

anonymous1337 wrote:Are there any free from copyright format fonts? Maybe someone should make one if there isn't :P


Yes, there are plenty of free fonts out there, although most are wacky designs.

Most, I believe, have a copyright statement; I guess you may be able to negotiate with the artist to convert the format. If they are offering it free, why should they object, provided they get a mention?

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 3 guests