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

better typography!

Discussion in 'Wish List' started by konzeptzwei, Jan 29, 2009.

  1. konzeptzwei

    konzeptzwei

    Joined:
    Feb 10, 2006
    Posts:
    64
    i still don't understand why it's impossible to adjust linespacing and kerning of a font in the gui system! i hope this is updated in version 2.5.

    cheers.chris
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    This won't be updated with 2.5.

    But yes, we want better typography as well.
     
  3. hrissan

    hrissan

    Joined:
    Mar 9, 2009
    Posts:
    32
    I tried to use GUIText in iPhone version to display text in Russian "Привет, Ёжик!", but I've got just ", !" that's not good. If I should add font to my assets, I cannot, because font licenses clearly prohibit this, also Unicode font is big. iPhone already has variety of different high-quality fonts with wide range of symbols, its just stupid not to use them.

    Also I cannot select font size, I need for example 20 pixels. I do not want to adjust GUIText transformation scale, because no one wants to look at blurry low-quality result.

    The reason is we make game with lots of text, its too large an effort to make textures in Photoshop with all texts, then load them.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    There are free fonts.

    The problem is that fonts have to be a pre-rendered texture, because drawing them on the fly would mean creating and uploading new textures constantly, which is especially slow on the iPhone. Text in 3D is done with UV mapped polygons; it's not like you can just use the OS drawing routines.

    Import the font at a larger size.

    --Eric
     
  5. hrissan

    hrissan

    Joined:
    Mar 9, 2009
    Posts:
    32
    I would but that does not work. I take Unicode font with Japanese characters, (BTW its big, it is 17 Mb size), I tell to import it with font size 20 and I get 4096x4096 texture, its not fun at all. It is impossible to load on iPhone (limited to 1024) (and it will take 16Mb of texture memory and would add at least 5 seconds to app start time!). Changing size to 16 reduces texture to 4096x2048, so it will not load on iPhone anyway. Further reducing size is impractical - japanese characters will lose readability.

    In Star Walk application we are happy with using system fonts. When the text changes, it is rendered to context created with CGBitmapContextCreate and then the memory is uploaded to GL via glTexImage2D.

    It is not lightning fast, but it is pretty usable. Have you tried similar approach?

    P.S. OK no problem, we will skip Japanese market for now, its just funny that Unity is unable to render Japanese texts on iPhone at all. Because its impossible to fit all required symbols with still readable size to texture of 1024x1024. Japanese and Chinese people should start crying now. :)