diff --git a/build-plans.toml b/build-plans.toml index 47a163e39..6e76d75f8 100644 --- a/build-plans.toml +++ b/build-plans.toml @@ -229,5 +229,5 @@ css = 900 # the webfont CSS. Change `parameters.toml` instead. [slants] upright = "normal" -italic = "italic" oblique = "oblique" +italic = "italic" diff --git a/images/charvars.png b/images/charvars.png index aec9f3c34..4a6cd44c6 100644 Binary files a/images/charvars.png and b/images/charvars.png differ diff --git a/images/download-options.png b/images/download-options.png index 749f34852..e0ef6b43d 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 fdfb19e10..0e5881558 100644 Binary files a/images/family.png and b/images/family.png differ diff --git a/images/languages.png b/images/languages.png index b0460d863..a319836c2 100644 Binary files a/images/languages.png and b/images/languages.png differ diff --git a/images/ligations.png b/images/ligations.png index e1b0d8a7b..9e307907c 100644 Binary files a/images/ligations.png and b/images/ligations.png differ diff --git a/images/matrix.png b/images/matrix.png index c8cc29f41..68502ccca 100644 Binary files a/images/matrix.png and b/images/matrix.png differ diff --git a/images/preview-all.png b/images/preview-all.png index 87ba2cc8b..48a1c9f63 100644 Binary files a/images/preview-all.png and b/images/preview-all.png differ diff --git a/images/stylesets.png b/images/stylesets.png index 3f240e155..94c9e97cc 100644 Binary files a/images/stylesets.png and b/images/stylesets.png differ diff --git a/images/variants.png b/images/variants.png index b0785e899..c0a317096 100644 Binary files a/images/variants.png and b/images/variants.png differ diff --git a/images/weights.png b/images/weights.png index f380f5276..c2b8429f5 100644 Binary files a/images/weights.png and b/images/weights.png differ diff --git a/package.json b/package.json index 24a038948..ae5228b13 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "iosevka", - "version": "2.2.1", + "version": "2.2.2", "main": "./generate.js", "engines": { "node": ">=8.4.0" }, "scripts": { "install": "node checkenv", - "build": "verda -f verdafile.js" + "build": "verda -f verdafile.js", + "stylus": "stylus" }, "dependencies": { "bezier-js": "^2.2.3", @@ -31,6 +32,7 @@ "yargs": "^12.0.0" }, "devDependencies": { - "eslint": "^5.2.0" + "eslint": "^5.2.0", + "stylus": "^0.54.5" } } diff --git a/snapshot/get-snap.js b/snapshot/get-snap.js index cd65c7522..ed90392e8 100644 --- a/snapshot/get-snap.js +++ b/snapshot/get-snap.js @@ -1,46 +1,57 @@ -const {app, BrowserWindow} = require('electron'); -var argv = require('yargs').argv; -var fs = require('fs'); -var cp = require('child_process'); +const { app, BrowserWindow } = require("electron"); +var argv = require("yargs").argv; +var fs = require("fs"); +var cp = require("child_process"); var mainWindow = null; var allWindowClosed = false; var pendingTasks = 0; -var zoom = 2 +var zoom = 2; function checkQuit() { if (allWindowClosed && pendingTasks == 0) app.quit(); } -app.on('window-all-closed', function () { +app.on("window-all-closed", function() { allWindowClosed = true; - checkQuit() + checkQuit(); }); function combineImages(images, outfile, width, height, doubleTrim) { - var command = 'magick ' + images.join(' ') + ' -append -crop ' + width + 'x' + height + '+0+0 +repage -bordercolor #008000 -fuzz 5% -trim ' + (doubleTrim ? '-bordercolor ' + doubleTrim + ' -trim ' : '') + outfile; + var command = + "magick " + + 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) { - if (err) console.log(err) - images.forEach(function (file) { + cp.exec(command, function(err, stdout, stderr) { + if (err) console.log(err); + images.forEach(function(file) { fs.unlinkSync(file); }); pendingTasks -= 1; checkQuit(); - }) -}; + }); +} -var ipc = require('electron').ipcMain; -function GOTO(phase) { currentPhase = phase }; +var ipc = require("electron").ipcMain; +function GOTO(phase) { + currentPhase = phase; +} var phases = { - prepare: function (event, arg) { + prepare: function(event, arg) { console.log(arg); - GOTO(phases['receive-rect']); + GOTO(phases["receive-rect"]); }, - 'receive-rect': function (event, rect) { - pendingTasks += 1 + "receive-rect": function(event, rect) { + pendingTasks += 1; rect = JSON.parse(JSON.stringify(rect)); - var file = argv.dir + '/' + rect.name + '.png'; + var file = argv.dir + "/" + rect.name + ".png"; var j = 0; var totalFiles = Math.ceil(rect.height / rect.windowHeight); var pendingFiles = totalFiles; @@ -49,48 +60,61 @@ var phases = { if (pendingFiles <= 0) { var images = []; for (var k = 0; k < j; k++) { - images.push(argv.dir + '/' + rect.name + '.' + k + '.png') + images.push(argv.dir + "/" + rect.name + "." + k + ".png"); } - combineImages(images, file, rect.windowWidth * rect.dpi, rect.height * rect.dpi, rect.doubleTrim); + combineImages( + images, + file, + rect.windowWidth * rect.dpi, + rect.height * rect.dpi, + rect.doubleTrim + ); } } function step() { - event.sender.send('scroll', rect.y + j * rect.windowHeight); - GOTO(function (event) { - mainWindow.capturePage(function (image) { - fs.writeFile(argv.dir + '/' + rect.name + '.' + j + '.png', image.toPng(), doneFileWrite); + event.sender.send("scroll", rect.y + j * rect.windowHeight); + GOTO(function(event) { + mainWindow.capturePage(function(image) { + fs.writeFile( + argv.dir + "/" + rect.name + "." + j + ".png", + image.toPNG(), + doneFileWrite + ); j += 1; - if (j >= totalFiles) { // Move to next image - event.sender.send('complete', file); - GOTO(phases['receive-rect']); + if (j >= totalFiles) { + // Move to next image + event.sender.send("complete", file); + GOTO(phases["receive-rect"]); } else { - step() + step(); } - }) - }) - }; - step() + }); + }); + } + step(); } }; -var currentPhase = phases['prepare']; -ipc.on('snapshot', function () { - currentPhase.apply(this, arguments) +var currentPhase = phases["prepare"]; +ipc.on("snapshot", function() { + currentPhase.apply(this, arguments); }); -ipc.on('log', function (event, arg) { +ipc.on("log", function(event, arg) { console.log(arg); -}) +}); -app.on('ready', function () { +app.on("ready", function() { mainWindow = new BrowserWindow({ - width: 64 * 16 * zoom, height: 1024 * zoom, - x: 5000, y: 5000, + width: 64 * 16 * zoom, + height: 1024 * zoom, + //x: 5000, y: 5000, webPreferences: { - zoomFactor: zoom + zoomFactor: zoom, + nodeIntegration: true }, show: false }); mainWindow.showInactive(); - mainWindow.loadURL('file://' + __dirname + '/index.html'); + mainWindow.loadURL("file://" + __dirname + "/index.html"); mainWindow.blurWebView(); //mainWindow.hide(); -}); \ No newline at end of file +}); diff --git a/snapshot/index.js b/snapshot/index.js index feb0f3c12..ca69de382 100644 --- a/snapshot/index.js +++ b/snapshot/index.js @@ -1,107 +1,104 @@ -if (window && window.process && window.process.type && process.versions["electron"]) - (function() { - console.log("I AN IN ELECTRON"); - var windowWidth = window.innerWidth; - var windowHeight = window.innerHeight; - var dpi = window.devicePixelRatio; - var ipc = require("electron").ipcRenderer; +console.log("I AN IN ELECTRON"); +var windowWidth = window.innerWidth; +var windowHeight = window.innerHeight; +var dpi = window.devicePixelRatio; +var ipc = require("electron").ipcRenderer; - var onScroll = function() {}; - ipc.on("scroll", function() { - onScroll.apply(this, arguments); - setTimeout(function() { - ipc.send("snapshot", "scroll-done"); - }, 500); - }); - var onComplete = function() {}; - ipc.on("complete", function() { - onComplete.apply(this, arguments); - }); +var onScroll = function() {}; +ipc.on("scroll", function() { + onScroll.apply(this, arguments); + setTimeout(function() { + ipc.send("snapshot", "scroll-done"); + }, 500); +}); +var onComplete = function() {}; +ipc.on("complete", function() { + onComplete.apply(this, arguments); +}); - function captureElement(options, callback) { - window.scroll(0, 0); - setTimeout(function() { - var rect = options.el.getBoundingClientRect(); - onScroll = function(event, arg) { - window.scrollTo(0, arg); - }; - onComplete = function() { - if (callback) callback(); - onComplete = function() {}; - }; - ipc.send("snapshot", { - name: options.name, - windowWidth: windowWidth, - windowHeight: windowHeight, - doubleTrim: options.doubleTrim, - dpi: dpi, - x: rect.left | 0, - y: rect.top | 0, - width: rect.width | 0, - height: rect.height | 0 - }); - }, 10); - } - - window.onload = function() { - var snapshotTasks = [ - { - el: document.querySelector("#downloadoptions"), - name: "download-options", - doubleTrim: "white" - }, - { - el: document.querySelector("#languages"), - name: "languages" - }, - { - el: document.querySelector("#variants"), - name: "variants" - }, - { - el: document.querySelector("#stylesets"), - name: "stylesets" - }, - { - el: document.querySelector("#charvars"), - name: "charvars" - }, - { - el: document.querySelector("#matrix"), - name: "matrix" - }, - { - el: document.querySelector("#family"), - name: "family" - }, - { - el: document.querySelector("#previews"), - name: "preview-all" - }, - { - el: document.querySelector("#weights"), - name: "weights" - }, - { - el: document.querySelector("#ligations"), - name: "ligations", - doubleTrim: "white" - } - ]; - current = 0; - var step = function() { - var doit = function() { - captureElement(snapshotTasks[current], function() { - current += 1; - if (current >= snapshotTasks.length) window.close(); - else setTimeout(step, 100); - }); - }; - if (snapshotTasks[current].prepare) snapshotTasks[current].prepare(doit); - else setTimeout(doit, 100); - }; - ipc.send("snapshot", "i am ready"); - console.log("I AM READY"); - setTimeout(step, 2000); +function captureElement(options, callback) { + window.scroll(0, 0); + setTimeout(function() { + var rect = options.el.getBoundingClientRect(); + onScroll = function(event, arg) { + window.scrollTo(0, arg); }; - })(); + onComplete = function() { + if (callback) callback(); + onComplete = function() {}; + }; + ipc.send("snapshot", { + name: options.name, + windowWidth: windowWidth, + windowHeight: windowHeight, + doubleTrim: options.doubleTrim, + dpi: dpi, + x: rect.left | 0, + y: rect.top | 0, + width: rect.width | 0, + height: rect.height | 0 + }); + }, 10); +} + +window.onload = function() { + var snapshotTasks = [ + { + el: document.querySelector("#downloadoptions"), + name: "download-options", + doubleTrim: "white" + }, + { + el: document.querySelector("#languages"), + name: "languages" + }, + { + el: document.querySelector("#variants"), + name: "variants" + }, + { + el: document.querySelector("#stylesets"), + name: "stylesets" + }, + { + el: document.querySelector("#charvars"), + name: "charvars" + }, + { + el: document.querySelector("#matrix"), + name: "matrix" + }, + { + el: document.querySelector("#family"), + name: "family" + }, + { + el: document.querySelector("#previews"), + name: "preview-all" + }, + { + el: document.querySelector("#weights"), + name: "weights" + }, + { + el: document.querySelector("#ligations"), + name: "ligations", + doubleTrim: "white" + } + ]; + current = 0; + var step = function() { + var doit = function() { + captureElement(snapshotTasks[current], function() { + current += 1; + if (current >= snapshotTasks.length) window.close(); + else setTimeout(step, 100); + }); + }; + if (snapshotTasks[current].prepare) snapshotTasks[current].prepare(doit); + else setTimeout(doit, 100); + }; + ipc.send("snapshot", "i am ready"); + console.log("I AM READY"); + setTimeout(step, 2000); +}; diff --git a/snapshot/index.styl b/snapshot/index.styl index dc3ba984d..031024035 100644 --- a/snapshot/index.styl +++ b/snapshot/index.styl @@ -1,301 +1,372 @@ -@import url(iosevka/webfont.css) -@import url(iosevka-slab/webfont.css) +@import url('iosevka/webfont.css'); +@import url('iosevka-slab/webfont.css'); -.thin { font-weight: 100 } -.extralight { font-weight: 200 } -.light { font-weight: 300 } -.medium { font-weight: 500 } -.semibold { font-weight: 600 } -.bold { font-weight: 700 } -.extrabold { font-weight: 800 } -.heavy { font-weight: 900 } -.italic { font-style: italic } -.oblique { font-style: oblique } -.slab { font-family: "Iosevka Slab Web", monospace } +.thin + font-weight: 100; -html,body{ - margin: 0 - padding:0 -} -body { - font-family: "Iosevka Web" - background: #008000 - padding-bottom: 60em - font-size: 15px -} -pre, code { font-family: "Iosevka Web"; } +.extralight + font-weight: 200; -::-webkit-scrollbar {display: none;} +.light + font-weight: 300; -body > section { - margin: 3em auto - width: 900px - background: white -} +.medium + font-weight: 500; + +.semibold + font-weight: 600; + +.bold + font-weight: 700; + +.extrabold + font-weight: 800; + +.heavy + font-weight: 900; + +.italic + font-style: italic; + +.slab + font-family: 'Iosevka Slab Web', monospace; + + &.oblique + font-family: 'Iosevka Slab Web Oblique', monospace; + +.oblique + font-family: 'Iosevka Web Oblique', monospace; + +html, body + margin: 0; + padding: 0; + +body + font-family: 'Iosevka Web'; + background: #008000; + padding-bottom: 60em; + font-size: 15px; + +pre, code + font-family: 'Iosevka Web'; + +::-webkit-scrollbar + display: none; + +body > section + margin: 3em auto; + width: 900px; + background: white; /* hljs */ -section.preview { - text-align: center - font-size: 80% -} -section.preview pre { - display: inline-block - text-align: left - margin: 1.2rem 0 - line-height: 1.5 -} -section.color-light { - background-color: hsl(39, 6%, 95%) - color: #333 -} -.color-light .keyword, .color-light .class, .color-light .tag, .color-light .pseudo, .color-light .attr_selector, .color-light .constant, .color-light .xml .title { - color: #446fbd -} -.color-light .comment { - color: hsl(0, 0%, 62%) -} -.color-light .title, .color-light .attribute, .color-light .params, .color-light .built_in { - color: #8757ad -} -.color-light .string, .color-light .pi, .color-light .language-less .keyword, .color-light .xml .value { - color: #e88501 -} -.color-light .number, .color-light .xml .attribute { - color: #6d8600 -} -.color-light .operator { - color: #c33500 -} -section.color-dark { - background-color: hsl(39, 6%, 12%) - color: #cfcfcf -} -.color-dark .keyword, .color-dark .class, .color-dark .tag, .color-dark .pseudo, .color-dark .attr_selector, .color-dark .constant, .color-dark .xml .title { - color: #6c9ef8 -} -.color-dark .comment { - color: #767676 -} -.color-dark .title, .color-dark .attribute, .color-dark .params, .color-dark .built_in { - color: #b77fdb -} -.color-dark .string, .color-dark .pi, .color-dark .language-less .keyword, .color-dark .xml .value { - color: #D89333 -} -.color-dark .number, .color-dark .xml .attribute { - color: #85a300 -} -.color-dark .operator { - color: #c34564 -} +section.preview + text-align: center; + font-size: 80%; + +section.preview pre + display: inline-block; + text-align: left; + margin: 1.2rem 0; + line-height: 1.5; + +section.color-light + background-color: hsl(39, 6%, 95%); + color: #333; + +.color-light .keyword, .color-light .class, .color-light .tag, .color-light .pseudo, .color-light .attr_selector, .color-light .constant, .color-light .xml .title + color: #446fbd; + +.color-light .comment + color: hsl(0, 0%, 62%); + +.color-light .title, .color-light .attribute, .color-light .params, .color-light .built_in + color: #8757ad; + +.color-light .string, .color-light .pi, .color-light .language-less .keyword, .color-light .xml .value + color: #e88501; + +.color-light .number, .color-light .xml .attribute + color: #6d8600; + +.color-light .operator + color: #c33500; + +section.color-dark + background-color: hsl(39, 6%, 12%); + color: #cfcfcf; + +.color-dark .keyword, .color-dark .class, .color-dark .tag, .color-dark .pseudo, .color-dark .attr_selector, .color-dark .constant, .color-dark .xml .title + color: #6c9ef8; + +.color-dark .comment + color: #767676; + +.color-dark .title, .color-dark .attribute, .color-dark .params, .color-dark .built_in + color: #b77fdb; + +.color-dark .string, .color-dark .pi, .color-dark .language-less .keyword, .color-dark .xml .value + color: #D89333; + +.color-dark .number, .color-dark .xml .attribute + color: #85a300; + +.color-dark .operator + color: #c34564; section#matrix - height: 480px - position: relative - > div - position: absolute - font-size: 90px - left: 50% - margin-left: -4.75em - top: 50% - margin-top: -1.95em - > row - display: block - text-align: center - line-height: 0.8em - > span - font-size: 0.4em - padding: 0 0.5em - &.slab - margin-left: -4.25em - margin-top: -1.44em + height: 480px; + position: relative; -section#matrix > div > row > span { - font-size: 0.4em - padding: 0 0.5em -} + > div + position: absolute; + font-size: 90px; + left: 50%; + margin-left: -4.75em; + top: 50%; + margin-top: -1.95em; + + > row + display: block; + text-align: center; + line-height: 0.8em; + + > span + font-size: 0.4em; + padding: 0 0.5em; + + &.slab + margin-left: -4.25em; + margin-top: -1.44em; + +section#matrix > div > row > span + font-size: 0.4em; + padding: 0 0.5em; section.opentype - width: 36em - padding: 0 8em - > h2 { display: none } + width: 36em; + padding: 0 8em; + + > h2 + display: none; + > div.hr - font-size: 80% - text-transform: uppercase - letter-spacing: 0.2em - margin: 3rem auto - text-align: center - display: block + font-size: 80%; + text-transform: uppercase; + letter-spacing: 0.2em; + margin: 3rem auto; + text-align: center; + display: block; + &:before, &:after - content: '' - display: inline-block - border-bottom: 1px solid #ddd - width: 4em - margin: 0 1em - vertical-align: 0.3em + content: ''; + display: inline-block; + border-bottom: 1px solid #ddd; + width: 4em; + margin: 0 1em; + vertical-align: 0.3em; > ol - list-style none - margin 0 - padding 0 - font-size 1em - width 36em + list-style: none; + margin: 0; + padding: 0; + font-size: 1em; + width: 36em; + > li - margin 0 - padding 0 - position relative - height 4.5em - border-top 1px solid #eee - margin-top 0.4em - padding-top 0.4em + margin: 0; + padding: 0; + position: relative; + height: 4.5em; + border-top: 1px solid #eee; + margin-top: 0.4em; + padding-top: 0.4em; + &:first-child - border-top none - margin-top 0 + border-top: none; + margin-top: 0; + > .tag - display block - position absolute - top calc(0.8em - 0.2em - 1px) - left 0 - font-size 0.8em - width 2em - border 1px solid rgba(0, 0, 0, 0.25) - padding 0.2em - padding-bottom 0.1em - text-align center - border-radius 0.2em + display: block; + position: absolute; + top: calc(0.8em - 0.2em - 1px); + left: 0; + font-size: 0.8em; + width: 2em; + border: 1px solid rgba(0, 0, 0, 0.25); + padding: 0.2em; + padding-bottom: 0.1em; + text-align: center; + border-radius: 0.2em; + > .description - display block - position absolute - top 0.8em - right 0 - font-style italic - font-size 0.8em - color rgba(0, 0, 0, 0.5) + display: block; + position: absolute; + top: 0.8em; + right: 0; + font-style: italic; + font-size: 0.8em; + color: rgba(0, 0, 0, 0.5); + > .sample - display block - margin-top 1.6em - &.italic { margin-top: 0.25em } + display: block; + margin-top: 1.6em; + + &.italic + margin-top: 0.25em; + &.narrow - display flex - justify-content center - flex-wrap wrap + display: flex; + justify-content: center; + flex-wrap: wrap; width: 35em; margin-left: ((35.5em - 35em) / 2); + > li - margin 0 0.5em 0.5em - border none - width 4em - flex none + margin: 0 0.5em 0.5em; + border: none; + width: 4em; + flex: none; + > .tag - width auto - left 50% - margin-left calc(-1.2em - 1px) + width: auto; + left: 50%; + margin-left: calc(-1.2em - 1px); + > .sample - display inline-block - font-size 2em - margin-top 0.9em - width 1em - text-align center + display: inline-block; + font-size: 2em; + margin-top: 0.9em; + width: 1em; + text-align: center; + b - font-weight normal - color #c33500 + font-weight: normal; + color: #c33500; #family - background: white - font-size: 0.9em - .group { display: flex } + background: white; + font-size: 0.9em; + + .group + display: flex; + .group a - display: block - padding: 0.5rem - flex: 1 - text-shadow: none - color: black - text-decoration: none - &.italic, &.oblique { flex: 1.3 } - &.slab { flex: 1.2 } - &.slab.italic, &.slab.oblique { flex: 1.7 } + display: block; + padding: 0.5rem; + flex: 1; + text-shadow: none; + color: black; + text-decoration: none; + + &.italic, &.oblique + flex: 1.3; + + &.slab + flex: 1.2; + + &.slab.italic, &.slab.oblique + flex: 1.7; #downloadoptions - display: flex - justify-content: center + display: flex; + justify-content: center; + > div - flex: none - width: 12em - border: 3px solid #ddd - border-radius: 1em - margin: 0.5em + flex: none; + width: 12em; + border: 3px solid #ddd; + border-radius: 1em; + margin: 0.5em; + > h3 - margin: 0 - padding: 1rem 0 1rem 0 - text-align: center - font-weight: bold - font-size: 1em + margin: 0; + padding: 1rem 0 1rem 0; + text-align: center; + font-weight: bold; + font-size: 1em; + > ul - display: flex - list-style: none - margin: 0 - padding: 0 - justify-content: center + display: flex; + list-style: none; + margin: 0; + padding: 0; + justify-content: center; + > li - margin: 0 - padding: 0 - height: 3.5em - position: relative - padding: 0 0.5em 1em + margin: 0; + padding: 0; + height: 3.5em; + position: relative; + padding: 0 0.5em 1em; + > div - font-size: 0.8em - height: 2em - width: 2em - line-height: 2em - text-align: center - padding: 0.5em - border: 1px solid #ddd - border-radius: 0.5em + font-size: 0.8em; + height: 2em; + width: 2em; + line-height: 2em; + text-align: center; + padding: 0.5em; + border: 1px solid #ddd; + border-radius: 0.5em; + > h4 - position: absolute - left: 0 - right: 0 - bottom: 1.25em - margin: 0 - font-size: 0.6em - text-align: center - font-weight: normal + position: absolute; + left: 0; + right: 0; + bottom: 1.25em; + margin: 0; + font-size: 0.6em; + text-align: center; + font-weight: normal; + .missing - color: rgba(0, 0, 0, 0.25) + color: rgba(0, 0, 0, 0.25); + span - outline: 1px solid rgba(0, 0, 0, 0.2) + outline: 1px solid rgba(0, 0, 0, 0.2); + .fwm - padding-left: 0.25em - padding-right: 0.25em - margin-right: 0.25em - margin-left: -0.125em + padding-left: 0.25em; + padding-right: 0.25em; + margin-right: 0.25em; + margin-left: -0.125em; + .fwl - padding-right: 0.5em + padding-right: 0.5em; #ligations > table - border-spacing 0 - border-top 2px solid black - border-bottom 2px solid black - margin 1em auto + border-spacing: 0; + border-top: 2px solid black; + border-bottom: 2px solid black; + margin: 1em auto; + th - white-space nowrap + white-space: nowrap; + pre - margin 0 + margin: 0; + th, td - padding: 0.4em 1em - text-align: left + padding: 0.4em 1em; + text-align: left; + tr.note td - border-top 1px solid black - font-style italic - color #c33500 + border-top: 1px solid black; + + font-style: italic; + color: #c33500; + em, e - font-style normal - color #444 + font-style: normal; + color: #444; + e - font-feature-settings: "cv19" on + font-feature-settings: 'cv19' on; + s, .nolig - text-decoration: none - opacity: 0.25 + text-decoration: none; + opacity: 0.25; + .nolig - font-feature-settings: "calt" 0 \ No newline at end of file + font-feature-settings: 'calt' 0; \ No newline at end of file diff --git a/utility/make-webfont-css.js b/utility/make-webfont-css.js index b30024e51..624753f67 100644 --- a/utility/make-webfont-css.js +++ b/utility/make-webfont-css.js @@ -14,6 +14,16 @@ module.exports = function(output, family, hs, formats) { src: ${src}; } `; + if (term.cssStyle === "oblique") { + // CHROME hates a family with both Italic and Oblique + ans += ` +@font-face { + font-family: '${family + " Web Oblique"}'; + font-weight: ${term.cssWeight}; + src: ${src}; +} +`; + } } fs.writeFileSync(output, ans); }; diff --git a/verdafile.js b/verdafile.js index 874e37943..d76107a6c 100644 --- a/verdafile.js +++ b/verdafile.js @@ -61,14 +61,16 @@ const RawPlans = oracle(`raw-plans`, async target => { // Style groups if (!plan.pre) plan.pre = {}; if (!plan.post) plan.post = {}; + if (!plan.pre.design) plan.pre.design = plan.design || []; if (!plan.pre.upright) plan.pre.upright = plan.upright || []; - if (!plan.pre.italic) plan.pre.italic = plan.italic || []; if (!plan.pre.oblique) plan.pre.oblique = plan.oblique || []; + if (!plan.pre.italic) plan.pre.italic = plan.italic || []; + if (!plan.post.design) plan.post.design = []; if (!plan.post.upright) plan.post.upright = []; - if (!plan.post.italic) plan.post.italic = []; if (!plan.post.oblique) plan.post.oblique = []; + if (!plan.post.italic) plan.post.italic = []; } for (const prefix in t.collectPlans) { t.collectPlans[prefix].prefix = prefix; @@ -385,7 +387,7 @@ const SampleImagesPre = task(`sample-images:pre`, async target => { }); const SnapShotCSS = file(`snapshot/index.css`, async target => { await target.need(fu`snapshot/index.styl`); - await cd(`snapshot`).run(`stylus`, `index.styl`, `-c`); + await run(`npm`, `run`, `stylus`, `snapshot/index.styl`, `-c`); }); const TakeSampleImages = task(`sample-images:take`, async target => { await target.need(SampleImagesPre, SnapShotCSS);