System fonts in Android
I am trying to use the system fonts in Android, specifically the Noto Sans CJK but Noesis was not able to find it.
The fonts is in the folder /system/fonts but the font is a TrueType Collection.
I wanted to know if this could be the reason for not being able to find it?
The fonts is in the folder /system/fonts but the font is a TrueType Collection.
I wanted to know if this could be the reason for not being able to find it?
Re: System fonts in Android
Just curious - have you tried using just "Noto Sans" and the CJK characters? I assume in that cause it will "just work".
-
sfernandez
Site Admin
- Posts: 2995
- Joined:
Re: System fonts in Android
We use the family name specified in the ttf tables to perform the FontFamily matching.
I downloaded from here https://www.google.com/get/noto/ the version for JP and the family name used in the file was: "Noto Sans CJK JP", using that works fine in Noesis:
I downloaded from here https://www.google.com/get/noto/ the version for JP and the family name used in the file was: "Noto Sans CJK JP", using that works fine in Noesis:
Code: Select all
<TextBlock FontFamily="Fonts/#Noto Sans CJK JP" .../>
Re: System fonts in Android
@nokola
I have tried with Noto Sans but it can't find the Noto Sans font at all.
This is the way I am using it
@sfernandez
I wanted to use the system installed fonts as it would save memory.
When I add the Noto Sans fonts to my project it works as expected.
I have tried with Noto Sans but it can't find the Noto Sans font at all.
This is the way I am using it
Code: Select all
<FontFamily x:Key="DeafultFont">#Arial, #Heiti SC, #Noto Sans</FontFamily>
I wanted to use the system installed fonts as it would save memory.
When I add the Noto Sans fonts to my project it works as expected.
Re: System fonts in Android
TrueType Collection (.ttc) are supported and scanned. Are the rest of system fonts working properly? What sfernandez is suggesting is using '#Noto Sans CJK JP' as the family name. I don't have an Android right now to check but probably what's happening is a mismatch in the font family name.
Re: System fonts in Android
I will try this. I have tried with the "regular" Noto sans but it was not able to find it but the font is located in the /system/fonts folder.
For now the only font family that I was able to use on Android is Roboto.
For now the only font family that I was able to use on Android is Roboto.
Re: System fonts in Android
Hi
Thank you for your help. I tried the example that @sfernandez suggested before but on an older android device and that is the reason why it didn't work.
On a newer one works great.
If it is not a problem could you explain what is the difference between the system fonts and the fonts included in the project?
The main thing that I am interested in is what is the reason that sytsem fonts occupy less memory.
Thank you for your help. I tried the example that @sfernandez suggested before but on an older android device and that is the reason why it didn't work.
On a newer one works great.
If it is not a problem could you explain what is the difference between the system fonts and the fonts included in the project?
The main thing that I am interested in is what is the reason that sytsem fonts occupy less memory.
Re: System fonts in Android
Exactly, System fonts are not included in your application so the size of the redistributable is reduced. But you have the extra problem that depending on the operating system version the used system font may be available or not, so you need to use fallback fonts (as you are doing) to cover all cases.If it is not a problem could you explain what is the difference between the system fonts and the fonts included in the project?
The main thing that I am interested in is what is the reason that sytsem fonts occupy less memory.
Please, let me know if this answers your question.
Re: System fonts in Android
My concern was not about the application size but about the runtime memoery usage.
In the changelog you wrote "Support for system fonts. Improved memory usage of fonts." and my assumption was that this is an improvement of the runtime memory usage.
Have I misunderstand this?
In the changelog you wrote "Support for system fonts. Improved memory usage of fonts." and my assumption was that this is an improvement of the runtime memory usage.
Have I misunderstand this?
Re: System fonts in Android
Yes, 2.2 brings an improvement in memory usage when using local fonts (also system fonts but less).
Who is online
Users browsing this forum: Ahrefs [Bot] and 19 guests