I’ve been working on a GUI, and until now I’ve just used photoshop for my text, but I really need to be able to use text. The problem is its too small. Here’s my code:
function DrawLabelBottomAligned (pos : Vector2, text : String)
{
GUI.Label(Rect (pos.x, nativeVerticalResolution - pos.y, 100, 100), text);
}
I tried using a transform matrix but then it gets too pixelated. Any help greatly appreciated.
Of course there’s alpha for images, and of course there’s font size. There just isn’t any dynamic font size where you get any arbitrary size from one font file. If your text is too small just import the text at a larger size.
(The lack of vector fonts is actually a blessing in disguise anyway IMO, since having to make separate font files for each size makes people keep the number of font sizes down to a bare minimum, and from a typographic point of view this is a good thing. )
Yeah, I should’ve clarified–when I say we keep multiple fonts with different import settings, it’s the same font at different sizes: 10 point, 14 point, 18 point, etc. The texture size isn’t terrible, because it’s alpha 8-bit.
I think it would be cleaner to select point sizes in the GUI skin/style, rather than reference different fonts, but it is workable now (and you can do dynamic scaling if you absolutely need to).
For the editor, I have Lucida Grande (main gui font). I duplicated that (copy/paste), renamed it to Lucida Grande Large and changed the import settings to be 11 points rather than 10. Same for small. Etc…