mirror of https://gitlab.com/Nanolx/NanoDroid
CommonInstaller: better ROM/device compat; drop nanodroid-font
parent
c9b8090722
commit
f9c1394bab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,130 +0,0 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
export NO_MAGISK=0
|
||||
export MODPATH=@MODPATH@
|
||||
|
||||
if [ -z "${MODPATH}" ]; then
|
||||
OVERLAY_PATH="/system/fonts"
|
||||
NO_MAGISK=1
|
||||
elif [ -d "${MODPATH}" ]; then
|
||||
OVERLAY_PATH="${MODPATH}/system/fonts"
|
||||
else
|
||||
echo "couldn't find NanoDroid!"
|
||||
exit 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
|
||||
}
|
||||
|
||||
backup_font () {
|
||||
if [ ! -d /system/fonts/Original ]; then
|
||||
echo "Backup original Fonts"
|
||||
mkdir -p /system/fonts/Original
|
||||
|
||||
for font in ${FONTFILES}; do
|
||||
cp /system/fonts/${font} /system/fonts/Original/
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
reset_font () {
|
||||
echo "Restoring original Font"
|
||||
|
||||
if [ ${NO_MAGISK} -eq 0 ]; then
|
||||
for font in ${FONTFILES}; do
|
||||
rm -f ${FONTPATH}/${font}
|
||||
done
|
||||
else
|
||||
for font in ${FONTFILES}; do
|
||||
cp /system/fonts/Original/${font} /system/fonts/
|
||||
done
|
||||
|
||||
rm -rf /system/fonts/Original
|
||||
fi
|
||||
}
|
||||
|
||||
set_font () {
|
||||
echo "Setting Font ${1}"
|
||||
|
||||
if [ ${NO_MAGISK} -eq 0 ]; then
|
||||
if [ -f ${OVERLAY_PATH}/NanoDroid/${1}.ttf ]; then
|
||||
for font in ${FONTFILES}; do
|
||||
ln -sf ${FONTPATH}/NanoDroid/${1}.ttf \
|
||||
${OVERLAY_PATH}/${font} || \
|
||||
error "Failed to apply Font ${1}"
|
||||
done
|
||||
else
|
||||
error "Font ${1} does not exist"
|
||||
fi
|
||||
else
|
||||
if [ -f /system/fonts/NanoDroid/${1}.ttf ]; then
|
||||
backup_font
|
||||
|
||||
for font in ${FONTFILES}; do
|
||||
ln -sf /system/fonts/NanoDroid/${1}.ttf \
|
||||
/system/fonts/${font} || \
|
||||
error "Failed to apply Font ${1}"
|
||||
done
|
||||
else
|
||||
error "Font ${1} does not exist"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Reboot to apply Font"
|
||||
}
|
||||
|
||||
[[ $(whoami) != "root" ]] && error "not running as root"
|
||||
|
||||
case ${1} in
|
||||
-s | --set )
|
||||
set_font "${2}"
|
||||
;;
|
||||
|
||||
-r | --reset )
|
||||
reset_font
|
||||
;;
|
||||
|
||||
* )
|
||||
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
|
||||
Splatoon Splatoon Game Font
|
||||
Splatoon2 Splatoon2 Game Font
|
||||
SuperMario Super Mario (World) Game Font
|
||||
SuperMarioMaker Super Mario Maker Game Font
|
||||
SuperMarioOdyssey Super Mario Odyssey Game Font"
|
||||
;;
|
||||
esac
|
@ -1,3 +0,0 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
nanodroid-font "${@}"
|
@ -1,38 +0,0 @@
|
||||
# NanoDroid-Font Script
|
||||
|
||||
## Purpose
|
||||
|
||||
The `nanodroid-font` Script, respectively it's shortcut `nfnt` is used to change the System UI font (reboot required to take effect)
|
||||
|
||||
## Invocation
|
||||
|
||||
From within a terminal on your device, for example `adb shell` or `Termux` invoke the script using either
|
||||
|
||||
`nanodroid-font [switch] [font]`
|
||||
|
||||
or
|
||||
|
||||
`nfnt [switch] [parameter]`
|
||||
|
||||
## Overview
|
||||
|
||||
`s`, `--set` [font]
|
||||
|
||||
set System UI font to [font], which is one of
|
||||
|
||||
* FAST FAST RMX Game Font
|
||||
* NintendoLabo NintendoLabo Logo/Packaging Font
|
||||
* NintendoSwitch NintendoSwitch OS Font
|
||||
* Splatoon Splatoon Game Font
|
||||
* Splatoon2 Splatoon2 Game Font
|
||||
* SuperMario Super Mario (World) Game Font
|
||||
* SuperMarioMaker Super Mario Maker Game Font
|
||||
* SuperMarioOdyssey Super Mario Odyssey Game Font
|
||||
|
||||
`r`, `--reset`
|
||||
|
||||
reset to original font
|
||||
|
||||
## Credits
|
||||
|
||||
All fonts taken from http://downloads.paperyoshi.at/
|
Loading…
Reference in New Issue