@mathjax/generic-font
Version:
Generic font for MathJax v4
80 lines • 3.28 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GenericFont = void 0;
var FontData_js_1 = require("@mathjax/src/cjs/output/svg/FontData.js");
var common_js_1 = require("./common.js");
var normal_js_1 = require("./svg/normal.js");
var delimiters_js_1 = require("./svg/delimiters.js");
var Base = (0, common_js_1.CommonGenericFontMixin)(FontData_js_1.SvgFontData);
var GenericFont = (function (_super) {
__extends(GenericFont, _super);
function GenericFont(options) {
var e_1, _a;
if (options === void 0) { options = {}; }
var _this = _super.call(this, options) || this;
var CLASS = _this.constructor;
try {
for (var _b = __values(Object.keys(_this.variant)), _c = _b.next(); !_c.done; _c = _b.next()) {
var variant = _c.value;
_this.variant[variant].cacheID = 'G-' + (CLASS.variantCacheIds[variant] || 'N');
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return _this;
}
GenericFont.NAME = 'Generic';
GenericFont.OPTIONS = __assign(__assign({}, Base.OPTIONS), { dynamicPrefix: '@mathjax/generic-font/svg/dynamic' });
GenericFont.defaultDelimiters = delimiters_js_1.delimiters;
GenericFont.defaultChars = {
'normal': normal_js_1.normal
};
GenericFont.variantCacheIds = {
'normal': 'N'
};
return GenericFont;
}(Base));
exports.GenericFont = GenericFont;
//# sourceMappingURL=svg.js.map