This commit is contained in:
be5invis 2017-06-03 17:51:21 +08:00
parent ae6380daee
commit fead1a81ea
16 changed files with 122 additions and 82 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 416 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 KiB

After

Width:  |  Height:  |  Size: 318 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 KiB

After

Width:  |  Height:  |  Size: 925 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 358 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

After

Width:  |  Height:  |  Size: 266 KiB

Before After
Before After

View file

@ -1,4 +1,4 @@
VERSION = 1.12.5 VERSION = 1.13.0
export VERSION export VERSION
start : __start start : __start

165
maker.js
View file

@ -1,55 +1,57 @@
const fs = require("fs"); const fs = require('fs');
const path = require("path"); const path = require('path');
const argv = require("yargs").argv; const argv = require('yargs').argv;
const pad = require('pad');
const weights = ['thin', 'extralight', 'light', 'book', 'medium', 'bold', 'heavy'];
const slantnesses = ['upright', 'italic', 'oblique'];
const widths = ['term', 'normal', 'cc'];
const designs = ['sans', 'slab'];
const weights = ["thin", "extralight", "light", "book", "medium", "bold", "heavy"]; function present(x) {
const slantnesses = ["upright", "italic", "oblique"]; return !!x;
const widths = ["term", "normal", "cc"]; }
const designs = ["sans", "slab"];
function present(x) { return !!x; }
function tofn(a) { function tofn(a) {
return a.filter(present).join("-"); return a.filter(present).join('-');
} }
function getMapping(options) { function getMapping(options) {
options = options || { options = options || {
design: [], design: [],
width: "normal", width: 'normal',
weight: "book", weight: 'book',
slantness: "upright", slantness: 'upright',
styles: {}, styles: {},
dirPrefix: "", dirPrefix: '',
dirSuffix: "", dirSuffix: '',
filePrefix: "", filePrefix: '',
infix: "", infix: '',
fileSuffix: "" fileSuffix: ''
}; };
let design = options.design || []; let design = options.design || [];
let prestyle = options.prestyle || []; let prestyle = options.prestyle || [];
let weight = options.weight || "book"; let weight = options.weight || 'book';
let slantness = options.slantness || "upright"; let slantness = options.slantness || 'upright';
let hives = ["iosevka"].concat( let hives = ['iosevka'].concat(
prestyle, prestyle,
["w-" + weight, "s-" + slantness], ['w-' + weight, 's-' + slantness],
(options.styles || {})[slantness] || [], (options.styles || {})[slantness] || [],
design design
); );
let dir = [ let dir = [options.dirPrefix || '', 'iosevka', options.infix || tofn(design), options.dirSuffix || '']
options.dirPrefix || "", .filter(present)
"iosevka", .join('-');
options.infix || tofn(design),
options.dirSuffix || ""
].filter(present).join("-");
let filename = [ let filename = [
options.filePrefix || "", options.filePrefix || '',
"iosevka", 'iosevka',
options.infix || tofn(design), options.infix || tofn(design),
options.fileSuffix || "", options.fileSuffix || '',
(weight === "book" ? (slantness === "upright" ? "regular" : "") : weight) + (slantness === "upright" ? "" : slantness) (weight === 'book' ? slantness === 'upright' ? 'regular' : '' : weight) +
].filter(present).join("-"); (slantness === 'upright' ? '' : slantness)
]
.filter(present)
.join('-');
return { hives, dir, filename, custom: options.custom }; return { hives, dir, filename, custom: options.custom };
} }
@ -64,12 +66,12 @@ function createMake(mapping) {
let woffTarget = `$(DIST)/${dir}/woff/${filename}.woff`; let woffTarget = `$(DIST)/${dir}/woff/${filename}.woff`;
let woff2Target = `$(DIST)/${dir}/woff2/${filename}.woff2`; let woff2Target = `$(DIST)/${dir}/woff2/${filename}.woff2`;
let buf = ""; let buf = '';
if (!definedBuildSeqs[tfname]) { if (!definedBuildSeqs[tfname]) {
buf += ` buf += `
${tfname} : ${custom || ''} $(SCRIPTS) | $(BUILD) $(DIST)/${dir}/ ${tfname} : ${custom || ''} $(SCRIPTS) | $(BUILD) $(DIST)/${dir}/
@echo Building ${filename} with ${hives.join(' ')} @echo Building ${filename} with ${hives.join(' ')}
$(GENERATE) ${hives.join(' ')} -o $@ ${cm ? ('--charmap $(BUILD)/' + filename + '.charmap') : ''}`; $(GENERATE) ${hives.join(' ')} -o $@ ${cm ? '--charmap $(BUILD)/' + filename + '.charmap' : ''}`;
definedBuildSeqs[tfname] = true; definedBuildSeqs[tfname] = true;
} }
buf += ` buf += `
@ -98,7 +100,7 @@ if (argv.custom) {
designGroups = [ designGroups = [
{ {
custom: '$(BUILD)/targets-' + argv.custom + '.mk', custom: '$(BUILD)/targets-' + argv.custom + '.mk',
name: "customized-" + argv.custom, name: 'customized-' + argv.custom,
design: argv.design.trim().split(/ +/), design: argv.design.trim().split(/ +/),
prestyle: argv.prestyle.trim().split(/ +/), prestyle: argv.prestyle.trim().split(/ +/),
width: argv.width, width: argv.width,
@ -112,21 +114,30 @@ if (argv.custom) {
]; ];
} else { } else {
designGroups = [ designGroups = [
{ name: "sans", design: [], dirPrefix: "" }, { name: 'sans', design: [], dirPrefix: '' },
{ name: "slab", design: ["slab"], dirPrefix: "" }, { name: 'slab', design: ['slab'], dirPrefix: '' },
{ name: "r-sans", design: [], dirPrefix: "01" }, { name: 'r-sans', design: [], dirPrefix: '01' },
{ name: "r-sans-term", design: ["term"], dirPrefix: "02" }, { name: 'r-sans-term', design: ['term'], dirPrefix: '02' },
{ name: "r-sans-type", design: ["type"], dirPrefix: "03" }, { name: 'r-sans-type', design: ['type'], dirPrefix: '03' },
{ name: "r-sans-cc", design: ["cc"], dirPrefix: "04" }, { name: 'r-sans-cc', design: ['cc'], dirPrefix: '04' },
{ name: "r-slab", design: ["slab"], dirPrefix: "05" }, { name: 'r-slab', design: ['slab'], dirPrefix: '05' },
{ name: "r-slab-term", design: ["term", "slab"], dirPrefix: "06" }, { name: 'r-slab-term', design: ['term', 'slab'], dirPrefix: '06' },
{ name: "r-slab-type", design: ["type", "slab"], dirPrefix: "07" }, { name: 'r-slab-type', design: ['type', 'slab'], dirPrefix: '07' },
{ name: "r-slab-cc", design: ["cc", "slab"], dirPrefix: "08" }, { name: 'r-slab-cc', design: ['cc', 'slab'], dirPrefix: '08' }
{ name: "r-hooky", design: [], infix: "hooky", dirPrefix: "09", styles: { upright: ["v-l-hooky", "v-i-hooky"] } },
{ name: "r-hooky-term", design: ["term"], infix: "hooky-term", dirPrefix: "10", styles: { upright: ["v-l-hooky", "v-i-hooky"] } },
{ name: "r-zshaped", design: [], infix: "zshaped", dirPrefix: "11", styles: { upright: ["v-l-zshaped", "v-i-zshaped"] } },
{ name: "r-zshaped-term", design: ["term"], infix: "zshaped-term", dirPrefix: "12", styles: { upright: ["v-l-zshaped", "v-i-zshaped"] } },
]; ];
for (let j = 1; j <= 11; j++) {
const tag = 'ss' + pad(2, '' + j, '0');
designGroups.push({
name: `r-sans-${tag}`,
design: [tag],
dirPrefix: ``
});
designGroups.push({
name: `r-sans-term-${tag}`,
design: ['term', tag],
dirPrefix: ``
});
}
} }
let makes = []; let makes = [];
@ -141,25 +152,33 @@ for (let dg of designGroups) {
woff2: [] woff2: []
}; };
const groupMapping = getMapping(dg); const groupMapping = getMapping(dg);
makes.push(` makes.push(
`
$(DIST)/${groupMapping.dir}/ : | $(DIST)/ $(DIST)/${groupMapping.dir}/ : | $(DIST)/
-@mkdir -p $@`); -@mkdir -p $@`
makes.push(` );
makes.push(
`
$(DIST)/${groupMapping.dir}/ttf/ : | $(DIST)/${groupMapping.dir}/ $(DIST)/${groupMapping.dir}/ttf/ : | $(DIST)/${groupMapping.dir}/
-@mkdir -p $@`); -@mkdir -p $@`
makes.push(` );
makes.push(
`
$(DIST)/${groupMapping.dir}/woff/ : | $(DIST)/${groupMapping.dir}/ $(DIST)/${groupMapping.dir}/woff/ : | $(DIST)/${groupMapping.dir}/
-@mkdir -p $@`); -@mkdir -p $@`
makes.push(` );
makes.push(
`
$(DIST)/${groupMapping.dir}/woff2/ : | $(DIST)/${groupMapping.dir}/ $(DIST)/${groupMapping.dir}/woff2/ : | $(DIST)/${groupMapping.dir}/
-@mkdir -p $@`); -@mkdir -p $@`
);
for (let weight of weights) for (let weight of weights)
for (let slantness of slantnesses) { for (let slantness of slantnesses) {
let config = Object.create(dg); let config = Object.create(dg);
config.weight = weight; config.weight = weight;
config.slantness = slantness; config.slantness = slantness;
const mapping = getMapping(config); const mapping = getMapping(config);
if (weight === "book" && slantness === "upright") { if (weight === 'book' && slantness === 'upright') {
mapping.cm = true; mapping.cm = true;
} }
@ -176,8 +195,10 @@ $(DIST)/${groupMapping.dir}/woff2/ : | $(DIST)/${groupMapping.dir}/
makes.push(`fonts-${dg.name}-italic : ${groupTargets.italic.join(' ')}`); makes.push(`fonts-${dg.name}-italic : ${groupTargets.italic.join(' ')}`);
makes.push(`fonts-${dg.name}-oblique : ${groupTargets.oblique.join(' ')}`); makes.push(`fonts-${dg.name}-oblique : ${groupTargets.oblique.join(' ')}`);
makes.push(`web-${dg.name} : ${groupTargets.woff.join(' ')} ${groupTargets.woff2.join(' ')}`); makes.push(`web-${dg.name} : ${groupTargets.woff.join(' ')} ${groupTargets.woff2.join(' ')}`);
makes.push(`$(ARCHIVEDIR)/${groupMapping.dir}-$(VERSION).zip : fonts-${dg.name} web-${dg.name} | $(ARCHIVEDIR)/ makes.push(
cd $(DIST)/${groupMapping.dir}/ && 7z a -tzip -r -mx=9 ../../$@ ./`); `$(ARCHIVEDIR)/${groupMapping.dir}-$(VERSION).zip : fonts-${dg.name} web-${dg.name} | $(ARCHIVEDIR)/
cd $(DIST)/${groupMapping.dir}/ && 7z a -tzip -r -mx=9 ../../$@ ./`
);
makes.push(`archive-${dg.name} : $(ARCHIVEDIR)/${groupMapping.dir}-$(VERSION).zip`); makes.push(`archive-${dg.name} : $(ARCHIVEDIR)/${groupMapping.dir}-$(VERSION).zip`);
} }
@ -189,9 +210,11 @@ if (argv.custom) {
]; ];
// ttc // ttc
let ttcs = []; let ttcs = [];
makes.push(` makes.push(
`
$(DIST)/ttc/ : | $(DIST)/ $(DIST)/ttc/ : | $(DIST)/
-@mkdir -p $@`); -@mkdir -p $@`
);
for (let tg of ttcgroups) { for (let tg of ttcgroups) {
for (let weight of weights) { for (let weight of weights) {
for (let slantness of slantnesses) { for (let slantness of slantnesses) {
@ -209,20 +232,24 @@ $(DIST)/ttc/ : | $(DIST)/
config.slantness = slantness; config.slantness = slantness;
const mapping = getMapping(config); const mapping = getMapping(config);
ttcs.push(`$(DIST)/ttc/${mapping.filename}.ttc`); ttcs.push(`$(DIST)/ttc/${mapping.filename}.ttc`);
makes.push(` makes.push(
`
$(DIST)/ttc/${mapping.filename}.ttc : ${ttctargets.join(' ')} | $(DIST)/ttc/ $(DIST)/ttc/${mapping.filename}.ttc : ${ttctargets.join(' ')} | $(DIST)/ttc/
otfcc-ttcize -o $@ ${ttctargets.join(' ')} otfcc-ttcize -o $@ ${ttctargets.join(' ')}
`); `
);
} }
} }
} }
makes.push(`ttc : ${ttcs.join(' ')}`); makes.push(`ttc : ${ttcs.join(' ')}`);
makes.push(`$(ARCHIVEDIR)/iosevka-pack-$(VERSION).zip : ttc | $(ARCHIVEDIR)/ makes.push(
cd $(DIST)/ttc/ && 7z a -tzip -mx=9 ../../$@ ./*.ttc`); `$(ARCHIVEDIR)/iosevka-pack-$(VERSION).zip : ttc | $(ARCHIVEDIR)/
cd $(DIST)/ttc/ && 7z a -tzip -mx=9 ../../$@ ./*.ttc`
);
makes.push(`archive-ttc : $(ARCHIVEDIR)/iosevka-pack-$(VERSION).zip`); makes.push(`archive-ttc : $(ARCHIVEDIR)/iosevka-pack-$(VERSION).zip`);
makes.push(`__default : fonts-sans fonts-slab`); makes.push(`__default : fonts-sans fonts-slab`);
makes.push(`__release : archive-r-sans archive-r-slab archive-r-sans-term archive-r-sans-type archive-r-sans-cc archive-r-slab-term archive-r-slab-type archive-r-slab-cc archive-r-hooky archive-r-hooky-term archive-r-zshaped archive-r-zshaped-term archive-ttc`); makes.push(`__release : archive-ttc ${designGroups.map(g => 'archive-' + g.name).join(' ')}`);
} }
console.log(makes.join("\n\n")); console.log(makes.join('\n\n'));

View file

@ -9,6 +9,7 @@
"libspiro-js": ">=0.3.0", "libspiro-js": ">=0.3.0",
"object-assign": "^4.1.1", "object-assign": "^4.1.1",
"otfcc-c2q": "^0.5.0", "otfcc-c2q": "^0.5.0",
"pad": "^1.1.0",
"patel": ">=0.32.0", "patel": ">=0.32.0",
"toml": ">=2.3.0", "toml": ">=2.3.0",
"topsort": "0.0.2", "topsort": "0.0.2",

View file

@ -1,7 +1,7 @@
[iosevka] [iosevka]
family = 'Iosevka' family = 'Iosevka'
version = '1.12.5' version = '1.13.0'
codename = 'Lorraine-5' codename = 'Marisa'
copyright = 'Copyright (c) 2015-2017 Belleve Invis.' copyright = 'Copyright (c) 2015-2017 Belleve Invis.'
licence = '''This font software is licenced under the SIL Open Font Licence, Version 1.1. This is licence is avaliable with a FAQ at: http://scripts.sil.org/OFL. This font software is distributes on an 'AS IS' basis, without warranties or conditions of any kind, either express or implied. See the SIL Open Font licence fot the specific language, premissions and limitations governing your use of this font software.''' licence = '''This font software is licenced under the SIL Open Font Licence, Version 1.1. This is licence is avaliable with a FAQ at: http://scripts.sil.org/OFL. This font software is distributes on an 'AS IS' basis, without warranties or conditions of any kind, either express or implied. See the SIL Open Font licence fot the specific language, premissions and limitations governing your use of this font software.'''
manufacturer = 'Belleve Invis' manufacturer = 'Belleve Invis'

View file

@ -60,6 +60,10 @@
<span class="tag">ss10</span><span class="description">Envy Code R Style</span> <span class="tag">ss10</span><span class="description">Envy Code R Style</span>
<span class="sample" style="font-feature-settings:'ss10'"><b>@</b>re<b>a</b><b>l</b> fox.qu<b>i</b>ck(h)<b>{</b> <b>*</b><b>i</b>s<b>_</b>brown &amp;&amp; <b>i</b>t<b>_</b>jumps<b>_</b>over(do<b>g</b>es.<b>l</b><b>a</b>zy) <b>}</b> <b>0</b>123456789</span><span class="sample italic" style="font-feature-settings:'ss10'"><b>@</b>re<b>a</b><b>l</b> fox.qu<b>i</b>ck(h)<b>{</b> <b>*</b><b>i</b>s<b>_</b>brown &amp;&amp; <b>i</b>t<b>_</b>jumps<b>_</b>over(do<b>g</b>es.<b>l</b><b>a</b>zy) <b>}</b> <b>0</b>123456789</span> <span class="sample" style="font-feature-settings:'ss10'"><b>@</b>re<b>a</b><b>l</b> fox.qu<b>i</b>ck(h)<b>{</b> <b>*</b><b>i</b>s<b>_</b>brown &amp;&amp; <b>i</b>t<b>_</b>jumps<b>_</b>over(do<b>g</b>es.<b>l</b><b>a</b>zy) <b>}</b> <b>0</b>123456789</span><span class="sample italic" style="font-feature-settings:'ss10'"><b>@</b>re<b>a</b><b>l</b> fox.qu<b>i</b>ck(h)<b>{</b> <b>*</b><b>i</b>s<b>_</b>brown &amp;&amp; <b>i</b>t<b>_</b>jumps<b>_</b>over(do<b>g</b>es.<b>l</b><b>a</b>zy) <b>}</b> <b>0</b>123456789</span>
</li> </li>
<li>
<span class="tag">ss11</span><span class="description">X Windows Fixed Style</span>
<span class="sample" style="font-feature-settings:'ss11'"><b>@</b>re<b>a</b><b>l</b> fox.qu<b>i</b>ck(h)<b>{</b> <b>*</b><b>i</b>s<b>_</b>brown &amp;&amp; <b>i</b>t<b>_</b>jumps<b>_</b>over(do<b>g</b>es.<b>l</b><b>a</b>zy) <b>}</b> <b>0</b>123456789</span><span class="sample italic" style="font-feature-settings:'ss11'"><b>@</b>re<b>a</b><b>l</b> fox.qu<b>i</b>ck(h)<b>{</b> <b>*</b><b>i</b>s<b>_</b>brown &amp;&amp; <b>i</b>t<b>_</b>jumps<b>_</b>over(do<b>g</b>es.<b>l</b><b>a</b>zy) <b>}</b> <b>0</b>123456789</span>
</li>
</ol><div class="hr">Character Variants</div> </ol><div class="hr">Character Variants</div>
<ol class="narrow"> <ol class="narrow">
<li> <li>

View file

@ -16,26 +16,30 @@ web : web-sans web-slab
release : __release pages sample-images release : __release pages sample-images
test : fonts-sans fonts-slab test : fonts-sans fonts-slab
cp dist/iosevka/*.ttf testdrive/assets/ cp dist/iosevka/ttf/* testdrive/assets/
cp dist/iosevka-slab/*.ttf testdrive/assets/ cp dist/iosevka-slab/ttf/* testdrive/assets/
cp build/iosevka-regular.charmap testdrive/assets/ cp build/iosevka-regular.charmap testdrive/assets/
cp build/iosevka-slab-regular.charmap testdrive/assets/ cp build/iosevka-slab-regular.charmap testdrive/assets/
pages : fonts-sans fonts-slab web-sans web-slab pages : fonts-sans fonts-slab web-sans web-slab
cp dist/iosevka/*.ttf pages/assets/ cp dist/iosevka/ttf/* pages/assets/
cp dist/iosevka/web/* pages/assets/ cp dist/iosevka/woff/* pages/assets/
cp dist/iosevka-slab/*.ttf pages/assets/ cp dist/iosevka/woff2/* pages/assets/
cp dist/iosevka-slab/web/* pages/assets/ cp dist/iosevka-slab/ttf/* pages/assets/
cp dist/iosevka-slab/woff/* pages/assets/
cp dist/iosevka-slab/woff2/* pages/assets/
cp build/iosevka-regular.charmap pages/assets/ cp build/iosevka-regular.charmap pages/assets/
cp build/iosevka-slab-regular.charmap pages/assets/ cp build/iosevka-slab-regular.charmap pages/assets/
fw : ttc fw : ttc
d-snapshot : fonts-sans fonts-slab web-sans web-slab d-snapshot : fonts-sans fonts-slab web-sans web-slab
cp dist/iosevka/*.ttf snapshot/assets/ cp dist/iosevka/ttf/* snapshot/assets/
cp dist/iosevka/web/* snapshot/assets/ cp dist/iosevka/woff/* snapshot/assets/
cp dist/iosevka-slab/*.ttf snapshot/assets/ cp dist/iosevka/woff2/* snapshot/assets/
cp dist/iosevka-slab/web/* snapshot/assets/ cp dist/iosevka-slab/ttf/* snapshot/assets/
cp dist/iosevka-slab/woff/* snapshot/assets/
cp dist/iosevka-slab/woff2/* snapshot/assets/
cp build/iosevka-regular.charmap snapshot/assets/ cp build/iosevka-regular.charmap snapshot/assets/
cp build/iosevka-slab-regular.charmap snapshot/assets/ cp build/iosevka-slab-regular.charmap snapshot/assets/
electronsnaps1: d-snapshot electronsnaps1: d-snapshot

View file

@ -269,3 +269,7 @@ upright = ['v-i-hooky']
# Envy Code R Style # Envy Code R Style
[composite.ss10] [composite.ss10]
design = ['v-at-long', 'v-a-doublestorey', 'v-underscore-low', 'v-g-singlestorey', 'v-i-hooky', 'v-l-hooky', 'v-asterisk-low'] design = ['v-at-long', 'v-a-doublestorey', 'v-underscore-low', 'v-g-singlestorey', 'v-i-hooky', 'v-l-hooky', 'v-asterisk-low']
# X Window Style
[composite.ss11]
design = ['v-g-singlestorey', 'v-zero-unslashed', 'v-tilde-high', 'v-brace-straight', 'v-dollar-through', 'v-three-flattop', 'v-at-long']