commit 18e81d8a8a2babae117e290c7e7302945e259d8e Author: Breizh Date: Fri Jan 13 18:04:36 2023 +0100 Création d’un script de remplacement des polices diff --git a/replacefonts.sh b/replacefonts.sh new file mode 100644 index 0000000..d08ff8a --- /dev/null +++ b/replacefonts.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +mount -o rw,remount / + +for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Sans*/*.ttf +do + dir="$(dirname "$font")" + file="$(basename "$font")" + dest="${file//IBMPlexSansCondensed/RobotoCondensed}" + dest="${dest//IBMPlexSans/NotoSans}" + + echo "$file -> $dest" + cp "$dir/$file" "/system/fonts/$dest" + chmod 644 "/system/fonts/$dest" +done + +for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Sans/*.ttf +do + dir="$(dirname "$font")" + file="$(basename "$font")" + dest="${file//IBMPlexSans/Roboto}" + + echo "$file -> $dest" + cp "$dir/$file" "/system/fonts/$dest" + chmod 644 "/system/fonts/$dest" +done + +for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Sans/IBMPlexSans-Bold*.ttf +do + dir="$(dirname "$font")" + file="$(basename "$font")" + dest="${file//IBMPlexSans-Bold/Roboto-Black}" + + echo "$file -> $dest" + cp "$dir/$file" "/system/fonts/$dest" + chmod 644 "/system/fonts/$dest" +done + +for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Serif*/*.ttf +do + dir="$(dirname "$font")" + file="$(basename "$font")" + dest="${file//IBMPlexSerif/NotoSerif}" + + echo "$file -> $dest" + cp "$dir/$file" "/system/fonts/$dest" + chmod 644 "/system/fonts/$dest" +done + +for font in /sdcard/Download/TrueType/TrueType/IBM-Plex-Mono/*.ttf +do + dir="$(dirname "$font")" + file="$(basename "$font")" + dest="${file//IBMPlexMono/SourceSansPro}" + + echo "$file -> $dest" + cp "$dir/$file" "/system/fonts/$dest" + chmod 644 "/system/fonts/$dest" +done + +#reboot +