Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Export font texture

Discussion in 'Immediate Mode GUI (IMGUI)' started by pixelthis, Aug 20, 2010.

  1. pixelthis

    pixelthis

    Joined:
    Nov 5, 2008
    Posts:
    120
    Simple question, but I can't seem to find how to do it (Unity free, Windows): How do I export a font texture so that I can edit it in Photoshop?

    p.s. My font is already imported, and a font texture and font material exist in the project view. I just can't find out how to then get this font texture out (as a PNG).
     
  2. melmonkey

    melmonkey

    Joined:
    Mar 31, 2009
    Posts:
    373
  3. pixelthis

    pixelthis

    Joined:
    Nov 5, 2008
    Posts:
    120
    Thank you!
     
  4. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    429
    Is there anyway to resize a font texture once it's been created? I exported mine with a scale of 200 in the hopes that the resolution/quality would be sufficient when scaling to smaller (more reasonable) sizes.

    When I make my custom texture font dynamic, everything goes out of wack and it becomes unable to isolate character, like a poorly tiled textured.

    Any ideas?
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Dynamic Fonts don't have a texture, they are generated at runtime from the OS font rendering.
    from the other fonts you could do it, but its not a grid either.
    I personally would go with BMFont for a texture font though or Hiero if oyu are on osx and use the texture and data file you get along it for an own system (given you don't own ezgui)
     
  6. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    429
    Ah, I see. That makes a bit more sense.

    I own EZGUI beta 1.01, is there a way to do it with that?
     
  7. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    EZGUI can't export it, but EZGUI can use bitmap fonts exported with hiero / BMFont pretty much directly (on its page ezgui has a short documentation on use either of the two. for bmfont you just export it and then rename the fnt file to txt and drop it and the texture into the unity project to use it on a SpriteText object as used by most gadgets actually
     
  8. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    429
    Thanks very much, will look into this tomorrow.