Progress® Telerik® Reporting R3 2021

New to Telerik Reporting? Download free 30-day trial

privateFonts Element

Defines a collection that allows the Reporting Engine to use a private version of an existing font without the requirement to install the font on the host machine. If the font is already installed the installed font is used.

Known issue with the Windows Platform:

If you order the fonts in the PrivateFontCollection first regular then bold the GDI+ measure string size for bold font style is incorrect. This is observed in Windows 8.1 and newer and may lead to unexpected rendering and aligning issues. For more information see Wrong Measurements from MeasureString.

Known issue with Azure:

The required .NET API for handling private fonts is making GDI calls that are blocked in Azure App Services. If private fonts are required our recommendation is to use Cloud Service plan. More details can be found in PrivateFontCollection is not working.

Known issue with PDF rendering in .NET Core application on Linux:

The PDF rendering engine needs to obtain the bytes for fonts used in the report. The font resolving mechanism currently relies on the privateFonts element to provide path to each font along with a style description. This includes the substitute fonts that are picked by the runtime when the font, used in the report, is not available.

The private fonts are used for all rendering extensions. Still the font rendering on the client computer depends on the viewer configuration and document format specifications:

  • PDF: The rendering extension embeds fonts by default. This functionality is controlled by the FontEmbedding device information setting;
  • HTML5 Rendering: In order web browser to render HTML with private fonts you have to set up font-face rules. For more information see: article
  • WPF XAML rendering: embeds private fonts by default;
  • Silverlight XAML rendering: In addition to add the private fonts as content to the WCF hosting project you have to add the fonts as resources to the Silverlight project with the same relative path;
  • For all other document formats the Reporting Engine is using private fonts but in order the document viewer to use them the fonts should be installed on the client computer;
  • Windows Forms Report Viewer uses Image rendering to render in EMF+ that don't support private fonts.

As with most types of software, font files are licensed, rather than sold, and licenses that govern the use of fonts vary from vendor to vendor. As a developer it is your responsibility to ensure that you have the required license rights for any font you use as private font, or otherwise redistribute.

      <add />

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

<privateFonts> element
Child Elements
  • add - Optional element. Adds a font to the collection.
Parent Elements
  • configuration - Specifies the root element in every configuration file that is used by the common language runtime and the .NET Framework applications.
  • Telerik.Reporting - Configures all settings that Telerik Reporting Engine uses.
<add> element
fontFamily The attribute is required and case sensitive.
path The attribute is required and is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see MSDN Directory.GetCurrentDirectory Method () For web projects you can use ~ operator to specify a root-relative path for a font. For more informarion see MSDN: ASP.NET Web Project Paths
fontStyle The attribute is optional with valid values Regular, Bold, Italic, Strikeout and Underline. The default value is Regular. Specify this attribute if you have to specify font family with multiple font files for different style or if specified font file is not containing Regular style.

Child elements


Parent element



The following example demonstrates how to configure the reporting engine to use Ubuntu and Courier New fonts. The fonts are part of the project with the following properties:

  • Build Action - Content
  • Copy to Output Directory - Copy if newer

XML-based configuration file:

<?xml version="1.0"?>
      <add fontFamily="Courier New" path="CourBI.ttf" fontStyle="Bold, Italic" />
      <add fontFamily="ubuntu" path="Ubuntu-R.ttf" />
      <add fontFamily="Courier New" path="CourI.ttf" fontStyle="Italic" />

JSON-based configuration file:

"telerikReporting": {
  "privateFonts": [
      "fontFamily": "ubuntu",
      "path": "Ubuntu-R.ttf",
      "fontFamily": "Courier New",
      "path": "CourI.ttf",
      "fontStyle": "Italic"
      "fontFamily": "CourBI",
      "path": "CourBI.ttf",
      "fontStyle": "Bold,Italic"

See Also

Other Resources

In this article
Not finding the help you need?