So, a `GUIText` is a component that can render text to the screen. It's completely unrelated to the `GUI` class, which is a way of rendering user interfaces. Your code goes to the trouble of loading a font and setting it on a `GUIText`, but then you render your text using the `GUI` class. The size of the font changes because you change the size of the font in the `skin` used when rendering the boxes. So, put another way, if you set `GUI.skin.box.font = whateverYourFontIs;` you'll get what you want.
Note that you've violated one of the programmer universal rules. You've asked `Resources.Load()` to get you something, but you've not considered that the code might fail and return you nothing. You need to write defensive code that knows what to do when things fail. Worse, you load this font multiple times per frame, since `OnGUI()` can be called for lots of reasons. If the font load does work, you only need to do this once.
↧