Hello,
I am making a game and I want to add fonts from the sprite sheet. I have 2 ways in my mind how to implement this:
1. Cut every letter and put it into the Image Hashtable. So every time the particular letter is pressed, the letter is taken using the keycode of the letter and the image is drawn on the screen.
2. Combine the letters into words I want to use with image editor, save it as .png and draw them at particular time and place I want (disadvantage: couldn't insert random letters)
I don't think these ways are the proper ways to do that. Perhaps anyone could give me a better idea?
And by the way, another way just poped up in my mind: create my own font (have no idea how to do that) and just simply call setFont method of Graphics class. Need to check about that
P.S.
The sprite sheet I am talking about is like this: