Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
value: function sliceGlyf(_ref7) {
var type = _ref7.type,
subset = _ref7.subset;
this._hash = (0, _helps.generateHash)(subset.toString());
var _require2 = require("fonteditor-core"),
Font = _require2.Font;
this._font = Font.create(this._buffer, {
type,
subset
});
var defaultFontFamily = this._font.data.name.fontFamily;
this._ff = `${defaultFontFamily} ${this.getHash()}`;
this._font.data.name.fullName = this._ff;
this._font.data.name.fontFamily = this._ff;
return this;
}
}, {
readFont () {
const inBuffer = fs.readFileSync(this.ttfPath)
return FontEditorCore.Font.create(inBuffer, {
type: 'ttf'
})
}
#!/usr/bin/env node
'use strict';
const chalk = require('chalk'),
crypto = require('crypto'),
Font = require('fonteditor-core').Font,
fs = require('fs'),
hummus = require('hummus'),
os = require('os'),
parser = require('./libs/nomnom'),
path = require('path'),
puppeteer = require('puppeteer'),
URI = require('urijs'),
util = require('util');
const { delay, pause } = require('./libs/util');
const plugins = loadAvailablePlugins(path.join(path.dirname(__filename), 'plugins'));
parser.script('decktape').options({
url : {
position : 1,
const fs = require('fs');
const path = require('path');
const Font = require('fonteditor-core').Font;
const TTF = require('fonteditor-core').TTF;
const ttf2woff2 = require('ttf2woff2');
const cssWriter = require('./css-writer');
const deflate = require('pako').deflate;
const allowedOutputTypes = [ 'ttf', 'eot', 'svg', 'woff', 'woff2' ];
function exists(path) {
try {
fs.accessSync(path);
return true;
} catch(e) {
return false;
}
}