Skip to main content

Changing the default font

To change the default font for all new documents created within the ONLYOFFICE Docs test examples, modify the existing document templates:

  1. Navigate to the folder containing the document templates. The path to this folder depends on the programming language of the test example:

    • .Net (C# MVC) - assets/document-templates/new
    • .Net (C#) - assets/document-templates/new
    • Go - static/assets/document-templates/new
    • Java - src/main/resources/assets/document-templates/new
    • Java Spring - src/main/resources/assets/document-templates/new
    • Node.js - public/assets/document-templates/new
    • PHP - assets/document-templates/new
    • PHP (Laravel) - public/assets/document-templates/new
    • Python - assets/document-templates/new
    • Ruby - assets/document-templates/new
  2. Open the template for the required editor type (new.docx, new.xlsx, new.pptx, or new.pdf) in ONLYOFFICE Desktop Editors and adjust the font name and/or size.

  3. Save the file.

After that, all new documents will be created with the specified font.