In recent releases of Stimulsoft Server, we have made important improvements to the font processing mechanism. In this article, we will explain in detail how to quickly attach any required fonts to your server configuration.
Introduction
By default, the Docker image does not contain any pre-installed system fonts. In scenarios where a font used in a report is not available in the server environment (such as standard Arial), the client-side web browser is forced to substitute the first available local font. This often leads to broken element layout, shifting text blocks, and incorrect report formatting.Attaching fonts via Docker Compose
To pass custom fonts into the container, a local directory is mounted using volumes.Step-by-Step instructions:
- Create a local folder: Create a directory named fonts in the same location on the host system where your docker-compose.yml file is located.
- Prepare font files: place the required font files in TTF (TrueType Font) or OTF (OpenType Font) format into the created folder. Tip!
For complete coverage of all typeface styles, we recommend uploading the entire font family. For instance, for Arial, these are the files:
arial.ttf - regular
arialbd.ttf - bold
ariali.ttf - italic
arialbi.ttf - bold italic - Update your docker-compose.yml configuration: add the directory mount to the volumes section of the server service:
Note!services: server: image: stimulsoft/server:2026.3.1 ports: - 8080:8080 volumes: - ./fonts:/usr/share/fonts/truetype/custom:ro
The :ro (read-only) flag ensures that the container uses the files in read-only mode.
Why aren't proprietary fonts included in the Docker Image?
Popular fonts (including Arial, Times New Roman, Calibri, etc.) are the intellectual property of their rights holders (specifically Microsoft) and are protected by commercial licenses. Copyright legislation prohibits distributing and embedding these files inside publicly available Docker images without proper licensing.For this reason, we cannot supply them out of the box - users must mount them independently using their own available distributions or licensed sources.