Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

font-subseter

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-subseter - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

32

lib/engines/fonttools.js

@@ -15,6 +15,10 @@ /**

const getLocalPyPath = (name = '') => {
return path.join(__dirname, 'fonttools', name);
};
const getFontToolsPath = (moduleName = '.') => {
if(!getFontToolsPath.promise) {
const cmd = 'python3';
const args = ['lib/engines/fonttools/get-path.py'];
const args = [ getLocalPyPath('get-path.py') ];

@@ -99,4 +103,5 @@ getFontToolsPath.promise = execa(cmd, args)

return runPy('python3', [
'lib/engines/fonttools/otf2ttf.py',
'--output={{outputFile}}',
getLocalPyPath('otf2ttf.py'),
'--output',
'{{outputFile}}',
// '--keep-direction',

@@ -115,12 +120,15 @@ '--overwrite',

return getFontToolsPath('subset')
// pyftsubset
return runPy('python3', [
'/usr/local/lib/python3.7/site-packages/fontTools/subset',
'{{inputFile}}',
'--output-file={{outputFile}}',
'--text-file={{charsFile}}',
'--verbose'
], {
inputFile: buffer,
charsFile: chars.join('')
.then(pyftsubsetPath => {
return runPy('python3', [
pyftsubsetPath,
'{{inputFile}}',
'--output-file={{outputFile}}',
'--text-file={{charsFile}}',
'--verbose'
], {
charsFile: chars.join(''),
inputFile: buffer
});
})

@@ -127,0 +135,0 @@ .then(buf => {

{
"name": "font-subseter",
"version": "1.2.0",
"version": "1.2.1",
"description": "A font subsetting tool based on opentype.js",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc