Adding new fonts, languages and spellcheckers to ONLYOFFICE Docs

Sometimes you might want to add additional fonts or language spellchecking support to ONLYOFFICE Docs to enhance the work with the editors. That can be done quite easily.

Bare-bones instructions

Installing new fonts

By default, ONLYOFFICE Docs uses embedded free fonts from the operating system where ONLYOFFICE Docs is installed.

All TrueType/OpenType fonts are supported:

  • TrueType: .ttf, .tte
  • OpenType:.otf, .otc, .ttf, .ttc

If you would like to use additional fonts, you can do the following:

  1. Install the font to the C:\Windows\Font folder by clicking the font and choosing the Install for all users option in the context menu. On Windows versions lower than Windows 11 or Windows Server 2022, just select Install.
  2. Go to the C:\Program Files\ONLYOFFICE\DocumentServer\bin\ folder and run the documentserver-generate-allfonts.bat file as administrator.

    It will scan the system font folder for the installed font, the font will be used by the AllFonts.js script to form the font thumbnails in the editors and add the font metrics to the font_selection.bin file for its further usage.

  3. Restart the ONLYOFFICE DocumentServer Converter and ONLYOFFICE DocumentServer DocService services.
  4. For ONLYOFFICE Docs 8.1.3 or earlier, please clear the browser cache and reopen the page. For later versions, this step is not required.

Helpful hints

During the installation process, ONLYOFFICE Docs will check the presence of the following font files in your computer's system: arial.ttf, calibri.ttf, cour.ttf, symbol.ttf, times.ttf, wingding.ttf. If these fonts are present, ONLYOFFICE Docs will include them in the list of available fonts.

When a document is opened for the first time, ONLYOFFICE Docs will check which fonts are present in the document, and will upload them from the computer with ONLYOFFICE Docs installation. In case the document contains fonts absent from the ONLYOFFICE Docs computer, it will upload the closest font substitute (the document layout and display might suffer from such substitution).

In case you want to limit the number of fonts uploaded from the system, you can do the following:

  • Remove the unused fonts from the system;
  • limit the number of fonts in documents used (using only most spread fonts: Times New Roman, Verdana, Tahoma, etc.);
  • use compression (dynamic and static) in IIS.
Installing new fonts for older ONLYOFFICE Docs versions

If you are still using versions 3.03.5 of ONLYOFFICE Docs for Windows, we recommend that you upgrade to the latest available version. If you do not have the possibility to upgrade and need to add a new font, the succession of actions should be the following:

  1. Install the font by copying it to C:\Windows\Font (to the computer with ONLYOFFICE Docs installed).
  2. Run the command prompt with administrator rights.
  3. Switch to the C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\Tools folder (or use the path to the folder with ONLYOFFICE Docs installed):
    cd C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\Tools
  4. Execute the AllFontsGen.exe command with the following parameters:
    AllFontsGen.exe "C:\Windows\Fonts" "C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\DocService\OfficeWeb\sdk\Common\AllFonts.js" "C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\DocService\OfficeWeb\sdk\Common\Images" "C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\FileConverterService\Bin\font_selection.bin"
    It will scan the system font folder for the installed font, the font will be used by the AllFonts.js script to form the font thumbnails in the editors and add the font metrics to the font_selection.bin file for its further usage.
  5. Restart the ONLYOFFICE Converter Service.
  6. Clear the browser cache and reopen the page.

If you are still using the older 2.5 version of ONLYOFFICE Docs for Windows, we recommend that you upgrade to the latest available version. If you do not have the possibility to upgrade and need to add a new font, the succession of actions should be the following:

  1. Install the font by copying it to C:\Windows\Font (to the computer with ONLYOFFICE Docs installed).
  2. Open the C:\Program Files\Ascensio System SIA\ONLYOFFICE Online Editors\Tools folder.
  3. Run the GenerateAllFonts.bat file.
  4. Clear the browser cache and reopen the page.

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags