How To: Add Custom Font to Task Service

The task service currently runs on the Linux docker container and supports only a limited fonts. If you want to use custom fonts in your reports, you can upload custom font files to a blob inside the storage account, and mount those fonts to the container that runs within the task service. 

This article further describes the procedure to add custom fonts.

Procedure

To add custom fonts:

  1. Create a new storage account or select an existing one where you want to upload custom fonts.
  2. Create a folder and name the folder appropriately. For ease of understanding, assume that the folder name is fonts.
  3. Open the fonts folder, create another folder, and name it appropriately. For ease of understanding, assume that the folder name is test.
    fonts-folder.png
  4. Open the test folder, click Upload, and select the font files from your local directory.
  5. Open the Azure portal, and select the required App service which has the task service running on it.
  6. In the left pane, click Settings > Configuration, and click Path Mappings in the center.
    mount path-empty.png
  7. Click + New Azure Storage Mount and add values to the field in the window that opens.
    new-Azure.png

    Field  Description
    Name Enter a name for the new storage mount
    Configuration options Select the default option: Basic
    Storage accounts Enter the storage account
    Storage Type Select Azure Blob (Read only)
    Storage Container Select name of the folder where you stored the font files. In this example, select fonts.
    Mount path Enter:
    /usr/share/fonts/truetype/custom
  8. Click Ok to save your changes. The fonts folder is now mounted to the task service.
    mount path.png

This is a one-time procedure. When you want to add custom fonts in the future, then you only need to upload new font files in the 'fonts' folder in Azure Blob Storage. 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.