Skip to content

Commit

Permalink
support lg
Browse files Browse the repository at this point in the history
  • Loading branch information
nongthaihoang committed Mar 27, 2020
1 parent ce39da2 commit dcb1fd4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Custom Font Installer
**Custom Font Installer for Android**

![version](https://img.shields.io/badge/Version-1.3-brightgreen.svg)
![updated](https://img.shields.io/badge/Updated-Mar_19,_2020-green.svg)
![version](https://img.shields.io/badge/Version-1.4-brightgreen.svg)
![updated](https://img.shields.io/badge/Updated-Mar_27,_2020-green.svg)
[![forum](https://img.shields.io/badge/Forum-XDA-orange.svg)](https://forum.xda-developers.com/apps/magisk/font-headline-fonts-nongthaihoang-t3886349)
[![download](https://img.shields.io/badge/Download-↓-yellow.svg)](https://github.com/nongthaihoang/custom_font_installer/releases)
[![donate](https://img.shields.io/badge/Donate-Paypal-blue.svg)](https://paypal.me/nongthaihoang)
Expand Down
28 changes: 27 additions & 1 deletion common/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,36 @@ miui() {
fi
}

lg() {
if i=$(grep lg-sans-serif $SYSXML); then
set BlackItalic Black BoldItalic Bold MediumItalic Medium Italic Regular LightItalic Light ThinItalic Thin
for i do
if [ -f $SYSFONT/$i.ttf ]; then
sed -i "/\"lg-sans-serif\">/,/family>/s/Roboto-$i/$i/" $SYSXML
fi
done
LG=true
fi
if [ -f $ORIGDIR/system/etc/fonts_lge.xml ]; then
cp $ORIGDIR/system/etc/fonts_lge.xml $SYSETC
LGXML=$SYSETC/fonts_lge.xml
set BlackItalic Black BoldItalic Bold MediumItalic Medium Italic Regular LightItalic Light ThinItalic Thin
for i do
if [ -f $SYSFONT/$i.ttf ]; then
sed -i "/\"default_roboto\">/,/family>/s/Roboto-$i/$i/" $LGXML
fi
done
LG=true
fi
if $LG; then sed -ie 3's/$/-lg&/' $MODPROP; fi
}

rom() {
pixel
if ! $PXL; then oxygen
if ! $OOS; then miui
if ! $MIUI; then lg
fi
fi
fi
}
Expand All @@ -141,7 +167,7 @@ mkdir -p $SYSFONT $SYSETC $PRDFONT
cp $FONTDIR/* $SYSFONT
patch

PXL=false; OOS=false; MIUI=false
PXL=false; OOS=false; MIUI=false; LG=false
rom

### CLEAN UP ###
Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=customfontinstaller
name=Custom Font Installer
version=v1.3
versionCode=13
version=v1.4
versionCode=14
author=nongthaihoang
description=Apply custom fonts the easy way
support=https://forum.xda-developers.com/apps/magisk/font-headline-fonts-nongthaihoang-t3886349

0 comments on commit dcb1fd4

Please sign in to comment.