Server Help

Misc User Apps - font sheet maker

Smong - Sun May 29, 2005 8:59 pm
Post subject: font sheet maker
Here's a font sheet maker written in java. It may be useful to someone but most fonts just look totally naff.

It saves to .png (unoptimised) and has a config file so it can be used in other games that have font sheets with a similar layout.



If anyone has problems running this please say what version os you have (win98, xp, linux, etc) and what version of java you have.

Edit: Updated attachment on august 16 2005.
Cyan~Fire - Sun May 29, 2005 9:21 pm
Post subject:
Sweet, man. You've gotta be the primary writer of apps for SubSpace by now. icon_smile.gif
Purge - Sun May 29, 2005 9:25 pm
Post subject:
Very useful. I had no problems running it on Windows. Good Job! icon_biggrin.gif
Bak - Mon May 30, 2005 5:17 am
Post subject:
ImageIO... I swear I was looking through api's and forums for that functionality for hours... good job smong
Smong - Mon May 30, 2005 6:25 pm
Post subject:
Update:
added more comments to the code
fixed save dialog (directories)

jump to first post
SyrusMX - Tue May 31, 2005 4:12 pm
Post subject:
Why would you have it save as a png?
Purge - Tue May 31, 2005 4:28 pm
Post subject:
Better compression than BMPs.
SyrusMX - Tue May 31, 2005 4:33 pm
Post subject:
But you need to convert it to bmp anyway...
Bak - Tue May 31, 2005 4:44 pm
Post subject:
For what? Continuum supports png for everything that it supports bmp.
SyrusMX - Tue May 31, 2005 5:07 pm
Post subject:
So I can take a png file, rename it to a bm2 file, and it will see it just fine?
Smong - Tue May 31, 2005 6:38 pm
Post subject:
Yeah, or just leave the .png extension (it seems you have missed a key feature in cont. all this time).
newb - Wed Jun 01, 2005 3:55 am
Post subject:
It's pretty good Smong, good job. icon_smile.gif
Smong - Thu Jun 09, 2005 8:22 am
Post subject:
Update:
fixed for accented font sheet
tweaked colors

jump to first post
SuSE - Thu Jun 09, 2005 10:49 pm
Post subject:
actually, it's likely that an image with only a handful of colors like the one in the screenshot will be smaller as a bmp, not a png (not by a whole lot, though, and png is usually more convenient to play with)
SamHughes - Fri Jun 10, 2005 4:38 pm
Post subject:
You are catastrophically wrong.
Purge - Fri Jun 10, 2005 4:41 pm
Post subject:
SuSE wrote:
actually, it's likely that an image with only a handful of colors like the one in the screenshot will be smaller as a bmp, not a png (not by a whole lot, though, and png is usually more convenient to play with)


I tried it, too, and you're wrong. icon_wink.gif
SuSE - Fri Jun 10, 2005 5:51 pm
Post subject:
You're probably both doing it wrong.
Purge - Fri Jun 10, 2005 5:54 pm
Post subject:
I did it right. The PNG version of that screenshot was 11KB and the BMP version was about 606KB.
SuSE - Fri Jun 10, 2005 6:05 pm
Post subject:
SuSE wrote:
the one in the screenshot

SamHughes - Fri Jun 10, 2005 7:18 pm
Post subject:
Smong, the zip file has been reported as invalid by two different pieces of software.
SuSE - Fri Jun 10, 2005 7:19 pm
Post subject:
my bmp build is like ~.2 Kb larger than png build, so I guess it takes less colors
Muskrat - Fri Jun 10, 2005 8:14 pm
Post subject:
Purge+ wrote:
I did it right. The PNG version of that screenshot was 11KB and the BMP version was about 606KB.


haha, jackass....
Smong - Sat Jun 11, 2005 11:59 am
Post subject:
Update:
fixed bad zip file

jump to first post
SamHughes - Sat Jun 11, 2005 1:09 pm
Post subject:
I had an 11859 byte png output, and when I save that as a bitmap image, it becomes something like 450 kilobytes. As an indexed bitmap image, it used 60 kilobytes.

I could further compress the png version down to 7132.

This was using Verdana with the settings listed in the screenshot. Not a fully identical image as the screenshot's, but sufficiently similar.

Are you getting bmps that are 12000 bytes? How? How about 7132 bytes?
Smong - Mon Jun 20, 2005 9:19 am
Post subject:
Here's a .def file for putting fonts in tilesets, you need to adjust the width/height manually to 16x16.
blaine0002 - Mon Jun 20, 2005 9:55 am
Post subject:
how do you add fonts you have downloaded off the internet to the program?
i have the fonts installed on my computer but it wont let me load them into the program.
Smong - Mon Jun 20, 2005 11:35 am
Post subject:
Click the Font button and type the name of the font into the text field. Then click Check. If you got the name correct then the text field's font will change. If it doesn't change keep guessing the name.
blaine0002 - Mon Jun 20, 2005 11:54 am
Post subject:
i tried that, i always get the font right too because i copy it from photoshop:P

example i have a font named Psycho, so i type in Psycho and click check, but the font on the screen dosent change...
Smong - Mon Jun 20, 2005 12:36 pm
Post subject:
I haven't got anymore ideas. Can you put the font in a zip file and upload it here?
blaine0002 - Mon Jun 20, 2005 1:26 pm
Post subject:
alright, once i get home.
SyrusMX - Mon Aug 15, 2005 3:52 pm
Post subject:
If you plan on updating it, would it be possible to add in a drop-down menu to the fonts directory?
Bak - Mon Aug 15, 2005 4:22 pm
Post subject:
To get all availble font names you can do

Code: Show/Hide
String[] names = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();

SyrusMX - Mon Aug 15, 2005 4:51 pm
Post subject:
I'm a supid user...
Bak - Mon Aug 15, 2005 6:35 pm
Post subject:
can't spell stupid right either icon_wink.gif

Here's a version with a font chooser that will let you pick from a list and show you a preview instantly... source included too.


Mine GO BOOM - Mon Aug 15, 2005 8:30 pm
Post subject:
Could you maybe add an auto-size feature? Thus, when picking new font sizes, it will grow/shrink the whole image to keep them all in line. That, or maybe a test-size button, in which if any font letter goes over into another font's box, it can tell you. Could just be a warning light somewhere.
Smong - Tue Aug 16, 2005 3:13 pm
Post subject:
I made some changes to the original version so it now has a drop down showing the system fonts (see first post for pic and download). I also put font(tileset).def in the zip.

The image does resize when you choose a new font or style. However it probably doesn't work perfectly with all fonts hence the text fields for fine tuning. I'd rather not do some 'get pixel' stuff on every character just to see if it will exceed its allotted rectangle. Some sort of translucent overlay might work, leaving the detection of overlapping characters to the user.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group