Current location - Health Preservation Learning Network - Healthy weight loss - How to solve the garbled document imported by ONLYOFFICE?
How to solve the garbled document imported by ONLYOFFICE?
First ubuntu installs Chinese fonts.

The fonts of XP are stored in the c:/windows/fonts directory, and we copy our favorite fonts, such as simsun.ttc, simkai.ttf, simhei.ttf, simfang.ttf and so on. Copy these font files to Ubuntu's /usr/share/fonts/xpfonts directory.

Note: If you find it impossible to create a new folder under /usr/share/fonts/, please log in as root.

Sudo apt-get installs xfonts-utils.

Open a terminal and run the following command line to establish font cache information:

cd xpfonts

sudo mkfontscale

sudo mkfontdir

Sudo apt-get installs fontconfig.

sudo fc-cache -fv

After the command is successfully executed, the terminal will display:

Fc-cache: success

Then sudo su-

CD/usr/share/font

tar cv * | docker exec-I only office-document-server tar x-C/usr/share/fonts/

docker exec only office-document-server documentserver-generate-all fonts . sh

Then clear the cache browser and log in again.

Source:/onlyoffice/documentserver/issues/7