Merge branch 'master' into dev

This commit is contained in:
Belleve Invis 2020-05-19 20:57:49 -07:00
commit af0bdb0109
15 changed files with 179 additions and 135 deletions

View file

@ -38,6 +38,7 @@ Afrikaans, Aghem, Akan, Albanian, Asturian, Asu, Azerbaijani, Bafia, Bambara, Ba
<!-- END Section-Language-List --> <!-- END Section-Language-List -->
Iosevka supports accessing all letter variants using OpenType features. Iosevka supports accessing all letter variants using OpenType features.
![Style Sets](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/stylesets.png) ![Style Sets](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/stylesets.png)
@ -71,7 +72,9 @@ Since version 2.0, Iosevka would no longer support building via `makefile`. To i
2. Add a build plan into `private-build-plans.toml`, following this format: 2. Add a build plan into `private-build-plans.toml`, following this format:
```toml <!-- BEGIN Section-Private-Build-Plan-Sample -->
<!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->
[buildPlans.iosevka-custom] # <iosevka-custom> is your plan name [buildPlans.iosevka-custom] # <iosevka-custom> is your plan name
family = "Iosevka Custom" # Font menu family name family = "Iosevka Custom" # Font menu family name
design = ["v-i-hooky", "v-l-hooky"] # Customize styles design = ["v-i-hooky", "v-l-hooky"] # Customize styles
@ -125,7 +128,7 @@ Since version 2.0, Iosevka would no longer support building via `makefile`. To i
# default values. # default values.
# IMPORTANT : Currently "shape" property only support 3, 5, and 7, while "menu" only # IMPORTANT : Currently "shape" property only support 3, 5, and 7, while "menu" only
# support 1, 2, 3, 4, 5, 6, 7, 8, 9. # support 1, 2, 3, 4, 5, 6, 7, 8, 9.
# If you decide to use custom weights you have to define all the weights you # If you decide to use custom widths you have to define all the widths you
# plan to use otherwise they will not be built. # plan to use otherwise they will not be built.
[buildPlans.iosevka-custom.widths.normal] [buildPlans.iosevka-custom.widths.normal]
@ -183,7 +186,10 @@ Since version 2.0, Iosevka would no longer support building via `makefile`. To i
# End metric override section # End metric override section
################################################################################################### ###################################################################################################
```
<!-- END Section-Private-Build-Plan-Sample -->
3. Run `npm run build -- contents::<your plan name>` and the built fonts would be avaliable in `dist/`. Aside from `contents::<plan>`, other options are: 3. Run `npm run build -- contents::<your plan name>` and the built fonts would be avaliable in `dist/`. Aside from `contents::<plan>`, other options are:
@ -232,6 +238,7 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
<!-- END Section-Cherry-Picking-Predefined --> <!-- END Section-Cherry-Picking-Predefined -->
<!-- BEGIN Section-Cherry-Picking-Ligation-Sets --> <!-- BEGIN Section-Cherry-Picking-Ligation-Sets -->
<!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. --> <!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->
@ -265,6 +272,7 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
<!-- END Section-Cherry-Picking-Ligation-Sets --> <!-- END Section-Cherry-Picking-Ligation-Sets -->
<!-- BEGIN Section-Stylistic-Sets --> <!-- BEGIN Section-Stylistic-Sets -->
<!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. --> <!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->
@ -288,6 +296,7 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
<!-- END Section-Stylistic-Sets --> <!-- END Section-Stylistic-Sets -->
<!-- BEGIN Section-Cherry-Picking-Styles --> <!-- BEGIN Section-Cherry-Picking-Styles -->
<!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. --> <!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->
@ -431,6 +440,7 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
<!-- END Section-Cherry-Picking-Styles --> <!-- END Section-Cherry-Picking-Styles -->
## For Chinese and Japanese users... ## For Chinese and Japanese users...
→ [Sarasa Gothic](https://github.com/be5invis/Sarasa-Gothic). → [Sarasa Gothic](https://github.com/be5invis/Sarasa-Gothic).

View file

@ -1 +1,2 @@
* Fixed incorrect influence of Latin character variant features on Bulgarian Cyrillic (#532). * Fixed incorrect influence of Latin character variant features on Bulgarian Cyrillic (#532).
* Added TTC-only packages back.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 KiB

After

Width:  |  Height:  |  Size: 399 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 KiB

After

Width:  |  Height:  |  Size: 345 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 174 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 KiB

After

Width:  |  Height:  |  Size: 337 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 954 KiB

After

Width:  |  Height:  |  Size: 954 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

View file

@ -1,6 +1,6 @@
{ {
"name": "iosevka", "name": "iosevka",
"version": "3.0.0", "version": "3.0.1",
"main": "./generate.js", "main": "./generate.js",
"engines": { "engines": {
"node": ">=12.16.0" "node": ">=12.16.0"

View file

@ -51,7 +51,7 @@ oblique = "oblique"
# default values. # default values.
# IMPORTANT : Currently "shape" property only support 3, 5, and 7, while "menu" only # IMPORTANT : Currently "shape" property only support 3, 5, and 7, while "menu" only
# support 1, 2, 3, 4, 5, 6, 7, 8, 9. # support 1, 2, 3, 4, 5, 6, 7, 8, 9.
# If you decide to use custom weights you have to define all the weights you # If you decide to use custom widths you have to define all the widths you
# plan to use otherwise they will not be built. # plan to use otherwise they will not be built.
[buildPlans.iosevka-custom.widths.normal] [buildPlans.iosevka-custom.widths.normal]

View file

@ -21,6 +21,7 @@ async function main() {
readme = (await processLigSetCherryPicking()).apply(readme); readme = (await processLigSetCherryPicking()).apply(readme);
readme = (await processLigSetPreDef()).apply(readme); readme = (await processLigSetPreDef()).apply(readme);
readme = (await processLangList()).apply(readme); readme = (await processLangList()).apply(readme);
readme = (await processPrivateBuildPlans()).apply(readme);
await fs.writeFile(readmePath, readme); await fs.writeFile(readmePath, readme);
} }
@ -54,25 +55,34 @@ async function processCv() {
return md; return md;
} }
async function processPrivateBuildPlans() {
const md = new MdCol("Section-Private-Build-Plan-Sample");
const tomlPath = path.resolve(__dirname, "../../private-build-plans.sample.toml");
const toml = await fs.readFile(tomlPath, "utf-8");
md.log(toml.replace(/^/gm, "\t"));
return md;
}
class MdCol { class MdCol {
constructor(sectionName) { constructor(sectionName) {
this.data = ""; this.data = "";
this.sectionName = sectionName; this.sectionName = sectionName;
this.matchRegex = new RegExp( this.matchRegex = new RegExp(
`<!-- BEGIN ${sectionName} -->\\n[\\s\\S]*?<!-- END ${sectionName} -->\\n` `^([ \\t]*)<!-- BEGIN ${sectionName} -->\\n[\\s\\S]*?<!-- END ${sectionName} -->\\n`,
`m`
); );
} }
log(...s) { log(...s) {
this.data += s.join("") + "\n"; this.data += s.join("") + "\n";
} }
apply(s) { apply(s) {
return s.replace(this.matchRegex, () => { return s.replace(this.matchRegex, (m, $1) => {
return ( return (
`<!-- BEGIN ${this.sectionName} -->\n` + `<!-- BEGIN ${this.sectionName} -->\n` +
`<!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->\n\n` + `<!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->\n\n` +
this.data + this.data +
`\n<!-- END ${this.sectionName} -->\n` `\n<!-- END ${this.sectionName} -->\n`
); ).replace(/^/gm, $1);
}); });
} }
} }

View file

@ -23,7 +23,7 @@ async function main() {
await CopyMarkdown(out, "packages-desc.md"); await CopyMarkdown(out, "packages-desc.md");
await GeneratePackageList(out); await GeneratePackageList(out);
await CopyMarkdown(out, "style-set-sample-image.md"); await GenerateStyleSetImage(out);
await CopyMarkdown(out, "package-reorg.md"); await CopyMarkdown(out, "package-reorg.md");
await GenerateChangeList(out); await GenerateChangeList(out);
@ -132,7 +132,12 @@ async function GeneratePackageList(out) {
out.log(`</tr>`); out.log(`</tr>`);
} }
} }
out.log(`</table>\n`); }
async function GenerateStyleSetImage(out) {
out.log(
`![Style Sets](https://raw.githubusercontent.com/be5invis/Iosevka/v${Version}/images/stylesets.png)\n\n`
);
} }
function noBreak(s) { function noBreak(s) {

View file

@ -1 +0,0 @@
![Style Sets](https://raw.githubusercontent.com/be5invis/Iosevka/master/images/stylesets.png)

View file

@ -28,6 +28,7 @@ const webfontFormats = [
const SINGLE_GROUP_EXPORT_PREFIX = `ttf`; const SINGLE_GROUP_EXPORT_PREFIX = `ttf`;
const COLLECTION_EXPORT_PREFIX = `pkg`; const COLLECTION_EXPORT_PREFIX = `pkg`;
const TTC_ONLY_COLLECTION_EXPORT_PREFIX = `ttc`;
const BUILD_PLANS = path.relative(__dirname, path.resolve(__dirname, "./build-plans.toml")); const BUILD_PLANS = path.relative(__dirname, path.resolve(__dirname, "./build-plans.toml"));
const PRIVATE_BUILD_PLANS = path.relative( const PRIVATE_BUILD_PLANS = path.relative(
@ -341,33 +342,29 @@ const CollectionPartsOf = computed.group("metadata:collection-parts-of", async (
////// Font Building ////// ////// Font Building //////
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
const BuildOTD = file.make( const BuildTTF = file.make(
(gr, fn) => `${BUILD}/${gr}/${fn}.otd`, (gr, fn) => `${BUILD}/${gr}/${fn}.ttf`,
async (target, output, gr, fn) => { async (target, output, gr, fn) => {
const [fi] = await target.need(FontInfoOf(fn), Version); const [fi] = await target.need(FontInfoOf(fn), Version);
const charmap = output.dir + "/" + output.name + ".charmap"; const charmap = output.dir + "/" + output.name + ".charmap";
await target.need(Scripts, fu`parameters.toml`, de`${output.dir}`); await target.need(Scripts, fu`parameters.toml`, de`${output.dir}`);
await node("gen/index", { o: output.full, oCharMap: charmap, ...fi });
}
);
const BuildTTF = file.make( const otdPath = `${output.dir}/${output.name}.otd`;
(gr, fn) => `${BUILD}/${gr}/${fn}.ttf`, await node("gen/index", { o: otdPath, oCharMap: charmap, ...fi });
async (target, output, gr, fn) => {
const [otd] = await target.need(BuildOTD(gr, fn), de`${output.dir}`);
await run( await run(
"otfccbuild", "otfccbuild",
otd.full, otdPath,
["-o", `${output.full}`], ["-o", `${output.full}`],
["-O3", "--keep-average-char-width", "-q"] ["-O3", "--keep-average-char-width", "-q"]
); );
await rm(otdPath);
} }
); );
const BuildCM = file.make( const BuildCM = file.make(
(gr, f) => `${BUILD}/${gr}/${f}.charmap`, (gr, f) => `${BUILD}/${gr}/${f}.charmap`,
async (target, output, gr, f) => { async (target, output, gr, f) => {
await target.need(BuildOTD(gr, f)); await target.need(BuildTTF(gr, f));
} }
); );
@ -503,10 +500,27 @@ const CollectionArchiveFile = file.make(
); );
} }
); );
const TtcOnlyCollectionArchiveFile = file.make(
(gr, version) => `${ARCHIVE_DIR}/${TTC_ONLY_COLLECTION_EXPORT_PREFIX}-${gr}-${version}.zip`,
async (target, out, gr) => {
await target.need(de`${out.dir}`, CollectionExport(gr));
await rm(out.full);
await cd(`${DIST}/export/${gr}/ttc`).run(
["7z", "a"],
["-tzip", "-r", "-mx=9"],
`../../../../${out.full}`,
`./`
);
}
);
const CollectionArchive = task.group(`collection-archive`, async (target, cid) => { const CollectionArchive = task.group(`collection-archive`, async (target, cid) => {
const [version] = await target.need(Version); const [version] = await target.need(Version);
await target.need(CollectionArchiveFile(cid, version)); await target.need(CollectionArchiveFile(cid, version));
}); });
const TtcOnlyCollectionArchive = task.group(`ttc-only-collection-archive`, async (target, cid) => {
const [version] = await target.need(Version);
await target.need(TtcOnlyCollectionArchiveFile(cid, version));
});
// Single-group export // Single-group export
const GroupArchiveFile = file.make( const GroupArchiveFile = file.make(
@ -639,11 +653,16 @@ const AllTtfArchives = task(`all:ttf`, async target => {
await target.need(Object.keys(exportPlans).map(GroupArchive)); await target.need(Object.keys(exportPlans).map(GroupArchive));
}); });
const AllTtcArchives = task(`all:ttc`, async target => { const CollectionArchives = task(`all:pkg`, async target => {
const [collectPlans] = await target.need(CollectPlans); const [collectPlans] = await target.need(CollectPlans);
await target.need(Object.keys(collectPlans.groupDecomposition).map(CollectionArchive)); await target.need(Object.keys(collectPlans.groupDecomposition).map(CollectionArchive));
}); });
const AllTtcArchives = task(`all:ttc`, async target => {
const [collectPlans] = await target.need(CollectPlans);
await target.need(Object.keys(collectPlans.groupDecomposition).map(TtcOnlyCollectionArchive));
});
const SpecificSuperTtc = task.group(`super-ttc`, async (target, gr) => { const SpecificSuperTtc = task.group(`super-ttc`, async (target, gr) => {
await target.need(ExportSuperTtc(gr)); await target.need(ExportSuperTtc(gr));
}); });
@ -673,7 +692,7 @@ phony(`clean`, async () => {
build.deleteJournal(); build.deleteJournal();
}); });
phony(`release`, async target => { phony(`release`, async target => {
await target.need(AllTtfArchives, AllTtcArchives); await target.need(AllTtfArchives, CollectionArchives, AllTtcArchives);
await target.need(SampleImages, Pages, ReleaseNotes); await target.need(SampleImages, Pages, ReleaseNotes);
}); });