Hello, I am currently building a game using slick2D. It’s going great so far, but I’ve hit a snag. I can’t seem extract images from a .ttf or .fnt file. What I mean is I can’t seem to get a glyph’s image from a font file.
Given the way that my game engine is built, I never want to draw strings directly from the render() method. My game works by creating displayable objects containing Slick’s built in Image class and putting those objects into containers, then finally, displaying the container. This simplifies the act of treating a group of objects as one. I only mention this because I’ve seen other people draw strings from the render methods directly onto the screen. I want to avoid using this method of drawing text, you see.
Is there any way, in Slick2D, to easily get a glyph’s image from a .ttf or .fnt file? I see that there is a Glyph class which supplies an image for a particular glyph, but found that it requires a TON of information in order to instantiate it.
If I can’t find a way to make this work, I may have to create a .png map of characters myself and read from that file. This is also something I would like to avoid… Any thoughts?