Skip to content

Commit

Permalink
Fix font alias
Browse files Browse the repository at this point in the history
Destinations of font alias should always be lower-case
  • Loading branch information
JingMatrix committed Aug 7, 2023
1 parent 6ab20ab commit 783c8b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ fscan() {
}
for fontfile in *.*; do
ui_print "Add custom fonts $fontfile"
fscan -f '\t<family name="%{family[0]}">\n\t\t<font postScriptName="%{postscriptname}">%{file}</font>\n\t</family>\n' \
fscan -f '\t<family name="%{family[0]|downcase}">\n\t\t<font postScriptName="%{postscriptname}">%{file}</font>\n\t</family>\n' \
"$fontfile" >>$MODPATH/system/etc/fonts.xml
fscan -f "%{family}" "$fontfile" | grep ',' >/dev/null
if [ $? -eq 0 ]; then
fscan -f '\t<alias name="%{family[1]}" to="%{family[0]}" />\n'\
fscan -f '\t<alias name="%{family[1]}" to="%{family[0]|downcase}" />\n'\
"$fontfile" >>$MODPATH/system/etc/fonts.xml
fi
done
Expand Down

0 comments on commit 783c8b1

Please sign in to comment.