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?
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.