DaveTran 3 Junior Poster

I've got a font as a sprite sheet with individual characters arranged in the exactly same way as a .ttf file.

How can I get the index of the characters from a string so that I can know the index of the source rectangle to use to grab the correct character from the sprite sheet?

For example

string foo = "acb"

If I were to grab the character at index 0 'a', it would return the correct index of the source rectangle to draw an 'a'.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.