diff --git a/images/download-options.png b/images/download-options.png index d46f401..901c0da 100644 Binary files a/images/download-options.png and b/images/download-options.png differ diff --git a/images/family.png b/images/family.png index 928c31f..5939d37 100644 Binary files a/images/family.png and b/images/family.png differ diff --git a/images/languages.png b/images/languages.png index ecd96dc..8c8c294 100644 Binary files a/images/languages.png and b/images/languages.png differ diff --git a/images/matrix.png b/images/matrix.png index e13025c..48fcd55 100644 Binary files a/images/matrix.png and b/images/matrix.png differ diff --git a/images/opentype.png b/images/opentype.png index e69f19f..278a74d 100644 Binary files a/images/opentype.png and b/images/opentype.png differ diff --git a/images/preview-all.png b/images/preview-all.png index 10073b8..c8039f5 100644 Binary files a/images/preview-all.png and b/images/preview-all.png differ diff --git a/images/variants.png b/images/variants.png index 7a91de0..3c036c3 100644 Binary files a/images/variants.png and b/images/variants.png differ diff --git a/images/weights.png b/images/weights.png index 867d4be..afda234 100644 Binary files a/images/weights.png and b/images/weights.png differ diff --git a/snapshot/getsnap.js b/snapshot/getsnap.js index 5637554..eadd9fc 100644 --- a/snapshot/getsnap.js +++ b/snapshot/getsnap.js @@ -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(){ diff --git a/snapshot/index.html b/snapshot/index.html index fb53ddf..35cdc67 100644 --- a/snapshot/index.html +++ b/snapshot/index.html @@ -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' } ]