Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
Is there already some (build-in) code that allows me to use bitmap fonts? Like I have the numbers 0-9 in a 32x32 grid in a bitmap and I want to use that to display numeric values like scores, hp, mp, etc.

Yes I could code one myself but I was wondering if it didn't already exist. Or perhaps it comes with Ace and I didn't see it.

I attached a small bitmap font sample (including characters).

fontsample.png
 

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
Thanks exactly what I was looking for :) and for only 7$ if it goes commercial. Hopefully it will work with the word-wrappers.

If I could just find a SFONT generator/converter..
 
Last edited by a moderator:

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
Without a SFONT generator/converter I see no purpose in Viktors script. And I could not find any on the entire net. All links to such software from SFont wikis/documentation are ALL broken and the software did not pop up using Google either. Making such fonts all by hand is kinda silly and if I have to create software that creates/converts SFONTS then I might as well just get a script that uses bitmap fonts instead.
 

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
Installed all prerequisites.

# Windows command prompt:C:\Python27>E:\Downloads\make_sfont.py c:\a.bmp a:\b.bmpTraceback (most recent call last):  File "E:\Downloads\make_sfont.py", line 44, in <module>    make_sfont(sys.argv[1], sys.argv[2])  File "E:\Downloads\make_sfont.py", line 12, in make_sfont    _, _, _, alpha = letters.getpixel((x, y))ValueError: need more than 3 values to unpackIt takes an input image and and output image.The wiki has not yet added any content to "Using the command line version" or any other documentation. Also weird that it does not ask me for a font?

Opening the py file shows this:

def make_sfont(letters_image, output_name = None):letters_image? What kind of letters_image? Or do I need a row with characters in an image and then all this program does is add a pink line to it?
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,880
First Language
English
Ya, it looks like the whole point of SFont are those extra pink lines at the top. I don't know what the format needs to be but presumably you can just open your ttf file and copy the characters at the top into an image file and run it through.


I don't know whether the characters need to be arranged in a certain way, but you may need to follow this format shown in the sample Sfonts


http://www.linux-games.com/sfont/fonts.html
 
Last edited by a moderator:

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
Ah so I need to:

1. Create an image with some font creater program (like one from XNA)

2. (optional) Convert it to a TTF (some bitmap fonts will not be compatible with that sfonts converter) with some other program. Because some bitmap fonts will look like this: http://blogs.msdn.com/blogfiles/shawnhar/WindowsLiveWriter/Bitmapfonts_B123/image1.png

3. Create a 1-line-bitmap image from that TTF

4, Run this converter over it.

5. Use&configure Viktors script
 

Latest Threads

Latest Posts

Latest Profile Posts

Another comic with Backstage Malak...
If you want to ask him anything, you can ask on my DeviantArt page! I'm not sure if you're allowed to do it here.
Forum tip of the day ...
If you get a temporary suspension for being a jerk to people who are trying to help you, and arguing with mods and admins, don't go making new accounts. Chances are, if you p**s us off enough to suspend you for a week, we're not going to hesitate giving you a permanent ban when you give us a reason.
E_6fAErVkAQILXu.png
I'm so close to releasing my game on steam! :blush::blush::blush:
Us:
"This game is awesome! I wish there are more games like this in the future."
Also us:
"I hate how games stopped being original and start copying other successful games."
Should've done this a few days ago but...
PRI_200136808.jpg
Rest in Peace, Sir Clive Sinclair
1940 - 2021
Entrepreneur, Technologist, Father of the Modern British Computing Industry, and protagonist of Legend of ZUN.

Without you, England's games and tech industry wouldn't be where it is.

Forum statistics

Threads
115,292
Messages
1,088,685
Members
149,927
Latest member
antodi
Top