Font Class |  Fonts And Text |  com.cete.dynamicpdf.text Package | Programming with Generator for Java

Welcome > Generator > Programming > Fonts And Text > Core Fonts

PDF specifies 14 fonts that are guaranteed to be included with any PDF viewer. As a result, these fonts do not need to be embedded into a PDF document when it is created. The 14 core PDF fonts are accessed through static properties on the Font class:

A core font can be used as follows:

[Java]
    // Use a core font in a text area Page Element.
    page1.getElements().add(new TextArea("Text", 0, 0, 200, 12, Font.getTimesRoman(), 12));

NOTE: Helvetica is equivalent to the Arial TrueType font included on Windows systems, and Times is equivalent to the Times New Roman TrueType font included on Windows systems. It is much more efficient to use the equivalent core fonts whenever possible. 

See Also 

Font Class |  Fonts And Text |  com.cete.dynamicpdf.text Package | Programming with Generator for Java