Page 1 of 1

Working with fonts

Posted: Thu Jul 18, 2013 5:07 pm
by CaptainMaelstrom
I'm a little confused about how to work with different fonts.

I'm writing a program which lets the user define which font they want displayed, but I foresee a problem.
When they pick their font, how will I know how to size my user interface elements?
Especially if the user picks a variable width font, I won't know how, programmatically, to determine user interface elements' (buttons and the like) width/height to prevent text from spilling out of the UI elements or being cut off by them.

Anyone have experience or suggestions for dealing with this?

Re: Working with fonts

Posted: Thu Jul 18, 2013 5:17 pm
by slime
[wiki]Font:getWidth[/wiki]
[wiki]Font:getHeight[/wiki]

Re: Working with fonts

Posted: Thu Jul 18, 2013 5:21 pm
by CaptainMaelstrom
:ultrahappy: