On this page
To change the font for the whole document, you need to do the following:
Let’s assume you want to use the Google Noto Sans font as the main font of the document.
To change the default font to Noto Sans
Add a generic font family, e.g., sans-serif, to the end of the list so that an alternative font is selected if the main font is unavailable.
<style th:fragment="CommonStyles">
body {
font-family: "Noto Sans", sans-serif;
…
}
…
</style> |
Open the <web_app_platform_install_root>/shared/conf/webappplatform.properties file and set Noto Sans as the value of the fonts.toc.default property.
export.fonts.toc.default=Noto Sans |
Some publicly available fonts have their own installation scripts and instructions. If this is the case, follow the official installation instructions.
| Fonts must be embeddable. You can configure the export to avoid embedding for most of the fonts, but it is not recommended because all users who open the exported document need to have these fonts installed on their computers. |
Let's say you need to install the Noto Sans font.
To install the Noto Sans font on Linux
Execute the following command to clean the font cache:
fc-cache –fv |
Execute the following command to check if the new Noto sans font is installed:
fc-list | grep –i noto |
To install the Noto Sans font on Windows
Let's assume you need to install a custom font, e.g., MyCompanyFont, available as a .tiff file, e.g., MyCompanyFont.tiff.
To install a custom font on Linux
Execute the following command to clean the font cache:
fc-cache –fv |
Execute the following command to check if the MyCompanyFont font is installed:
fc-list | grep MyCompanyFont |
To install a custom font on Windows