font-subseter
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17380
420