- Home /
How can I calculate font size to always be more or less standardized across a variety of resolutions?
I searched and didn't find what I was looking for. I've tried multiplying the font size by screen dimensions, but that falls apart due to the fact that different aspect ratios exist.
From what I can see, I have three potential options, and I'm curious what the best approach to this would be:
A) A mathematical way to determine how to standardize font sizes across all resolutions and aspect ratios (and if so, how?).
B) I could fill an array with font sizes across various resolutions, and make every single GUI Style a static variable that can be accessed anywhere. On a resolution change, I'd have to find the corresponding font sizes and plug them in to every single GUI Style in the game. The major downside to this is having to test every single GUI in every single possible resolution, and then eyeball it and figure out the right size for each resolution.
C) One last thing I thought of was using one formula for 4:3 resolutions, and another for 16:9 resolutions since I know that a simple formula can work as long as I use a particular aspect ratio. Only problem is, I have no idea how to tell what aspect ratio a resolution is (except the 4:3 ones which I just have memorized). Kind of wish someone invented an aspect ratio calculator or something, heh...
Before it's mentioned, using GUIText isn't feasible. Thanks.
Answer by AngryOldMan · Mar 30, 2011 at 12:36 AM
Rather than use fonts use a plane with a texture/material on with your writing on. it's what we did on our menu. that way you have much more control over how it looks, however it's not too effcient if you have say.. a text based game lol.
Unfortunately at the rate I rewrite things, I think I'd go mad from heading into my paint program so many times. :P