From 3f0c9fcadb09f7ec957fb381a184e3981bdca6d5 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Tue, 10 Apr 2018 20:03:50 +0200 Subject: [PATCH] CommonAddon: support NanoDroid-Font --- CommonAddon | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CommonAddon b/CommonAddon index ace7989..8d7f52a 100644 --- a/CommonAddon +++ b/CommonAddon @@ -56,7 +56,16 @@ case "${1}" in # Stub ;; post-restore) - # Stub + if test -h /system/fonts/Roboto-Regular.ttf; then + CUSTOM_FONT="$(basename $(readlink /system/fonts/Roboto-Regular.ttf) .ttf)" + ui_print " << ${MODID} addon.d: detected NanoDroid-Font (${CUSTOM_FONT})" + + if [ -f /system/xbin/nanodroid-font ]; then + /system/xbin/nanodroid-font -s "${CUSTOM_FONT}" + elif [ -f /system/bin/nanodroid-font ]; then + /system/bin/nanodroid-font -s "${CUSTOM_FONT}" + fi + fi ;; esac