Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Awful Font Rendering/Artifacting in WebGL Export

Discussion in 'Unity 5 Pre-order Beta' started by muzzythom, Feb 26, 2015.

  1. muzzythom

    muzzythom

    Joined:
    Dec 1, 2014
    Posts:
    17
    When exporting to WebGL, we get some pretty awful font artifacting in our UI.Text components (from the new GUI).

    (See attached file below)
    Unity5WebglFontArtifacts.png

    This tends not to happen the first time the font is used, but does after a few uses, and tends to gets worse as the game goes on and the font is used more. (This leads me to believe that there might be some off-by-one or precision error in the code that renders the pieces of the font's texture atlas to the screen, or something along those lines, but obviously I don't know for certain).

    It seems to happen for all font sizes, and text styles, and it doesn't seem to make a difference if I use my own TTF or unity's Arial.

    Has anybody else experienced this and found a way to work around or avoid it?

    EDIT: Just tried in firefox, and it doesn't appear to happen there, so this might be an issue with Chrome (where it does occur on both PC and Mac).
     
    Last edited: Feb 26, 2015
  2. muzzythom

    muzzythom

    Joined:
    Dec 1, 2014
    Posts:
    17
    For what it's worth, embedding a font with font hinting set to HintedRaster was able to work around the issue, but it's certainly less than ideal, as this turns off antialiasing all-together.
     
  3. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    I never saw this - can you file a bug with a repro case, and we will take a look.