Search Unity

Use edited ttf font as simple scaleable vector graphic for GUI?

Discussion in 'Editor & General Support' started by programicks, Sep 26, 2014.

  1. programicks

    programicks

    Joined:
    Sep 5, 2014
    Posts:
    11
    It has occurred to me, I was messing with a GUI text today and realized, the gui text will scale to any size and remain smooth. If I could edit a ttf fonts glyph, I could create any shape I want and it would become a scalable vector graphic? Ok, it would be just single color but I only want to create some simple shapes that will scale as 2D GUIs. I only plan a few and use bitmaps for the rest as normal.
    Is this possible?
     
  2. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Yes it is. I have edited a font to include an extra life icon. It worked fine. You can also create a new font, just made up of your vector graphics if you wish. That way Unity will not have to create a texture with all the other glyphs in it.

    I used Font Forge to do mine, and I need to make my characters about A5 size to be the correct size in Font Forge (I find I have to have the size and page alignment correct in Illustrator so that I don't need to move them, otherwise Font Forge crashes).