2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-11-02 03:40:13 +00:00

add NanoDroid Fonts

This commit is contained in:
Christopher Roy Bratusek 2018-03-17 14:14:30 +01:00
parent 6710f741c9
commit 0a7a3d579e
8 changed files with 90 additions and 0 deletions

87
Full/system/bin/nanodroid-font Executable file
View File

@ -0,0 +1,87 @@
#!/system/bin/sh
export NO_MAGISK=0
export MODPATH=@MODPATH@
if [[ -d /dev/tmp/magisk_img/$(basename ${MODPATH}) ]]; then
OVERLAY_PATH=/dev/tmp/magisk_img/$(basename ${MODPATH})
elif [[ -d /dev/tmp/magisk_merge_img/$(basename ${MODPATH}) ]]; then
OVERLAY_PATH=/dev/tmp/magisk_merge_img/$(basename ${MODPATH})
else
OVERLAY_PATH=${MODPATH}
[[ "${MODPATH}" != "/sbin/.core/"* ]] && NO_MAGISK=1
fi
FONTPATH=${MODPATH}/system/fonts
FONTFILES="Roboto-BlackItalic.ttf
Roboto-Black.ttf
Roboto-BoldItalic.ttf
Roboto-Bold.ttf
RobotoCondensed-BoldItalic.ttf
RobotoCondensed-Bold.ttf
RobotoCondensed-Italic.ttf
RobotoCondensed-LightItalic.ttf
RobotoCondensed-Light.ttf
RobotoCondensed-Regular.ttf
Roboto-Italic.ttf
Roboto-LightItalic.ttf
Roboto-Light.ttf
Roboto-MediumItalic.ttf
Roboto-Medium.ttf
Roboto-Regular.ttf
Roboto-ThinItalic.ttf
Roboto-Thin.ttf"
error () {
echo "!! ${@}"
exit 1
}
[[ $(whoami) != "root" ]] && error "not running as root"
if [[ ${NO_MAGISK} -eq 0 ]]; then
case ${1} in
-s | --set )
if [ -f ${FONTPATH}/NanoDroid/${2}.ttf ]; then
echo "Setting Font ${2}"
for font in ${FONTNAMES}; do
ln -sf ${FONTPATH}/NanoDroid/${2}.ttf ${FONTPATH}/${font} || \
error "Failed to apply Font ${2}"
done
else
error "Font ${2} does not exist"
fi
;;
-r | --reset )
echo "Restoring original Font"
for font in ${FONTNAMES}; do
rm -f ${FONTPATH}/${font}
done
;;
* )
echo "nanodroid-font
Change System font
Usage: nanodroid-font [opt] [font]
where [opt] can be:
-s, --set [font] set Font
-r, --reset restore Original Font
where [font] can be:
FAST FAST RMX Game Font
NintendoLabo NintendoLabo Logo/Packaging Font
NintendoSwitch NintendoSwitch OS Font
Splatoon2 Splatoon2 Game Font
SuperMarioMaker Super Mario Maker Game Font
Super Mario Super Mario (World) Game Font"
;;
esac
else
error "*** Resetprop feature is not available in System Mode! ***"
fi

3
Full/system/bin/nfnt Executable file
View File

@ -0,0 +1,3 @@
#!/system/bin/sh
nanodroid-font "${@}"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.