- Home /
How can I change the font-size in a GUISkin object?
I'm trying to change the font-size
of my buttons and I'm using GUISkin
object where I can choose all kind of different options, but nowhere the font-size
. How can I change that for Button
explicitly without affecting the Label
's font-size
for example and without changing the default font-size
of the Font
that I'm using?
Answer by Duke · Feb 24, 2010 at 11:29 PM
As far as I know, you need to create/use/import a separate font instance for each point size you need to use. They can still all be the same typeface, though.
I guess this is the way.. I'll duplicate the font and change the font-size of it. Thanks
Answer by Ashkan_gc · Feb 25, 2010 at 05:25 AM
you can not change the font size of an imported font for a GUI skin. you need to assign a new font to button's font that has a bigger size. so you need to import fonts of different sizes that you need. be careful because when you import a font you are adding another big texture to your project. specially if you use iphone or web player the size of the game and memory usage should be important to you.
Answer by GlennHeckman · Nov 22, 2010 at 10:32 PM
You can also set your font to Dynamic and then adjust its size through a GUIStyle (or skin). However, tis adds to the file size, how much I do not know.