DesireHDの標準のフォントに特に不満を持っていなかったのだけれども、先日試しにNasuフォントを導入してみた。
Nasuフォント : 見た目が似ている文字を判別しやすくするフリーフォント - itouhiroはてなブログ
基本的には、fonts.xmlとfallback_fonts.xmlを書き換えて、フォントをpushする。
このとき、/systemがroなので、rwへremountしておかないといけない。
su
mount -o rw,remount -t ext4 /dev/block/platform/msm_sdcc.2/by-name/system /system
あとは、adbでpushしてからrebootすれば置き換わる。
adb push update/system/etc/fallback_fonts.xml /system/etc/fallback_fonts.xml
adb push update/system/etc/fonts.xml /system/etc/fonts.xml
adb push update/system/fonts/Nasu-Regular.ttf /system/fonts/
fonts.xmlは該当エントリのフォントを変更するだけ。
% diff -u fonts.xml.orig fonts.xml
--- fonts.xml.orig 2015-09-19 12:51:02.658045246 +0900
+++ fonts.xml 2015-09-19 13:53:37.371494962 +0900
@@ -309,7 +309,7 @@
<font weight="400" style="normal">NotoSansHant-Regular.otf</font>
</family>
<family lang="ja">
- <font weight="400" style="normal">NotoSansJP-Regular.otf</font>
+ <font weight="400" style="normal">Nasu-Regular.ttf</font>
</family>
<family lang="ko">
<font weight="400" style="normal">NotoSansKR-Regular.otf</font>
fallback_fonts.xmlも同様に変更しておく。
% diff -u fallback_fonts.xml.orig fallback_fonts.xml
--- fallback_fonts.xml.orig 2015-09-19 12:56:50.494825355 +0900
+++ fallback_fonts.xml 2015-09-19 13:54:01.747787026 +0900
@@ -370,7 +370,7 @@
</family>
<family>
<fileset>
- <file lang="ja">NotoSansJP-Regular.otf</file>
+ <file lang="ja">Nasu-Regular.ttf</file>
</fileset>
</family>
<family>
ROMを焼くたびに再度置き換えるのは面倒なので、その場合にはZIPmeを使う。
ZIPmeでupdate.zipを作成すると、ROMを焼いたあと追加でリカバリから適用するだけでよい。
ZIPme - Google Play の Android アプリ