docker 添加字體
一、安裝 Arial 字體
-
安裝
fontconfig$ RUN apt-get update && apt-get install -y fontconfig -
獲取字體
-
拷貝
Arial字體$ COPY Apricot.AspNetCore.WebApi/fonts /usr/share/fonts/1、字體截圖

-
刷新字體
$ RUN fc-cache -f -v /usr/share/fonts/ -
使用
using Font font = new Font("Arial", 18, FontStyle.Regular);
如有幫助,歡迎轉載,轉載請注明原文鏈接:http://www.rzrgm.cn/study10000/p/18297817

浙公網安備 33010602011771號