1 创建字体目录,并将windows中C:\Windows\Fonts\ 所有字体拖拽到这个目录下
mkdir -p /confluence/confluence_home/fonts
2 修改setenv.sh找到CATALINA_OPTS并添加一行
vim /confluence/confluence_home/bin/setenv.sh CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/confluence/confluence_home/fonts/ ${CATALINA_OPTS}"
3 备份并清空缓存目录,不清空的话, confluence预览旧文件时还是会显示方框,只有新文件才会正常
/viewfile/<br> /thumbnails/<br> /shared-home/dcl-document/<br> /shared-home/dcl-document_hd/<br> /shared-home/dcl-thumbnail/
4 重启confluence即可
参考:https://confluence.atlassian.com/confkb/the-text-in-a-powerpoint-excel-or-word-document-looks-different-when-using-the-viewfile-macro-200213562.html