-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac90bf0
commit a22e03b
Showing
5 changed files
with
40 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
id=NotoNastaliqUrdu | ||
name=Noto Nastaliq Urdu | ||
version=2 | ||
versionCode=120 | ||
version=3.0 | ||
versionCode=300 | ||
author=Hassan-karim | ||
description=Noto Nastaliq Urdu Font for Urdu language | ||
minMagisk=20400 | ||
updateJson=https://raw.githubusercontent.com/Hassan-kareem/Nastaliq-Urdu_font/NotoNastaliqUrdu/update.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
#!/system/bin/sh | ||
|
||
# Define paths | ||
MODDIR=${0%/*} | ||
FONTS_XML_PATH="/system/etc/fonts.xml" | ||
FONT_FALLBACK_XML_PATH="/system/etc/font_fallback.xml" | ||
MODIFIED_FONTS_XML_PATH="$MODDIR/system/etc/fonts.xml" | ||
|
||
# Get Android API level | ||
MODIFIED_FONT_FALLBACK_XML_PATH="$MODDIR/system/etc/font_fallback.xml" | ||
APILEVEL=$(getprop ro.build.version.sdk) | ||
|
||
# Copy original fonts.xml to the MODDIR to overwrite dummy file | ||
mkdir -p "$MODDIR/system/etc" | ||
cp "$FONTS_XML_PATH" "$MODIFIED_FONTS_XML_PATH" | ||
|
||
# Function to add urdu family before ethi family | ||
add_ur_arab_family() { | ||
if [ "$APILEVEL" -ge 31 ]; then | ||
# Android 12 and later format | ||
if [ "$APILEVEL" -le 30 ]; then | ||
cp "$FONTS_XML_PATH" "$MODIFIED_FONTS_XML_PATH" | ||
sed -i '/<!-- fallback fonts -->/a \ | ||
<family lang="ur-Arab" variant="elegant"> \ | ||
<font weight="400" style="normal"> NotoNastaliqUrdu-Regular.ttf </font> \ | ||
<font weight="700" style="normal"> NotoNastaliqUrdu-Bold.ttf </font> \ | ||
</family>' "$MODIFIED_FONTS_XML_PATH" | ||
elif [ "$APILEVEL" -ge 31 ] && [ "$APILEVEL" -lt 34 ]; then | ||
cp "$FONTS_XML_PATH" "$MODIFIED_FONTS_XML_PATH" | ||
sed -i '/<family lang="und-Ethi">/i \ | ||
<family lang="ur-Arab" variant="elegant"> \ | ||
<font weight="400" style="normal" postScriptName="NotoNastaliqUrdu"> NotoNastaliqUrdu-Regular.ttf </font> \ | ||
<font weight="700" style="normal"> NotoNastaliqUrdu-Bold.ttf </font> \ | ||
</family>' "$MODIFIED_FONTS_XML_PATH" | ||
else | ||
# Android 11 and earlier format | ||
sed -i '/<!-- fallback fonts -->/a \ | ||
elif [ "$APILEVEL" -ge 34 ]; then | ||
cp "$FONT_FALLBACK_XML_PATH" "$MODIFIED_FONT_FALLBACK_XML_PATH" | ||
sed -i '/<family lang="und-Ethi">/i \ | ||
<family lang="ur-Arab" variant="elegant"> \ | ||
<font weight="400" style="normal"> NotoNastaliqUrdu-Regular.ttf </font> \ | ||
<font weight="400" style="normal" postScriptName="NotoNastaliqUrdu"> NotoNastaliqUrdu-Regular.ttf </font> \ | ||
<font weight="700" style="normal"> NotoNastaliqUrdu-Bold.ttf </font> \ | ||
</family>' "$MODIFIED_FONTS_XML_PATH" | ||
</family>' "$MODIFIED_FONT_FALLBACK_XML_PATH" | ||
else | ||
exit 1 | ||
fi | ||
} | ||
|
||
# Call the function to add the ur-Arab family language above Ethi | ||
add_ur_arab_family |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
I have a YouTube Channel! | ||
If you have any questions, use the following link to comment: | ||
|
||
https://www.youtube.com/@HassansTechInsights | ||
|
||
# v3.0 | ||
- Added support for Android 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"version": "3.0", | ||
"versionCode": 300, | ||
"zipUrl": "https://github.com/Hassan-kareem/Nastaliq-Urdu_font/releases/download/NotoNastaliq-v3.0/NotoNastaliqUrdu-v3.0.zip", | ||
"changelog": "https://raw.githubusercontent.com/Hassan-kareem/Nastaliq-Urdu_font/NotoNastaliqUrdu/changelog.md" | ||
} |