Skip to content

Instantly share code, notes, and snippets.

@MrCarb0n
Last active May 24, 2022 11:24
Show Gist options
  • Select an option

  • Save MrCarb0n/41df3bda73492498e3c17de6a3284a7f to your computer and use it in GitHub Desktop.

Select an option

Save MrCarb0n/41df3bda73492498e3c17de6a3284a7f to your computer and use it in GitHub Desktop.
NotoEmojiPlus extension dev script for OMF!
# NotoEmojiPlus OMF Extension | @MrCarb0n
# Don't modify file or filename: 88_NotoEmojiPlus.sh
# Style: Google, Unicode 15
# Resources: @rkbdiemoji
# Thanks: @nongthaihoang, MFFM!
${EMOJ:=false} && return
EXT="$OMFDIR/88_NotoEmojiPlus.sh"
tail -n +$(($(grep -an ^'# RESOURCE'$ $EXT | cut -d : -f 1) + 1)) $EXT |
tar xJf - -C $SYSFONT && {
ui_print ' NotoEmojiPlus v2022.5.8'
font und-Zsye NotoEmojiPlus.ttf r
font und-Zsym NotoSansSymbols-RS2.ttf r
xml 's|Regular-Subsetted|RS|'
# create shortcut as OEM's emoji filename
for i in $(find $ORISYSFONT -type f -iname '*emoji*.[ot]t[fc]' -exec basename {} \;); do
ln -s $SYSFONT/NotoEmojiPlus.ttf $SYSFONT/$i
done
# change possible in-app's emoji
for i in $(find /data/data -type f -iname '*emoji*.[ot]t[fc]'); do
# mkdir -p $MODPATH$(dirname $i)
# cp $SYSFONT/NotoEmojiPlus.ttf $MODPATH$i
cp $SYSFONT/NotoEmojiPlus.ttf $i
done
# clear cache data of Gboard
[ -d /data/data/com.google.android.inputmethod.latin ] &&
find /data -type d -path '*inputmethod.latin*/*cache*' -exec rm -rf {} + &&
/system/bin/am force-stop com.google.android.inputmethod.latin
# Android 12+ | extended checking.. [?!]
[ -d /data/fonts ] &&
for i in $(find /data/fonts -type f -iname '*emoji*.[ot]t[fc]'); do
cp $SYSFONT/NotoEmojiPlus.ttf $i
done
EMOJ=true
ver emoji
} &&
return
# RESOURCE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment