ComputeTextBoxSize /Drawing

vector2 ComputeTextBoxSize(string bitmapFontFile, string text)

Computes and returns the text bounding box size.

const string text = "the quick brown fox";
vector2 boxSize = ComputeTextBoxSize("Verdana20.fnt", text);

// draw a rectangular frame behind the text
DrawShapedSprite("sprites/circle.png", pos, boxSize, 0xFFFFFFFF);
DrawText(pos, text, "Verdana20.fnt", 0xFFFFFFFF);