alan2here
alan2here

Reputation: 3317

How does the font size work in sprite fonts in C# XNA?

How does the font size work in sprite fonts in C# XNA? For example maybe font size 10 is drawn from the top to bottom of a lowercase charecter by default 10 pixels tall when output with SpriteBatch's drawString. I've noted that some charecters are much wider or taller than most, extending a considrable distance downwards or to the right of a normal charecter.

Upvotes: 0

Views: 527

Answers (1)

George Duckett
George Duckett

Reputation: 32428

I believe it depends on the font. You can use SpriteFont.MeasureString to determine the rendered dimensions of text.

Upvotes: 1

Related Questions