My Android application needs support in different languages ββ(for example, in Chinese, etc.). Most of them are in Ascender's DroidSansFallback.ttf file.
See https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts
Some Android phones have DroidSansFallback.ttf, but with the lack of many glyphs, for example. on NexusOne, which is distributed in the United States. Symbols of Asian fonts are generally absent, mainly only Latin and related characters.
So what to do?
I added my own copy of DroidSansFallback.ttf to the βassetsβ (I also tried other fonts from other sources) and installed it at runtime using the Typeface class.
With some phones and some .ttf files, font rendering completely freezes, meaning that letters are only a few dots on one line.
After a deeper analysis, the problem boils down to the following:
- Small .ttf files seem to always work (<200kB)
- Large .ttf files do not work at all (> 3MB)
- If the phone has the full DroidSansFallback.ttf (which is ~ 3.5 MB) installed, it even makes noise 1 or 2 MB. If your phone has only the "lite" version of DroidSansDallback.ttf (which is ~ 1 MB) installed, a 3 MB font works fine.
What is wrong here? Am I missing something? It seems that all installed / used fonts together cannot be larger than some ~ 4 MB characters.
Has anyone had the same problem? I tried this on NexusOne (2.1), HTC Hero (2.1), SonyEricson Xperia (1.6) and Motorola MileStone (2.0), all showing the same behavior.
Thanks for any tips.
source share