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/dat