Author Topic: Can NGUI use system fonts?  (Read 2399 times)

niall

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 13
    • View Profile
Can NGUI use system fonts?
« on: August 15, 2014, 02:52:51 PM »
For reasons that would require a lot of explaining, I need to use the built-in iOS and Android system fonts for an app,  Without having those fonts as part of the app itself.  I managed to find this, which works quite well aside from the 4 year old NGUI portion no longer compiling against current NGUI...
https://github.com/imkira/unity-sysfont/tree/unity4x

So we can attach a SysFont component to a gameObject at runtime on the device, and properly use any iOS fonts that exist.  Looks really crisp too!  The problem is that we need to do per-word highlighting within a string, which this does not support. 

I've been unable to find anything concrete about NGUI's support for these system fonts, so I suspect it is not possible, but figured I'd at least ask if it might be supported in the future?  Seems like quite a neat feature for a wide range of uses, no?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can NGUI use system fonts?
« Reply #1 on: August 16, 2014, 09:31:44 AM »
NGUI didn't exist 4 years ago. ;)

I had a look at it, cleaned up and made it compile on the latest version of NGUI. Can't test it though. I'm on Windows and the plugin doesn't support Windows.