[GH-ISSUE #746] Can't add fonts correctly #335

Closed
opened 2026-02-26 10:31:56 +03:00 by kerem · 6 comments
Owner

Originally created by @Lakhtion on GitHub (Jun 17, 2024).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/746

I have documentsserver in conjunction with nextcloud.
I mounted it in compose:

  • /media/onlyoffice_documentserver/fonts:/usr/share/fonts

By default, for some reason, I do not have the most standard fonts, for example calibri, arial, times new roman. Is this like this for everyone? I need fonts with Cyrillic support.
What’s surprising is that even if I don’t have the choice of the font I need in the documentserver, it is displayed when I open the document (if it was already there in any text) and I can print on it. Moreover, I can select a font that is not in the list by entering it manually. I get a warning, but everything works.
Next I follow the instructions https://helpcenter.onlyoffice.com/ru/installation/docs-community-install-fonts-linux.aspx
On the host, I upload calibri fonts (pulled out of Windows) in the amount of 6 files into /media/onlyoffice_documentserver/fonts, execute documentsserver-generate-allfonts.sh inside the container - no errors occur, everything is ok.
When I open a document, I see crooked characters on any layout. The font itself appears, but when you try to select a font, some other one is selected, and the characters are displayed crookedly in any language. Firefox browser, clearing cache does not help. Newly installed Chrome on Windows also has crooked symbols.
At the same time, everything is displayed correctly through the Yandex browser. Through Firefox on Ubuntu, everything is also displayed correctly. Through the Onlyoffice application on Android, everything is also displayed as it should. And through the nextcloud application and through the Firefox browser on Android, I again see crooked characters. I tried deleting the cache of firefox, nextcloud, android web view - it did not help. It seems that the problem is still in the onlyoffice instance.
Please help. I saw similar topics, but a simple cache clearing helped everywhere. No to me.
Documentserver version 8.0.1.31, host - debian 11 (openmediavault), docker 26.1.4

Originally created by @Lakhtion on GitHub (Jun 17, 2024). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/746 I have documentsserver in conjunction with nextcloud. I mounted it in compose: - /media/onlyoffice_documentserver/fonts:/usr/share/fonts By default, for some reason, I do not have the most standard fonts, for example calibri, arial, times new roman. Is this like this for everyone? I need fonts with Cyrillic support. What’s surprising is that even if I don’t have the choice of the font I need in the documentserver, it is displayed when I open the document (if it was already there in any text) and I can print on it. Moreover, I can select a font that is not in the list by entering it manually. I get a warning, but everything works. Next I follow the instructions https://helpcenter.onlyoffice.com/ru/installation/docs-community-install-fonts-linux.aspx On the host, I upload calibri fonts (pulled out of Windows) in the amount of 6 files into /media/onlyoffice_documentserver/fonts, execute documentsserver-generate-allfonts.sh inside the container - no errors occur, everything is ok. When I open a document, I see crooked characters on any layout. The font itself appears, but when you try to select a font, some other one is selected, and the characters are displayed crookedly in any language. Firefox browser, clearing cache does not help. Newly installed Chrome on Windows also has crooked symbols. At the same time, everything is displayed correctly through the Yandex browser. Through Firefox on Ubuntu, everything is also displayed correctly. Through the Onlyoffice application on Android, everything is also displayed as it should. And through the nextcloud application and through the Firefox browser on Android, I again see crooked characters. I tried deleting the cache of firefox, nextcloud, android web view - it did not help. It seems that the problem is still in the onlyoffice instance. Please help. I saw similar topics, but a simple cache clearing helped everywhere. No to me. Documentserver version 8.0.1.31, host - debian 11 (openmediavault), docker 26.1.4
kerem 2026-02-26 10:31:56 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@igwyd commented on GitHub (Jun 18, 2024):

Hello @Lakhtion, yes the docker distribution have only our core fonts by default.

What’s surprising is that even if I don’t have the choice of the font I need in the documentserver, it is displayed when I open the document (if it was already there in any text) and I can print on it. Moreover, I can select a font that is not in the list by entering it manually. I get a warning, but everything works.

When you select a font that does not exist on the server, a warning appears that one of the system fonts will be used if it matches or will be select automatically from the most similar ones.

I checked you case with chrome and firefox on windows and linux, adding fonts works correctly. Most likely, the problem is not in the server, but in the cache in your devices, browsers, cache proxy(do you use clouflare maybe?), VPN or someting else. For a clean test, install your browsers on a new clean virtual machine and test your fonts.

<!-- gh-comment-id:2175119098 --> @igwyd commented on GitHub (Jun 18, 2024): Hello @Lakhtion, yes the docker distribution have only our core fonts by default. > What’s surprising is that even if I don’t have the choice of the font I need in the documentserver, it is displayed when I open the document (if it was already there in any text) and I can print on it. Moreover, I can select a font that is not in the list by entering it manually. I get a warning, but everything works. When you select a font that does not exist on the server, a warning appears that one of the system fonts will be used if it matches or will be select automatically from the most similar ones. I checked you case with chrome and firefox on windows and linux, adding fonts works correctly. Most likely, the problem is not in the server, but in the cache in your devices, browsers, cache proxy(do you use clouflare maybe?), VPN or someting else. For a clean test, install your browsers on a new clean virtual machine and test your fonts.
Author
Owner

@Lakhtion commented on GitHub (Jun 18, 2024):

I checked you case with chrome and firefox on windows and linux, adding fonts works correctly. Most likely, the problem is not in the server, but in the cache in your devices, browsers, cache proxy(do you use clouflare maybe?), VPN or someting else. For a clean test, install your browsers on a new clean virtual machine and test your fonts.

Greetings. I already wrote that I tried to delete all kinds of caches. I tried to install pure Chrome - the problem is there too. Today I tried to install a clean Windows 10 via vmware and immediately open the document in Edge - there is a problem there too. All the characters are crooked, the fonts in the list are mixed, it’s impossible to work.
I tried resetting the cache both with ctrl+f5 and through the browser settings, but I think it doesn’t matter, since the problem is reproduced on a completely clean operating system and browser.

<!-- gh-comment-id:2176977049 --> @Lakhtion commented on GitHub (Jun 18, 2024): > I checked you case with chrome and firefox on windows and linux, adding fonts works correctly. Most likely, the problem is not in the server, but in the cache in your devices, browsers, cache proxy(do you use clouflare maybe?), VPN or someting else. For a clean test, install your browsers on a new clean virtual machine and test your fonts. Greetings. I already wrote that I tried to delete all kinds of caches. I tried to install pure Chrome - the problem is there too. Today I tried to install a clean Windows 10 via vmware and immediately open the document in Edge - there is a problem there too. All the characters are crooked, the fonts in the list are mixed, it’s impossible to work. I tried resetting the cache both with ctrl+f5 and through the browser settings, but I think it doesn’t matter, since the problem is reproduced on a completely clean operating system and browser.
Author
Owner

@igwyd commented on GitHub (Jun 21, 2024):

Then maybe the problem is in some fonts, could you attach the fonts with which you are experiencing problems?

<!-- gh-comment-id:2182642993 --> @igwyd commented on GitHub (Jun 21, 2024): Then maybe the problem is in some fonts, could you attach the fonts with which you are experiencing problems?
Author
Owner

@Lakhtion commented on GitHub (Jun 23, 2024):

Then maybe the problem is in some fonts, could you attach the fonts with which you are experiencing problems?

Yes, you can try with it. I pulled it from Windows 11, this is system fonts, and it works correctly in MS Office.
Based on the test results, I realized that apparently the calibri is working correctly, but not arial and times. I tried to install them separately.

Is it important to put fonts in the /usr/share/fonts directory just as a bunch of files or distribute them into folders? Should I put them in this directory or in the truetype or custom folder inside it? Or does this moment make absolutely no difference for onlyoffice?

I also could not figure out how to 100% reset the browser cache in a situation with Firefox - sometimes even completely deleting all history, cookies, cache and generally everything possible for the entire time does not help. And ctrl+f5 for a snack. And sometimes it works. With chrome and Yandex browser it seems to be simpler. I test changes in Yandex now, because I guaranteed can see any results there.
fonts.zip

<!-- gh-comment-id:2185038640 --> @Lakhtion commented on GitHub (Jun 23, 2024): > Then maybe the problem is in some fonts, could you attach the fonts with which you are experiencing problems? Yes, you can try with it. I pulled it from Windows 11, this is system fonts, and it works correctly in MS Office. Based on the test results, I realized that apparently the calibri is working correctly, but not arial and times. I tried to install them separately. Is it important to put fonts in the /usr/share/fonts directory just as a bunch of files or distribute them into folders? Should I put them in this directory or in the truetype or custom folder inside it? Or does this moment make absolutely no difference for onlyoffice? I also could not figure out how to 100% reset the browser cache in a situation with Firefox - sometimes even completely deleting all history, cookies, cache and generally everything possible for the entire time does not help. And ctrl+f5 for a snack. And sometimes it works. With chrome and Yandex browser it seems to be simpler. I test changes in Yandex now, because I guaranteed can see any results there. [fonts.zip](https://github.com/user-attachments/files/15945137/fonts.zip)
Author
Owner

@igwyd commented on GitHub (Jun 24, 2024):

Firefox has a guide in support on how to clear the cache - here.
It doesn't matter whether the fonts are in the /usr/share/fonts or into a nested folders.
I checked your fonts and they are correctly added and displayed, so the problem is in your stand. You need to localize the issue. Try installing onlyoffice-documentserver and nextcloud on a clean machine without a proxy and test adding fonts. If everything works, then add your settings one by one to get closer to the problematic stand and I think you will be able to find the error.

<!-- gh-comment-id:2185664329 --> @igwyd commented on GitHub (Jun 24, 2024): Firefox has a guide in support on how to clear the cache - [here](https://support.mozilla.org/en-US/kb/how-clear-firefox-cache#:~:text=the%20Firefox%20cache%3A-,Click%20the%20menu%20button,click%20the%20Clear%20Now%7D%20button.). It doesn't matter whether the fonts are in the ```/usr/share/fonts``` or into a nested folders. I checked your fonts and they are correctly added and displayed, so the problem is in your stand. You need to localize the issue. Try installing onlyoffice-documentserver and nextcloud on a clean machine without a proxy and test adding fonts. If everything works, then add your settings one by one to get closer to the problematic stand and I think you will be able to find the error.
Author
Owner

@Lakhtion commented on GitHub (Jun 29, 2024):

and I think you will be able to find the error

Thanks, I figured out the issue!
The error was that I had the item cache assets enabled in Nginx proxy manager.
The proxy manager cached onlyoffice data in its container in addition to my browsers. I disabled cache assets and now, when adding fonts and resetting the cache in the browser for my domain, everything is ok.
PS by the way, ctrl+f5 does not help, need to reset cache manually, but all works now.

I think we can close this thread, thanks

<!-- gh-comment-id:2198265427 --> @Lakhtion commented on GitHub (Jun 29, 2024): > and I think you will be able to find the error Thanks, I figured out the issue! The error was that I had the item cache assets enabled in Nginx proxy manager. The proxy manager cached onlyoffice data in its container in addition to my browsers. I disabled cache assets and now, when adding fonts and resetting the cache in the browser for my domain, everything is ok. PS by the way, ctrl+f5 does not help, need to reset cache manually, but all works now. I think we can close this thread, thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#335
No description provided.