1:Copy 自己添加的字体库文件(后缀是.ttf)到目录 frameworks/base/data/fonts
2:Modify framworks/base/data/fonts/Android.mk
font_src_files := \
- AndroidClock.ttf
+ AndroidClock.ttf \
+ HarmonyOS_Sans_SC_Regular.ttf \
+ HarmonyOS_Sans_SC_Bold.ttf \
+ Barlow-SemiBold.ttf \
+ Barlow-Medium.ttf \
3:Modify frameworks/base/data/fonts/fonts.mk
+++ b/data/fonts/fonts.mk
@@ -17,4 +17,8 @@
PRODUCT_PACKAGES := \
DroidSansMono.ttf \
AndroidClock.ttf \
+ HarmonyOS_Sans_SC_Regular.ttf \
+ HarmonyOS_Sans_SC_Bold.ttf \
+ Barlow-SemiBold.ttf \
+ Barlow-Medium.ttf \
fonts.xml
4:Modify frameworks/base/data/fonts/fonts.xml
--- a/data/fonts/fonts.xml
+++ b/data/fonts/fonts.xml
@@ -35,6 +35,21 @@
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)