Trimmed "download-options.png"
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 408 KiB |
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 352 KiB After Width: | Height: | Size: 352 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 258 KiB |
|
@ -18,8 +18,8 @@ app.on('window-all-closed', function() {
|
|||
checkQuit()
|
||||
});
|
||||
|
||||
function combineImages(images, outfile, width, height, background, padding){
|
||||
var command = 'convert ' + images.join(' ') + ' -append -crop ' + width + 'x' + height + '+0+0 +repage -bordercolor #008000 -fuzz 5% -trim ' + outfile;
|
||||
function combineImages(images, outfile, width, height, doubleTrim){
|
||||
var command = 'convert ' + images.join(' ') + ' -append -crop ' + width + 'x' + height + '+0+0 +repage -bordercolor #008000 -fuzz 5% -trim ' + (doubleTrim ? '-bordercolor ' + doubleTrim + ' -trim ' : '') + outfile;
|
||||
console.log(command);
|
||||
cp.exec(command, function(err, stdout, stderr){
|
||||
images.forEach(function(file){
|
||||
|
@ -51,7 +51,7 @@ var phases = {
|
|||
for(var k = 0; k < j; k++){
|
||||
images.push(argv.dir + '/' + rect.name + '.' + k + '.png')
|
||||
}
|
||||
combineImages(images, file, rect.windowWidth * rect.dpi, rect.height * rect.dpi, rect.background, rect.padding);
|
||||
combineImages(images, file, rect.windowWidth * rect.dpi, rect.height * rect.dpi, rect.doubleTrim);
|
||||
}
|
||||
}
|
||||
function step(){
|
||||
|
|
|
@ -506,8 +506,7 @@ if(window && window.process && window.process.type && process.versions['electron
|
|||
name: options.name,
|
||||
windowWidth: windowWidth,
|
||||
windowHeight: windowHeight,
|
||||
background: options.background || 'white',
|
||||
padding: options.padding || 1,
|
||||
doubleTrim: options.doubleTrim,
|
||||
dpi: dpi,
|
||||
x: rect.left | 0,
|
||||
y: rect.top | 0,
|
||||
|
@ -527,51 +526,36 @@ if(window && window.process && window.process.type && process.versions['electron
|
|||
var snapshotTasks = [
|
||||
{
|
||||
el: document.querySelector('#languages'),
|
||||
name: 'languages',
|
||||
background: 'white',
|
||||
padding: 0
|
||||
name: 'languages'
|
||||
},
|
||||
{
|
||||
el: document.querySelector('#variants'),
|
||||
name: 'variants',
|
||||
background: 'white',
|
||||
padding: 0
|
||||
name: 'variants'
|
||||
},
|
||||
{
|
||||
el: document.querySelector('#opentype'),
|
||||
name: 'opentype',
|
||||
background: 'white',
|
||||
padding: 0
|
||||
name: 'opentype'
|
||||
},
|
||||
{
|
||||
el: document.querySelector('#matrix'),
|
||||
name: 'matrix',
|
||||
background: 'white',
|
||||
padding: 0
|
||||
name: 'matrix'
|
||||
},
|
||||
{
|
||||
el: document.querySelector('#family'),
|
||||
name: 'family',
|
||||
background: 'white',
|
||||
padding: 0
|
||||
name: 'family'
|
||||
},
|
||||
{
|
||||
el: document.querySelector('#previews'),
|
||||
name: 'preview-all',
|
||||
background: 'white',
|
||||
padding: 0
|
||||
name: 'preview-all'
|
||||
},
|
||||
{
|
||||
el: document.querySelector('#weights'),
|
||||
name: 'weights',
|
||||
background: 'white',
|
||||
padding: 0
|
||||
name: 'weights'
|
||||
},
|
||||
{
|
||||
el: document.querySelector('#downloadoptions'),
|
||||
name: 'download-options',
|
||||
background: 'white',
|
||||
padding: 0
|
||||
doubleTrim: 'white'
|
||||
}
|
||||
]
|
||||
|
||||
|
|