Closed anonymousgregory closed 2 years ago
不好意思,我们没有Pixel测试机,可以麻烦你把fonts_customization.xml
放上来并且附上几张截图吗?
可以用 alias 重新導向字體
<alias name="google-sans-medium" to="google-sans" weight="500" />
<alias name="google-sans-bold" to="google-sans" weight="700" />
<alias name="google-sans-text-medium" to="google-sans-text" weight="500" />
<alias name="google-sans-text-bold" to="google-sans-text" weight="700" />
<alias name="google-sans-text-italic" to="google-sans-text" weight="400" style="italic" />
<alias name="google-sans-text-italic-medium" to="google-sans-text" weight="500" style="italic" />
<alias name="google-sans-text-italic-bold" to="google-sans-text" weight="700" style="italic" />
這件事情在 Google Issue Tracker 上也被提及了兩次,但是是以不同的敘述方式
錯誤更正:
<alias name="google-sans-text-medium-italic" to="google-sans-text" weight="500" style="italic" />
<alias name="google-sans-text-bold-italic" to="google-sans-text" weight="700" style="italic" />
我觉得Google的操作有些迷惑,为什么不是写alias而是重新写一遍family
抱歉,忘了說 fonts_customization.xml
的位置在 /system/product/etc/fonts_customization.xml
除此之外應該是可以運作了
先试试看: ~Fix Google Sans fallback · simonsmh/notocjk@0bb3210~ Fix Google Sans fallback · simonsmh/notocjk@7d3b473
测试后无效,但根据前面的思路之前替换fonts_customization.xml是ok的。
抱歉,忘了說
fonts_customization.xml
的位置在/system/product/etc/fonts_customization.xml
除此之外應該是可以運作了
不好意思,我之前按着AOSP文档猜的,等一下我修改一下
@RodertHaung @Gregoryweix Fix path of customization · simonsmh/notocjk@04a684d
@RodertHaung @Gregoryweix Fix path of customization · simonsmh/notocjk@04a684d
还是不行,刷入后查看fonts_customization并没有加入这些alias
@RodertHaung @Gregoryweix Fix path of customization · simonsmh/notocjk@04a684d
另外,最后两个familiy name 和alias name应该错了,是medium-italic 和bold-italic
在 /data/adb/modules/notocjk/system
目錄下沒有 /product/etc/fonts_customization
檔案。
/<family customizationType=\"new-named-family\" name=\"google-sans-text-italic-medium\">/,/<\/family>/ {/<\/family>/! d; /<\/family>/ s/.*/ <alias name="google-sans-text-italic-medium" to="google-sans-text" weight="500" style="italic" \/>/}; /<family customizationType=\"new-named-family\" name=\"google-sans-text-italic-bold\">/,/<\/family>/ {/<\/family>/! d; /<\/family>/ s/.*/ <alias name="google-sans-text-italic-bold" to="google-sans-text" weight="700" style="italic" \/>/};
除了这个medium和bold斜体写反了的问题,其他应该都ok了,新fonts_customization.xml附上,这一段没起作用。
fonts_customization.txt
cc @simonsmh e63d805
fonts_customization.xml
的原文件路径不对。
MIRRORPATH/system/product/etc/fonts_customization.xml
这个路径我测试是修改之后的文件
正确的应该是MIRRORPATH/product/etc/fonts_customization.xml
以及49行应该是ui_print "- Migrating $FILECUSTOM"
fonts_customization.xml
的原文件路径不对。MIRRORPATH/system/product/etc/fonts_customization.xml
这个路径我测试是修改之后的文件 正确的应该是MIRRORPATH/product/etc/fonts_customization.xml
以及49行应该是ui_print "- Migrating $FILECUSTOM"
不好意思,我没有测试机,添麻烦了
所以正确的路径应该是 /product/etc/fonts_customization.xml
对吗?
是的
复制之后/data/adb/modules/notocjk/system/product/etc/fonts_customization.xml
这个是对的
有软连接吧
有软连接吧
/dev/xxx/.magisk/mirror/system/product
软链接是指向/product
的而不是/dev/xxx/.magisk/mirror/product
cp -af $MIRRORPATH/product/etc/fonts_customization.xml $MODPATH/system/product/etc/fonts_customization.xml
可能我没有表达清楚,51行正确路径的应该是这样的,后者需要放到system里才会生效。
包括通知,磁贴,pixel launcher等,应该是fonts_customization.xml的问题?