Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

MeasureString and font scaling.

$
0
0

@MuntyScruntFundle wrote:

Hi folks.

I've been playing about with the GUI part of the game I'm working on. I have a Box class which basically draws a rectangle but has a load of properties to display information in the space, one of which is text.

If I use the MeasureString function on text displayed 1:1 it's fine, however if I display text at .5 size and multiply the MeasureString by the same variable the text moves right and down,

Has anyone else found this?

I can't see how my calculations can be wrong, all I'm doing is multiplying the measure result by the ratio then divide it by 2 to find the centre point. For testing I'm using a very standard Tahoma that's been 'spritefonted'.

I could spriteify loads of different sizes of font, but that seems wasteful.

Any ideas?
Thanks.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles