ivan_b
Topic Author
Posts: 100
Joined: 22 Jul 2015, 12:57

Re: System fonts in Android

01 Apr 2019, 08:20

Hi jsantos,

I apologise for being bothersome but we need support chinese in our app and I am trying to find the best solution.
In order to choose the best solution I am trying to understand how the fonts are working.
On android when I use the Noto Sans CJK SC font which are inside the unity project the memory usage on startup is 280 MB but when i switch to Droid Sans Fallback font which is intsalled on my android device the memory usage is 180 MB.
Such a case is also with the windows version of the app (but with another CJK system font).
So I wanted to know why the memory usage of the system fonts are so much lower?
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: System fonts in Android

03 Apr 2019, 02:21

No worries, we are here to help. Local fonts are more inefficient in Unity because the asset system of unity is really inefficient. Assets in Unity cannot be streamed from disk, they need to be fully loaded even if only a small portion of the file is needed. In case of fonts, only a small subset is really needed. That's the reason system fonts are more efficient, because we don't use Unity to load them. A solution to avoid this would be putting fonts in /StreamingAssets folders and load them from there. But for now this is not supported and not planned at this moment.
 
ivan_b
Topic Author
Posts: 100
Joined: 22 Jul 2015, 12:57

Re: System fonts in Android

03 Apr 2019, 21:26

Thank you for your help.
It made my decision a lot more easier.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: System fonts in Android

05 Apr 2019, 21:02

My advice, use system fonts as much as possible with fallbacks for each version of operating system supported. We have plans in future version of Noesis to automatically configure fallbacks to operating system fonts.

Who is online

Users browsing this forum: Google [Bot], jayk.techabbot and 42 guests