diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index a9c248a13..919403043 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,28 +1,29 @@ +Describe your problem here. Provide pictures and files if necessary. + +--- + * Your font version: (Release or git, version) * Your font variant: * Your operating system (name and version): -* Your application using Iosevka: (some Java applications may have problem in showing Iosevka properly. It is a bug in Java's GUI components.) +* Your application using Iosevka: If you have problem when building Iosevka, please provide these information: * Your Node.js version: * Your _otfcc_ version: -* Your `parameters.toml`, paste if modified: -``` -paste here -``` +* Your `params/parameters.toml`, paste if modified: + ``` + paste here + ``` * Your `build-plans.toml`, paste if modified: -``` -paste here -``` + ``` + paste here + ``` * Your `private-build-plans.toml`, if present: -``` -paste here -``` + ``` + paste here + ``` * The detailed error log: -``` -paste here -``` ---- - -Describe your problem here. Provide pictures and files if necessary. + ``` + paste here + ``` diff --git a/README.md b/README.md index 6f48c29ff..11e827a9e 100644 --- a/README.md +++ b/README.md @@ -126,14 +126,14 @@ Since version 2.0, Iosevka would no longer support building via `makefile`. To i # Override default building widths # When buildPlans..widths is absent, all widths would built and mapped to # default values. - # IMPORTANT : Currently "shape" property only support 3, 5, and 7, while "menu" only - # support 1, 2, 3, 4, 5, 6, 7, 8, 9. + # IMPORTANT : Currently "shape" property only supports integers between 3 and 9 (inclusive), while + # "menu" only supports integers between 1 and 9 (inclusive). # If you decide to use custom widths you have to define all the widths you # plan to use otherwise they will not be built. [buildPlans.iosevka-custom.widths.normal] - shape = 5 # Width of glyph shapes. - menu = 5 # Width for the font's names. + shape = 5 # Width grade of glyph shapes. NOT actual character width. + menu = 5 # Width grade for the font's names. NOT actual character width. css = "normal" # "font-stretch' property of webfont CSS. [buildPlans.iosevka-custom.widths.extended] @@ -189,7 +189,7 @@ Since version 2.0, Iosevka would no longer support building via `makefile`. To i - + 3. Run `npm run build -- contents::` and the built fonts would be avaliable in `dist/`. Aside from `contents::`, other options are: @@ -309,6 +309,7 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a * `v-f-straight`, `cv52`: `f` without bottom hook (default for Sans Upright). * `v-f-tailed`, `cv53`: `f` with a leftward bottom hook (default for Italic). * `v-f-serifed`, `cv84`: `f` with bottom serif (default for Slab Upright). + * `v-f-straight-tailed`, `VXAD`: `f` with straight tail. * Styles for `g`: * `v-g-doublestorey`, `cv11`: Double-storey `g`. * `v-g-singlestorey`, `cv12`: Single-storey `g` (default). @@ -320,7 +321,7 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a * `v-i-zshaped`, `cv06`: Z-shaped `i`. * `v-i-line`, `cv56`: `i` like a straight line. * `v-i-tailed`, `cv88`: Tailed `i`. - * `v-i-hookybottom`, `CVAA`: `i` with a straight tail. + * `v-i-hookybottom`, `VXAA`: `i` with a straight tail. * Styles for `j`: * `v-j-line`, `cv57`: `j` like a straight line. * `v-j-serifed`, `cv58`: `j` with top serif (default). @@ -383,7 +384,7 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a * `v-zero-dotted`, `cv14`: Dotted Zero `0`. * `v-zero-unslashed`, `cv15`: O-like `0`. * `v-zero-reverse-slashed`, `cv93`: Reverse-slashed `0`. - * `v-zero-long-dotted`, `CVAB`: Long-dotted Zero `0` like Hack. + * `v-zero-long-dotted`, `VXAB`: Long-dotted Zero `0` like Hack. * Styles for `1`: * `v-one-nobase`, `cv50`: `1` with bottom serif (default for Sans). * `v-one-base`, `cv51`: `1` without bottom serif (default for Slab). @@ -399,7 +400,7 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a * Styles for `ß`: * `v-eszet-traditional`, `cv34`: Traditional, Fraktur-like Eszet. * `v-eszet-sulzbacher`, `cv35`: A more modern, beta-like Eszet (default). - * `v-eszet-longs-s-lig`, `CVAC`: A more modern, beta-like Eszet. + * `v-eszet-longs-s-lig`, `VXAC`: A more modern, beta-like Eszet. * Styles for `λ`: * `v-lambda-straight`, `cv94`: More-straight letter `λ` (default). * `v-lambda-curly`, `cv95`: More curly letter `λ`, like Iosevka 2.x. diff --git a/build-plans.toml b/build-plans.toml index 06e86aa0d..f32c5581c 100644 --- a/build-plans.toml +++ b/build-plans.toml @@ -599,7 +599,7 @@ css = 900 # Slant mappings (style => CSS) # NOTE: This mapping does NOT affect the font's metadata, only affects -# the webfont CSS. Change `parameters.toml` instead. +# the webfont CSS. Change `params/parameters.toml` instead. [slants] upright = "normal" oblique = "oblique" diff --git a/checkenv.js b/checkenv.js deleted file mode 100644 index f1a6f19ac..000000000 --- a/checkenv.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -const which = require("which"); -const colors = require("colors/safe"); - -function check(util) { - try { - which.sync(util); - console.error(colors.green(`External dependency <${util}> is present.`)); - } catch (e) { - console.error(colors.red(`External dependency <${util}> not found.`)); - } -} - -check("otfccdump"); -check("otfccbuild"); -check("ttfautohint"); -check("otf2otc"); diff --git a/gen/index.js b/gen/index.js index 605a225ed..362a0ce7d 100644 --- a/gen/index.js +++ b/gen/index.js @@ -19,10 +19,10 @@ module.exports = async function main(argv) { // Parameter preparation async function getParameters(argv) { - const PARAMETERS_TOML = path.resolve(__dirname, "../parameters.toml"); - const PRIVATE_TOML = path.resolve(__dirname, "../private.toml"); - const VARIANTS_TOML = path.resolve(__dirname, "../variants.toml"); - const LIGATIONS_TOML = path.resolve(__dirname, "../ligation-set.toml"); + const PARAMETERS_TOML = path.resolve(__dirname, "../params/parameters.toml"); + const PRIVATE_TOML = path.resolve(__dirname, "../params/private-parameters.toml"); + const VARIANTS_TOML = path.resolve(__dirname, "../params/variants.toml"); + const LIGATIONS_TOML = path.resolve(__dirname, "../params/ligation-set.toml"); const parametersData = Object.assign( {}, diff --git a/package.json b/package.json index 658905247..606f424df 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "node": ">=12.16.0" }, "scripts": { - "install": "node checkenv", + "install": "node utility/check-env", "build": "verda -f verdafile.js" }, "dependencies": { diff --git a/ligation-set.toml b/params/ligation-set.toml similarity index 100% rename from ligation-set.toml rename to params/ligation-set.toml diff --git a/parameters.toml b/params/parameters.toml similarity index 100% rename from parameters.toml rename to params/parameters.toml diff --git a/variants.toml b/params/variants.toml similarity index 100% rename from variants.toml rename to params/variants.toml diff --git a/snapshot/index.html b/snapshot/index.html index 7202f517f..becbe72e1 100644 --- a/snapshot/index.html +++ b/snapshot/index.html @@ -102,6 +102,10 @@
cv84
f
+
  • +
    VXAD
    +
    f
    +
  • @@ -153,8 +157,8 @@
    i
  • -
    CVAA
    -
    i
    +
    VXAA
    +
    i
  • @@ -456,8 +460,8 @@
    0
  • -
    CVAB
    -
    0
    +
    VXAB
    +
    0
  • @@ -535,8 +539,8 @@
    ß
  • -
    CVAC
    -
    ß
    +
    VXAC
    +
    ß
  • diff --git a/utility/check-env.js b/utility/check-env.js new file mode 100644 index 000000000..d0462d3bc --- /dev/null +++ b/utility/check-env.js @@ -0,0 +1,28 @@ +"use strict"; + +const which = require("which"); +const colors = require("colors/safe"); + +console.log("Checking External Dependencies"); +check("otfccdump"); +check("otfccbuild"); +check("ttfautohint"); +check("otf2otc"); +checkOptional("ttx"); + +function check(util) { + try { + which.sync(util); + console.error(colors.green(` * External dependency <${util}> is present.`)); + } catch (e) { + console.error(colors.red(` * External dependency <${util}> is not found.`)); + } +} +function checkOptional(util) { + try { + which.sync(util); + console.error(colors.green(` * Optional external dependency <${util}> is present.`)); + } catch (e) { + console.error(colors.yellow(` * Optional external dependency <${util}> is not found.`)); + } +} diff --git a/utility/export-data/ligation-data.js b/utility/export-data/ligation-data.js index 3e7af0b5a..d03b5cf72 100644 --- a/utility/export-data/ligation-data.js +++ b/utility/export-data/ligation-data.js @@ -218,7 +218,10 @@ const ligationSamplesNarrow = [ ]; module.exports = async function getLigationData() { - const ligToml = await fs.readFile(path.join(__dirname, "../../ligation-set.toml"), "utf8"); + const ligToml = await fs.readFile( + path.join(__dirname, "../../params/ligation-set.toml"), + "utf8" + ); const ligData = toml.parse(ligToml); const ligationSets = buildLigationSet(ligData, comp => comp.buildup.join(",")); diff --git a/utility/export-data/parse-variants-data.js b/utility/export-data/parse-variants-data.js index 79f68bc63..a704f4497 100644 --- a/utility/export-data/parse-variants-data.js +++ b/utility/export-data/parse-variants-data.js @@ -3,7 +3,10 @@ const path = require("path"); const toml = require("toml"); module.exports = async function () { - const variantsToml = await fs.readFile(path.join(__dirname, "../../variants.toml"), "utf8"); + const variantsToml = await fs.readFile( + path.join(__dirname, "../../params/variants.toml"), + "utf8" + ); const variants = toml.parse(variantsToml); const cvData = getCvData(variants); diff --git a/verdafile.js b/verdafile.js index b42d8eb8b..d6f734a50 100644 --- a/verdafile.js +++ b/verdafile.js @@ -366,7 +366,7 @@ const BuildTTF = file.make( async (target, output, gr, fn) => { const [fi, useTtx] = await target.need(FontInfoOf(fn), OptimizeWithTtx, Version); const charmap = output.dir + "/" + output.name + ".charmap"; - await target.need(Scripts, fu`parameters.toml`, de`${output.dir}`); + await target.need(Scripts, Parameters, de`${output.dir}`); const otdPath = `${output.dir}/${output.name}.otd`; await node("gen/index", { o: otdPath, oCharMap: charmap, ...fi }); @@ -587,7 +587,7 @@ const PagesDataExport = task(`pages:data-export`, async target => { target.is.volatile(); const [version, pagesDir] = await target.need(Version, PagesDir); if (!pagesDir) return; - await target.need(sfu`variants.toml`, sfu`ligation-set.toml`, UtilScripts); + await target.need(Parameters, UtilScripts); const [cm] = await target.need(BuildCM("iosevka", "iosevka-regular")); const [cmi] = await target.need(BuildCM("iosevka", "iosevka-italic")); const [cmo] = await target.need(BuildCM("iosevka", "iosevka-oblique")); @@ -671,7 +671,7 @@ const SnapShotJson = file(`snapshot/packaging-tasks.json`, async (target, out) = fs.writeFileSync(out.full, JSON.stringify(cfg, null, " ")); }); const SnapShotHtml = file(`snapshot/index.html`, async target => { - await target.need(sfu`variants.toml`, sfu`ligation-set.toml`, UtilScripts); + await target.need(Parameters, UtilScripts); const [cm] = await target.need(BuildCM("iosevka", "iosevka-regular")); const [cmi] = await target.need(BuildCM("iosevka", "iosevka-italic")); const [cmo] = await target.need(BuildCM("iosevka", "iosevka-oblique")); @@ -799,7 +799,7 @@ const ScriptJS = file.glob(`{gen|glyphs|meta|otl|support}/**/*.js`, async (targe } }); const Scripts = task("scripts", async target => { - await target.need(sfu`parameters.toml`, sfu`variants.toml`, sfu`ligation-set.toml`); + await target.need(Parameters); const [jsFromPtl] = await target.need(JavaScriptFromPtl); await target.need(jsFromPtl); const [js] = await target.need(ScriptFiles("js")); @@ -809,3 +809,11 @@ const UtilScripts = task("util-scripts", async target => { const [files] = await target.need(UtilScriptFiles); await target.need(files.map(f => fu`${f}`)); }); +const Parameters = task(`meta:parameters`, async target => { + await target.need( + sfu`params/parameters.toml`, + ofu`params/private-parameters.toml`, + sfu`params/variants.toml`, + sfu`params/ligation-set.toml` + ); +});