Fonts

DynamicPDF API supports several core fonts, Google Fonts, and also allows adding custom fonts to your DynamicPDF cloud storage space. DynamicPDF API supports the 14 core fonts present in all PDF readers and supports embedding OpenType (TrueType), Type 1 fonts, Web Fonts (WOFF) version 1.0 and TrueType Collections (TTC) in a PDF document. DynamicPDF API also supports Google Fonts.

Core Fonts

Designer supports the following core fonts.

Figure 1. DynamicPDF API supported fonts.

For more on using Fonts on the web, refer to CSS Web Safe Fonts by W3 Schools. For more on using Adobe fonts, refer to Font embedding and substitution.

Designer supports expressions in an element's font property. For example, IF(LTE(num,0),"Helvetica","Courier"), then the element's font would be Helvetica or Courier depending on the value in the num field. Refer to following documentation Functions (Fonts and Colors).

Google Fonts

DynamicPDF API supports Google Fonts.

Figure 2. Google Font support in Designer.

Adding Google Font Example

Designer supports adding a Google Font through the font property. To add a Google Font,

Figure 3. Adding a Google Font to a cover page in Designer.

Embedding Fonts

Although Designer supports numerous fonts, the following fonts Requiring Embedding.

Adding Font Example

Designer supports adding custom fonts to a DLEX through the top-level Document.

Figure 4. Modify fontFamilies or openTypeFonts properties for a Document.

Add a font by performing the following steps.

Figure 5. Adding the Getaway-voaA.otf font (an opensource font found on the web) to the creating-a-page-designer sample project.

Figure 6. Adding a font to a Document.

The font can now be used anywhere within the document. For example, to use the font in a Label layout element, you would select myFont (or the font name you provided for your custom font) from the font property list.

Figure 7. Adding a custom font to a Label layout element.

Upon creating the report, the label's text will be in the custom font.