Fonts

PdfFont

PdfFont represents a font resource in a PDF document. Fonts are embedded as resources and referenced by content stream operators.

DefaultAppearance

DefaultAppearance defines the default visual appearance for form field text, including font name, font size, and text color. It is used with FreeTextAnnotation and form field appearance streams.

DefaultAppearance da = new DefaultAppearance("Helv", 12, Color.BLACK);
FreeTextAnnotation fta = new FreeTextAnnotation(page,
    new Rectangle(50, 50, 200, 100), da);

The font name "Helv" refers to the standard PDF font Helvetica. Standard 14 PDF fonts (Helvetica, Times-Roman, Courier, and variants) are available without embedding.

Font Subsetting

For non-standard fonts, Aspose.PDF FOSS for Java supports embedding font subsets in the PDF output to ensure consistent rendering across viewers.

See Also