Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function Nameplate(fontPath, text, fontSize, fontMargin, boltMargin, boltRadius, rounded) {
var _this = this;
if (makerjs.environment == makerjs.environmentTypes.NodeJs) {
(function () {
var opentype = require('opentype.js');
var font = opentype.loadSync('./fonts/' + fontPath);
//use the models from makerjs-nameplate
_this.models = new _nameplate(font, text, fontSize, fontMargin, boltMargin, boltRadius, rounded).models;
})();
} else {
//load a font asynchronously
opentype.load('/fonts/' + fontPath, function (err, font) {
if (!err) {
//use the models from makerjs-nameplate