[]
        
(Showing Draft Content)

PdfFont Class

PdfFont Class

Represents a font.

Heirarchy

  • PdfFont

Constructors

Properties

Methods

Constructors

constructor

  • new PdfFont(family?: string, size?: number, style?: string, weight?: string): PdfFont
  • Initializes a new instance of the PdfFont class.

    Parameters

    • Optional family: string

      The family name of the font.

    • Optional size: number

      The size of the font.

    • Optional style: string

      The style of the font.

    • Optional weight: string

      The weight of the font.

    Returns PdfFont

Properties

family

family: string

Gets or sets the family name of the font.

The list of the font family names in the order of preferences, separated by commas. Each font family name can be the one that was registered using the PdfDocument.registerFont method or the name of one of the PDF standard font families: 'courier', 'helvetica', 'symbol', 'times', 'zapfdingbats' or the superfamily name: 'cursive', 'fantasy', 'monospace', 'serif', 'sans-serif'.

size

size: number

Gets or sets the size of the font.

style

style: string

Gets or sets the style of the font.

The following values are supported: 'normal', 'italic', 'oblique'.

weight

weight: string

Gets or sets the weight of the font.

The following values are supported: 'normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'.

Methods

clone

  • Creates a copy of this PdfFont.

    Returns PdfFont

    A copy of this font.

equals

  • Determines whether the specified PdfFont instance is equal to the current one.

    Parameters

    Returns boolean

    true if the specified object is equal to the current one, otherwise false.