Onlyoffice font modification complete process

        Recently, I searched for onlyoffice font modification methods through Du Niang. The modification methods of other authors are not what I want. Today I will bring you my own summary method.

        1. First start the onlyoffice container and enter the container

docker exec -it <ID> /bin/bash

        2. Next, enter the font folder in the container, and delete all system fonts and fonts that come with onlyoffice

        Tip: Skip this step if you don’t need to delete

#进入系统字体文件夹
cd /usr/share/fonts

#删除字体(这里可能报错文件夹不能删除,忽略即可)
rm -rf *

#进入onlyoffice字体文件夹
cd /var/www/onlyoffice/documentserver/core-fonts

#删除字体
rm -rf *

        3. Exit the container, copy the font you want to add (it can be a folder) to the system font folder in the container

docker cp <你的字体文件> <容器id>:/usr/share/fonts/truetype/custom

        4. Enter the container again, enter the specified folder and execute the following command to make the newly added font take effect.

#进入文件夹
cd /usr/bin

#执行sh文件,使其新增的字体生效
./documentserver-generate-allfonts.sh

        At this point, all the operations of adding new fonts and deleting old fonts are completed.

If the joint debugging test can be carried out with the front-end project, you need to clear the cache of the browser. After clearing the cache, there will be no old fonts, and the new fonts will also take effect. .

The final effect is as follows:

        The above is the entire content of this sharing, if there is anything wrong, please correct me o(* ̄▽ ̄*)ブ

 

Guess you like

Origin blog.csdn.net/guo0208/article/details/128980837