forked from simonsmh/notocjk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
customize.sh
executable file
·106 lines (106 loc) · 51.5 KB
/
customize.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[ -x "$(which magisk)" ] && MIRRORPATH=$(magisk --path)/.magisk/mirror || unset MIRRORPATH
FILES="fonts.xml fonts_base.xml"
FILECUSTOM=fonts_customization.xml
FILEPATHS="/system/etc/ /system_ext/etc/"
for FILE in $FILES
do
for FILEPATH in $FILEPATHS
do
if [ $API -ge "26" ] && [ -f $MIRRORPATH$FILEPATH$FILE ]; then
ui_print "- Migrating $FILE"
case "$FILEPATH" in
/system/*) SYSTEMFILEPATH=$FILEPATH ;;
*) SYSTEMFILEPATH=/system$FILEPATH ;;
esac
mkdir -p $MODPATH$FILEPATH
cp -af $MIRRORPATH$FILEPATH$FILE $MODPATH$SYSTEMFILEPATH$FILE
# Disable MiSans for debugging
# sed -i '/<!-- # MIUI Edit Start -->/,/<!-- # MIUI Edit END -->/d;/<!-- MIUI fonts begin \/-->/,/<!-- MIUI fonts end \/-->/d;' $MODPATH$SYSTEMFILEPATH$FILE
# Disable OPlusSans for debugging
# sed -i '$!N;/<!-- [email protected], 2019-05-13 : Modified for SysSans fonts-->\n <!--/,/.*--> <!-- #else \/\* OPLUS_FEATURE_FONT_FLIP \*\/-->/{s/<!--.*-->//g;s/<!--//g;s/-->//g};P;D' $MODPATH$SYSTEMFILEPATH$FILE
sed -i 's/<axis tag="wght" stylevalue="100" \/>/<axis tag="wght" stylevalue="125" \/>/g
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i 's/<axis tag="wght" stylevalue="200" \/>/<axis tag="wght" stylevalue="225" \/>/g
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i 's/<axis tag="wght" stylevalue="300" \/>/<axis tag="wght" stylevalue="325" \/>/g
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i 's/<axis tag="wght" stylevalue="400" \/>/<axis tag="wght" stylevalue="425" \/>/g
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i 's/<axis tag="wght" stylevalue="500" \/>/<axis tag="wght" stylevalue="525" \/>/g
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i '
/<font weight=\"100\" style=\"italic\">/,/<\/family>/ {:a;N;/<\/family>/!ba;
s/<font weight=\"100\" style=\"italic\">.*<\/family>/<font weight="100" style="italic">Inter-Variable-Italic-edited.ttf\n<axis tag="ital" stylevalue="1" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<\/font>\n<font weight="200" style="italic">Inter-Variable-Italic-edited.ttf\n<axis tag="ital" stylevalue="1" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<\/font>\n<font weight="300" style="italic">Inter-Variable-Italic-edited.ttf\n<axis tag="ital" stylevalue="1" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<\/font>\n<font weight="400" style="italic">Inter-Variable-Italic-edited.ttf\n<axis tag="ital" stylevalue="1" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<\/font>\n<font weight="500" style="italic">Inter-Variable-Italic-edited.ttf\n<axis tag="ital" stylevalue="1" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<\/font>\n<font weight="600" style="italic">Inter-Variable-Italic-edited.ttf\n<axis tag="ital" stylevalue="1" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<\/font>\n<font weight="700" style="italic">Inter-Variable-Italic-edited.ttf\n<axis tag="ital" stylevalue="1" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<\/font>\n<font weight="800" style="italic">Inter-Variable-Italic-edited.ttf\n<axis tag="ital" stylevalue="1" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<\/font>\n<font weight="900" style="italic">Inter-Variable-Italic-edited.ttf\n<axis tag="ital" stylevalue="1" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<\/font>\n<\/family>/};
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i 's/<alias name="serif-bold" to="serif" weight="700" \/>/<alias name="serif-thin" to="serif" weight="100" \/>\n<alias name="serif-light" to="serif" weight="300" \/>\n<alias name="serif-medium" to="serif" weight="400" \/>\n<alias name="serif-semi-bold" to="serif" weight="500" \/>\n<alias name="serif-bold" to="serif" weight="700" \/>\n<alias name="serif-black" to="serif" weight="900" \/>/g
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i '
/<family lang=\"zh-Hans\">/,/<\/family>/ {:a;N;/<\/family>/!ba;
s/<family lang=\"zh-Hans\">.*Noto.*CJK.*<\/family>/<family lang="zh-Hans">\n<font weight="100" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<\/font>\n<\/family>\n<family lang="zh-Hans">\n<font weight="100" style="normal">ZhudouSansVF_edited.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_edited.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_edited.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_edited.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_edited.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_edited.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_edited.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_edited.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_edited.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<\/family>\n<family lang="zh-Hans">\n<font weight="100" style="normal" index="2" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="125" \/><\/font>\n<font weight="300" style="normal" index="2" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="2" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="2" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="2" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="2" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="2" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<font weight="200" style="normal" index="2" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="225" \/><\/font>\n<font weight="300" style="normal" index="2" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="2" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="2" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="2" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="2" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="2" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<\/family>\n<family lang="zh-Hans">\n<font weight="400" style="normal" index="2" postScriptName="NotoSansCJKjp-Regular">NotoSansCJK-Regular.ttc<\/font>\n<font weight="400" style="normal" index="2" fallbackFor="serif" postScriptName="NotoSerifCJKjp-Regular">NotoSerifCJK-Regular.ttc<\/font>\n<\/family>/};
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i '
/<family lang=\"zh-Hant\">/,/<\/family>/ {:a;N;/<\/family>/!ba;
s/<family lang=\"zh-Hant\">.*Noto.*CJK.*<\/family>/<family lang="zh-Hant">\n<font weight="100" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<\/font>\n<\/family>\n<family lang="zh-Hant">\n<font weight="100" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<\/family>\n<family lang="zh-Hant">\n<font weight="100" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="125" \/><\/font>\n<font weight="300" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<font weight="200" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="225" \/><\/font>\n<font weight="300" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<\/family>\n<family lang="zh-Hant">\n<font weight="400" style="normal" index="3" postScriptName="NotoSansCJKjp-Regular">NotoSansCJK-Regular.ttc<\/font>\n<font weight="400" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-Regular">NotoSerifCJK-Regular.ttc<\/font>\n<\/family>/};
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i '
/<family lang=\"zh-Bopo\">/,/<\/family>/ {:a;N;/<\/family>/!ba;
s/<family lang=\"zh-Bopo\">.*Noto.*CJK.*<\/family>/<family lang="zh-Bopo">\n<font weight="100" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<\/font>\n<\/family>\n<family lang="zh-Bopo">\n<font weight="100" style="normal">ZhudouSansVF_edited_ZHT.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_edited_ZHT.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_edited_ZHT.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_edited_ZHT.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_edited_ZHT.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_edited_ZHT.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_edited_ZHT.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_edited_ZHT.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_edited_ZHT.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<\/family>\n<family lang="zh-Bopo">\n<font weight="100" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="125" \/><\/font>\n<font weight="300" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<font weight="200" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="225" \/><\/font>\n<font weight="300" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<\/family>\n<family lang="zh-Bopo">\n<font weight="400" style="normal" index="3" postScriptName="NotoSansCJKjp-Regular">NotoSansCJK-Regular.ttc<\/font>\n<font weight="400" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-Regular">NotoSerifCJK-Regular.ttc<\/font>\n<\/family>/};
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i '
/<family lang=\"zh-Hant zh-Bopo\">/,/<\/family>/ {:a;N;/<\/family>/!ba;
s/<family lang=\"zh-Hant zh-Bopo\">.*Noto.*CJK.*<\/family>/<family lang="zh-Hant zh-Bopo">\n<font weight="100" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<\/font>\n<\/family>\n<family lang="zh-Hant zh-Bopo">\n<font weight="100" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<\/family>\n<family lang="zh-Hant zh-Bopo">\n<font weight="100" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="125" \/><\/font>\n<font weight="300" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<font weight="200" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="225" \/><\/font>\n<font weight="300" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<\/family>\n<family lang="zh-Hant zh-Bopo">\n<font weight="400" style="normal" index="3" postScriptName="NotoSansCJKjp-Regular">NotoSansCJK-Regular.ttc<\/font>\n<font weight="400" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-Regular">NotoSerifCJK-Regular.ttc<\/font>\n<\/family>/};
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i '
/<family lang=\"zh-Hant,zh-Bopo\">/,/<\/family>/ {:a;N;/<\/family>/!ba;
s/<family lang=\"zh-Hant,zh-Bopo\">.*Noto.*CJK.*<\/family>/<family lang="zh-Hant,zh-Bopo">\n<font weight="100" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<\/font>\n<\/family>\n<family lang="zh-Hant,zh-Bopo">\n<font weight="100" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_edited_ZHH.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<\/family>\n<family lang="zh-Hant,zh-Bopo">\n<font weight="100" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="125" \/><\/font>\n<font weight="300" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="3" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<font weight="200" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="225" \/><\/font>\n<font weight="300" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<\/family>\n<family lang="zh-Hant,zh-Bopo">\n<font weight="400" style="normal" index="3" postScriptName="NotoSansCJKjp-Regular">NotoSansCJK-Regular.ttc<\/font>\n<font weight="400" style="normal" index="3" fallbackFor="serif" postScriptName="NotoSerifCJKjp-Regular">NotoSerifCJK-Regular.ttc<\/font>\n<\/family>/};
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i '
/<family lang=\"ja\">/,/<\/family>/ {:a;N;/<\/family>/!ba;
s/<family lang=\"ja\">.*Noto.*CJK.*<\/family>/<family lang="ja">\n<font weight="100" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<\/font>\n<\/family>\n<family lang="ja">\n<font weight="100" style="normal">ZhudouSansVF_edited_JAN.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_edited_JAN.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_edited_JAN.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_edited_JAN.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_edited_JAN.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_edited_JAN.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_edited_JAN.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_edited_JAN.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_edited_JAN.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<\/family>\n<family lang="ja">\n<font weight="100" style="normal" index="0" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="125" \/><\/font>\n<font weight="300" style="normal" index="0" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="0" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="0" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="0" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="0" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="0" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<font weight="200" style="normal" index="0" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="225" \/><\/font>\n<font weight="300" style="normal" index="0" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="0" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="0" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="0" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="0" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="0" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<\/family>\n<family lang="ja">\n<font weight="400" style="normal" index="0" postScriptName="NotoSansCJKjp-Regular">NotoSansCJK-Regular.ttc<\/font>\n<font weight="400" style="normal" index="0" fallbackFor="serif" postScriptName="NotoSerifCJKjp-Regular">NotoSerifCJK-Regular.ttc<\/font>\n<\/family>/};
' $MODPATH$SYSTEMFILEPATH$FILE
sed -i '
/<family lang=\"ko\">/,/<\/family>/ {:a;N;/<\/family>/!ba;
s/<family lang=\"ko\">.*Noto.*CJK.*<\/family>/<family lang="ko">\n<font weight="100" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_JAN-quotation.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<\/font>\n<\/family>\n<family lang="ko">\n<font weight="100" style="normal">ZhudouSansVF_edited_KOR.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="125" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="200" style="normal">ZhudouSansVF_edited_KOR.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="225" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="300" style="normal">ZhudouSansVF_edited_KOR.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="325" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="400" style="normal">ZhudouSansVF_edited_KOR.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="425" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="500" style="normal">ZhudouSansVF_edited_KOR.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="525" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="600" style="normal">ZhudouSansVF_edited_KOR.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="600" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="700" style="normal">ZhudouSansVF_edited_KOR.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="700" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="800" style="normal">ZhudouSansVF_edited_KOR.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="800" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<font weight="900" style="normal">ZhudouSansVF_edited_KOR.ttf\n<axis tag="ital" stylevalue="0" \/>\n<axis tag="wdth" stylevalue="100" \/>\n<axis tag="wght" stylevalue="900" \/>\n<axis tag="halt" stylevalue="1" \/>\n<\/font>\n<\/family>\n<family lang="ko">\n<font weight="100" style="normal" index="1" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="125" \/><\/font>\n<font weight="300" style="normal" index="1" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="1" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="1" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="1" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="1" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="1" postScriptName="NotoSansCJKjp-Thin">NotoSansCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<font weight="200" style="normal" index="1" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="225" \/><\/font>\n<font weight="300" style="normal" index="1" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="325" \/><\/font>\n<font weight="400" style="normal" index="1" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="425" \/><\/font>\n<font weight="500" style="normal" index="1" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="525" \/><\/font>\n<font weight="600" style="normal" index="1" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="625" \/><\/font>\n<font weight="700" style="normal" index="1" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="725" \/><\/font>\n<font weight="900" style="normal" index="1" fallbackFor="serif" postScriptName="NotoSerifCJKjp-ExtraLight">NotoSerifCJK-VF.otf.ttc<axis tag="wght" stylevalue="900" \/><\/font>\n<\/family>\n<family lang="ko">\n<font weight="400" style="normal" index="1" postScriptName="NotoSansCJKjp-Regular">NotoSansCJK-Regular.ttc<\/font>\n<font weight="400" style="normal" index="1" fallbackFor="serif" postScriptName="NotoSerifCJKjp-Regular">NotoSerifCJK-Regular.ttc<\/font>\n<\/family>/};
' $MODPATH$SYSTEMFILEPATH$FILE
if [ ! $(cat $MODPATH$SYSTEMFILEPATH$FILE|grep DroidSansFallback.ttf) ]; then
sed -i 's/<\/familyset>/<family>\n<font weight="400" style="normal">DroidSansFallback.ttf<\/font>\n<\/family>\n<\/familyset>/g' $MODPATH$SYSTEMFILEPATH$FILE
fi
sed -i 's/<\/familyset>/<family>\n<font weight="400" style="normal">DroidSansFallbackFull.ttf<\/font>\n<\/family>\n<\/familyset>/g' $MODPATH$SYSTEMFILEPATH$FILE
fi
done
done
FILECUSTOM=fonts_customization.xml
FILECUSTOMPATH=/product/etc/
# magisk mirror compatbility
SYSTEMFILECUSTOMPATH=/system$FILECUSTOMPATH
if [ -f $MIRRORPATH$FILECUSTOMPATH$FILECUSTOM ]; then
ui_print "- Migrating $FILECUSTOM"
mkdir -p $MODPATH$SYSTEMFILECUSTOMPATH
if grep -q "google-sans" $MIRRORPATH$FILECUSTOMPATH$FILECUSTOM ; then
# Google Pixel's RRO
sed '
/<family customizationType=\"new-named-family\" name=\"google-sans-medium\">/,/<\/family>/ {/<\/family>/! d;
/<\/family>/ s/.*/ <alias name="google-sans-medium" to="google-sans" weight="500" \/>/};
/<family customizationType=\"new-named-family\" name=\"google-sans-bold\">/,/<\/family>/ {/<\/family>/! d;
/<\/family>/ s/.*/ <alias name="google-sans-bold" to="google-sans" weight="700" \/>/};
/<family customizationType=\"new-named-family\" name=\"google-sans-text-medium\">/,/<\/family>/ {/<\/family>/! d;
/<\/family>/ s/.*/ <alias name="google-sans-text-medium" to="google-sans-text" weight="500" \/>/};
/<family customizationType=\"new-named-family\" name=\"google-sans-text-bold\">/,/<\/family>/ {/<\/family>/! d;
/<\/family>/ s/.*/ <alias name="google-sans-text-bold" to="google-sans-text" weight="700" \/>/};
/<family customizationType=\"new-named-family\" name=\"google-sans-text-italic\">/,/<\/family>/ {/<\/family>/! d;
/<\/family>/ s/.*/ <alias name="google-sans-text-italic" to="google-sans-text" weight="400" style="italic" \/>/};
/<family customizationType=\"new-named-family\" name=\"google-sans-text-medium-italic\">/,/<\/family>/ {/<\/family>/! d;
/<\/family>/ s/.*/ <alias name="google-sans-text-medium-italic" to="google-sans-text" weight="500" style="italic" \/>/};
/<family customizationType=\"new-named-family\" name=\"google-sans-text-bold-italic\">/,/<\/family>/ {/<\/family>/! d;
/<\/family>/ s/.*/ <alias name="google-sans-text-bold-italic" to="google-sans-text" weight="700" style="italic" \/>/};
' $MIRRORPATH$FILECUSTOMPATH$FILECUSTOM > $MODPATH$SYSTEMFILECUSTOMPATH$FILECUSTOM
# else
# RRO oem fonts customization https://source.android.com/devices/automotive/hmi/car_ui/fonts
# TODO: pattern for general customizationType
# ui_print "================================="
# ui_print "! Please report your $FILECUSTOMPATH$FILECUSTOM."
# ui_print "================================="
fi
fi
ui_print "- Migration done."
rm $MODPATH/LICENSE* 2>/dev/null