如何增加onlyOffice的字体?

Linux基础

1 前言

一个问题,一篇文章,一出故事。
笔者使用onlyOffice被要求用户添加新字体,于是本文产生。

2 最佳实践

2.1 基础环境

如果你没有测试环境,请先按如下章节部署onlyOffice环境,

如何部署onlyOffice documentServer?

2.2 安装字体相关包

yum install -y fontconfig ttmkfdir

注:ttmkfdir用于搜索目录字体信息并汇总生成fonts.scale文件

2.3 确认字体配置目录

grep "/usr/share/fonts" /etc/fonts/fonts.conf

确保包含如下配置,

<dir>/usr/share/fonts</dir>

2.4 上传字体

mkdir -p /usr/share/fonts/windows
chmod 755 /usr/share/fonts/windows
cp *.{ttf,TTF} /usr/share/fonts/windows
chmod 644 /usr/share/fonts/windows/*.{ttf,TTF}

2.5 刷新系统字体缓存

fc-cache -f -v

2.6 刷新onlyoffice字体库

/usr/bin/documentserver-generate-allfonts.sh

参阅文档
=====================
https://helpcenter.onlyoffice.com/installation/docs-community-install-fonts-linux.aspx

没有评论

发表回复

Linux基础
如何熟悉Linux的PAM模块

1 PAM的简介 1.1 PAM的概念 – PAM即Pluggable Authenti …

Linux基础
如何配置RHEL 8.x OpenSSH客户端登录自动过期?

1 前言 一个问题,一篇文章,一出故事。 基于服务器安全,笔者需要让OpenSSH客户端在10分钟内 …

Linux基础
如何安装部署SentinelOne EDR?

1 基础知识 1.1 软件公司介绍 SentinelOne,Inc.是一家在纽约证券交易所上市的美国 …