We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

Changing Android app fonts? [answered]

asked 2015-01-15 20:49:54 +0300

Kagerou gravatar image

updated 2015-01-21 10:41:49 +0300

eric gravatar image

The default Japanese font looks ugly and I've managed to change it (forgot exactly what I did), but the change isn't reflected in Android apps, which is where I really need it.

What determines which fonts are used by Android apps? One of the Android apps has an option to choose fonts and my new fonts aren't on that list (even though the OS uses them...).

Edit: could it be because of the system locale or something? If it's set to Chinese and the font renderer uses that information to render them then they would show up incorrectly. In that case, how could you change it?

edit: tl;dr this and my answer below: why do Android apps default to the fallback font (DoidSansFallback.ttf)? This applies at least for Chinese/Japanese/Korean text.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by eric
close date 2015-01-19 10:54:26.880104

1 Answer

Sort by » oldest newest most voted
0

answered 2015-01-15 23:11:09 +0300

Kagerou gravatar image

updated 2015-01-15 23:13:09 +0300

I fixed my own issue, but I don't really know the details on how and why the Android system chooses its fonts. It's also not the most beautiful fix, which probably means it's hugely super hacky and I hope someone shows how to do it properly (PLEASE).

What I did is kind of this: http://forum.xda-developers.com/showthread.php?t=1901424

Well, I did that but it didn't help. For some reason, changing the fallback XML files does bupkis, even with the appropriate fonts copied over.

The real key is that DroidSansFallback.ttf has Chinese-looking glyphs in it by design. And for some reason it looks like Android apps use that font, even though it should be the last resort.

So what I did was replace /system/fonts/DroidSansFallback.ttf with a better font. That fixed it. DroidSansJapanese is available in /usr/share/fonts so you can probably use that. I tried with MS Gothic and it works but its rendering on Jolla is not the pretties in the world.

The potential drawback is that you can't have good support for all CJK fonts because it just uses the fallback one. Again, I'm sure there's a better solution, but I don't know it.

Since I was reading a lot, here another somewhat relevant post: http://forum.xda-developers.com/google-nexus-5/themes-apps/font-japanese-unicode-fallback-han-t2777478

edit flag offensive delete publish link more

Question tools

Follow
1 follower

Stats

Asked: 2015-01-15 20:49:54 +0300

Seen: 913 times

Last updated: Jan 16 '15