- 背景 安装了geoserver 然后geoserver中需要用到微软雅黑字体 所以需要安装一下
- Linux系统安装Windows中的字体
- 创建字体目录
cd /usr/share/fonts/
mkdir winfont
- 在Windows找到对应字体
C:\Windows\Fonts
复制该字体到桌面
- Linux系统中上传字体
root@test-server03:/usr/share/fonts# ll winfont/
total 47636
-rw-r--r-- 1 root root 16880832 Sep 6 11:02 MSYHBD.TTC
-rw-r--r-- 1 root root 12183612 Sep 6 11:02 MSYHL.TTC
-rw-r--r-- 1 root root 19701556 Sep 6 11:02 MSYH.TTC
#复制到桌面会有三个字体
- 刷新字体
root@test-server03:/usr/share/fonts/winfont# fc-cache
root@test-server03:/usr/share/fonts/winfont# fc-list :lang=zh
/usr/share/fonts/winfont/MSYHBD.TTC: Microsoft YaHei,微软雅黑:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
/usr/share/fonts/winfont/MSYHL.TTC: Microsoft YaHei,微软雅黑,Microsoft YaHei Light,微软雅黑 Light:style=Light,Regular
/usr/share/fonts/winfont/MSYHBD.TTC: Microsoft YaHei UI:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
/usr/share/fonts/winfont/MSYH.TTC: Microsoft YaHei UI:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/winfont/MSYHL.TTC: Microsoft YaHei UI,Microsoft YaHei UI Light:style=Light,Regular
/usr/share/fonts/winfont/MSYH.TTC: Microsoft YaHei,微软雅黑:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
成功安装了微软雅黑的字体、重启geoserver就行了