UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

49 lines 1.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Font = void 0; class Font { constructor(data) { let nameDefault = ""; this.name = typeof (data === null || data === void 0 ? void 0 : data.name) !== "undefined" ? data === null || data === void 0 ? void 0 : data.name : nameDefault; let sizeDefault = 10; this.size = typeof (data === null || data === void 0 ? void 0 : data.size) !== "undefined" ? data === null || data === void 0 ? void 0 : data.size : sizeDefault; let underlineDefault = false; this.underline = typeof (data === null || data === void 0 ? void 0 : data.underline) !== "undefined" ? data === null || data === void 0 ? void 0 : data.underline : underlineDefault; } static getNameDefault() { return ""; } static getNameDescription() { return "The name of the used font."; } static getSizeDefault() { return 10; } static getSizeDescription() { return "The size of the font."; } static getUnderlineDefault() { return false; } static getUnderlineDescription() { return "When set to true, the text shall be underlined."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new Font(data); } toJson() { return { 'name': this.name, 'size': this.size, 'underline': this.underline, }; } clone() { return Font.fromJson(this.toJson()); } } exports.Font = Font; //# sourceMappingURL=Font.js.map