Author Topic: TTF fonts dissapear/garble when alt-tabbing  (Read 1974 times)

DirtyHippy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
TTF fonts dissapear/garble when alt-tabbing
« on: April 20, 2015, 10:21:26 PM »
3.8.2
U5.01f1

Any TTF fonts dissapear/garble when alt-tabbing.

This has happened ever since I moved to Unity 5.  Now, I have seen the disclaimer in Ngui basically saying "go bug Unity, it's not my problem" (always makes me lol a little) but does anyone have any idea if there is a workaround?  Since all of my UI is basically created up front and disabled for the most part, it means the minute you alt-tab you are basically done.

The TTF fonts look so much better than the bitmap ones.  I still use some bitmap fonts.  They appear to have no issues.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TTF fonts dissapear/garble when alt-tabbing
« Reply #1 on: April 21, 2015, 01:38:17 AM »
http://www.tasharen.com/forum/index.php?topic=12937.0

Dynamic fonts have many issues. It's why there is a warning shown when you try to use them.

DirtyHippy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: TTF fonts dissapear/garble when alt-tabbing
« Reply #2 on: April 21, 2015, 09:35:28 AM »
Thanks.  This does seem like it is fixable in ngui.

I fixed this in the editor with the code below.  I don't seem to see this problem with standalone builds.  Since I didn't feel like modifying more ngui stuff I just made it affect the editor.

#if UNITY_EDITOR
   /// <summary>
   /// Mark the UI as changed when returning from paused state.
   /// </summary>

   void OnApplicationFocus (bool focused)
    {
        if (focused)
            Invalidate (false);
    }

#endif

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TTF fonts dissapear/garble when alt-tabbing
« Reply #3 on: April 22, 2015, 02:01:49 PM »
It's already a part of NGUI Pro as of ~2 weeks ago, so you will find it in the next update regardless.