Hi. How do I change the font size of GUI Text? I don’t see anything to change it in the inspector. I am making a Menu For my game and using GUI Text for the title.
Take off “pixel correct” and adjust the x and y scale so it’s the size you want. This way the title will be the same relative size on all screens, as opposed to “pixel correct”, where it will be too tiny on bigger monitors, or too huge on smaller monitors, depending on what size monitor you’re working on. If the font looks too jagged, increase the font size using the settings in the project pane.
–Eric
what about the blurryness?
Make the font size big enough so that it’s always scaled down, not up. Then it won’t be blurry.
–Eric
So, if I needed 3 different sizes of font, I’ll need 3 different font files with 3 different import settings :?:
You can do that, and you need to do that if you’re using pixel-correct settings. But if you’re using resolution-independent text where you adjust the size by using scaling, then just import the font once at the largest size, then you can scale down as much as you need.
–Eric
for a beginner to Unity text handling is baffling. I’ve spent hours trying to find
the ‘Pixel Correct’ parameter referred to here only to find it’s not part of UnityGUI
but GUIText. Am i right in assuming then that if we need multiple font sizes we should either use GUIText or use UnitGUI and reimport the font for each font size required. What are the pro and cons of each system with regard to fonts?
You can actually scale UnityGUI text as well without having to reimport the font at different sizes, but it’s not very obvious; you have to modify the GUI matrix. I believe there are some topics about that around here somewhere.
Both systems handle fonts in pretty much the same way, although you can use custom materials and shaders for GUIText, and can therefore use multi-colored custom bitmap fonts, whereas you’re limited to importing single-color vector fonts with UnityGUI.
–Eric
thanks eric but modifying the GUI matrix sounds like a good way of wasting the rest of the day, i think i’ll use GUIText. You know after a month or so of using Unity i’m struck by how it can make the really difficult stuff easy (model import Open GL rendering on iPhone) and how it can make the really simple simple stuff surpisingly difficult.
mmm well GUIText seems problematic too it prints my font squashed in the X-axis then when i uncheck pixel correct it disappears. The same font renders OK in UnityGUI so i guess i’ll go back to that and import 2 versions of the same font. seems like a waste of space though since i only need the small size for a time display.