PdfFont Class

File
wijmo.pdf.js
Module
wijmo.pdf

Represents a font.

Constructor

Properties

Methods

Constructor

constructor

constructor(family?: string, size?: number, style?: string, weight?: string): PdfFont

Initializes a new instance of the PdfFont class.

Parameters
Returns
PdfFont

Properties

family

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 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'.

Type
string

size

Gets or sets the size of the font.

Type
number

style

Gets or sets the style of the font.

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

Type
string

weight

Gets or sets the weight of the font.

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

Type
string

Methods

clone

clone(): PdfFont

Creates a copy of this PdfFont.

Returns
PdfFont

equals

equals(value: PdfFont): boolean

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

Parameters
Returns
boolean