Hello There,
Using the Font creator which comes along with GLBasic, is it possible to set the background color to transparent? I'm asking this as I want to use AntiAlias for smooth drawing of the fonts and in that case the backcolor cannot be removed from the created font correctly.
Thanks,
Ãâ€"zden
Sadly this is not possible with the font tool, I would like this too. As it is now you have to create the font yourself in photoshop or some other art-program that can handle alpha-channel.
Hmm, this shouldn't be hard to do, I already coded transfering font data to some other devices before, all that needs to be done is not to draw a backcolor on a 32 bit surface as png output support is already there...
Anyway, might probably end up writing mine...
Ãâ€"zden
did you try to use SETTRANSPARENCY before LOADFONT? Should work. e.g. if you use a white background for your font instead of black, use it as follows:
SETTRANSPARENCY RGB(255, 255, 255)
LOADFONT "sample.png", 0
PRINT "Testing it", 0, 0
SHOWSCREEN
KEYWAIT
[attachment deleted by admin]
The problem is not transparency, the problem is 8 bit alpha channel and anti-aliasing :-)
Yes, I use SETTRANSPARENCY already and that's fine until you use an Anti-Aliased Font. In this case, the only fix in here is to be able to have a transparent background.
To make this a bit more clear, here is an example showing two letters with anti-aliasing and a normal 1 bit transparency looks like.
Upper row: 1 bit transparency, note that the green background doesn't blend well with the edges of the font.
Bottom row: 8 bit transparency, the eges blends nicely no matter what the background color is.
[attachment deleted by admin]
ups, sorry, seems I didn't understand the problem well :)
the Font creator so far can't do alpha-pixels correctly, so it's a 24bit bitmap with a colour key cookie cut. Just add an outline and make the outline non-AA.
There's a free font creator I found the other day that can do this. Unfortunately you really need to wait for a couple of weeks (according to the author) for the next version. The current one doesn't produce the font as a fixed width font and as a result you have to do a lot of post-processing work moving all the letters around afterwards to have it work with the standard print commands. The quality of the fonts produced though (particularly in small fonts) with anti-aliasing is beyond pretty much any of the free font programs I found when looking last week.
http://www.ironstarmedia.co.uk/blog/fancy-bitmap-font-generator/ (http://www.ironstarmedia.co.uk/blog/fancy-bitmap-font-generator/)
I'll post on the forums when the new version is available, but in the meantime you might want to try it and manually move the letters around when you have a font produced that you like.
This tool realy makes cute fonts. Sadly it won't do the characters in a proper grid so I had to change the proportional font library to load and kern it properly but now it's working!
Download here: http://gamecorner.110mb.com/index.php?page=bitmap-fonts-proportional
Also download that nice font generator tool while it's free :-)
Your program works very well Moru - I changed from the fixed-width fonts to proportional ones (found a decent fixedsys-like one), so I'm happy :)