Custom Fonts

I have a report that works with custom fonts using the designer. however, when I run the report template in our web app, the font is missing, how can I add the font to the report?

Comments

  • Hello!

    To use custom fonts (.ttf / .otf) that are not installed on the system (for example, in Docker / Linux / App Service without administrator rights)

    Place the font files in a separate folder and specify it in Config.FontListFolder (or load the fonts directly into memory via Config.PrivateFontCollection.AddFontFile() / FontCollection before loading or preparing the report):

    FastReport.Utils.Config.PrivateFontCollection.AddFontFile(‘fonts/MyCustomFont.ttf’);

    When exporting to PDF, be sure to set pdfExport.EmbeddingFonts = true so that the font is embedded within the PDF and displays consistently on any device.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.