Sigh. I meant the difference between the absolute position and the top of the tallest letter. But I figured it out:
int highest = 0;
for (int i = 0; i < text.DisplayedString.Length; i++)
{
Glyph glyph = font.GetGlyph((uint)text.DisplayedString[i], 150, false);
if (glyph.Bounds.Height > highest)
highest = (int)glyph.Bounds.Height;
}
Thanks for the help. It's kind of lame you have to do this but I guess everything can't be done for us ;)
Another method would be:
text.setOrigin(text.getLocalBounds().left, text.getLocalBounds().top);
Another method would be:
text.setOrigin(text.getLocalBounds().left, text.getLocalBounds().top);
This must be updated whenever the string is altered.
I'm not sure what the results of getLocalBounds().left and getLocalBounds().top are when the string is empty.