Posted: 25th Oct 2011 15:14
"The AppGameKit will look for images 32.png up to and including 127.png in the subimages file and any not found will default to the space character (32.png)."

I tried many times to use my own text font . but all failed ,

I only need to use numbers in my game , so I rename the number images with 48.png 49.png - 57.png.

then I use Imagejoiner.exe to join them together.there is no other image,such as letters.

then I use SetTextFontImage() to load my own Text font. but I can't make success.

anyone can give me a hand ?
Posted: 26th Oct 2011 9:43
why no one answer this question?
is it very difficult to answer?
Posted: 26th Oct 2011 10:16
Why not using this: http://forum.thegamecreators.com/?m=forum_view&t=189225&b=41

+ this code:

+ Code Snippet
Global img_font as Integer
img_font = LoadImage("yourfontimage.png")
SetTextDefaultFontImage(img_font)


Then you don't need to use seperate image files for the numbers.
Posted: 26th Oct 2011 11:29
If you only need the numbers just load the images using "loadSubImage" and manually use the number sprites when needed. Then you don't need to load a whole font just for the numbers?
Posted: 26th Oct 2011 12:22
player parameter
12
24
23
12

or score board
223
123
125

baxslash,need I crate many sprite for numbers?
Posted: 26th Oct 2011 12:50
baxslash,need I crate many sprite for numbers?

Well you'll need to create one sprite for each number but you could create a number "Type" that saves the sprites for an integer so you could then keep track of 'sets' of sprites. I would store the data as follows:

IE.
+ Code Snippet
type numType
    number as integer
    spr1 as integer
    spr2 as integer
    spr3 as integer
    spr4 as integer
    spr5 as integer
    spr6 as integer
    spr7 as integer
    spr8 as integer
endtype
dim numbers[100] as numType


...or you could create a string from the list of sprite numbers and parse the string when you need to move / edit / delete the set.
Posted: 26th Oct 2011 17:32
There was a correction to the documentation recently, it will actually look for images named "32" to "127" without the ".png" on the end, also 32 must always exist, even if it is just blank.
Posted: 26th Oct 2011 20:43
Paul,thank you very much.
I am puzzling these days.
Posted: 26th Oct 2011 21:23
it works. thank you. I just finished some code.