diff --git a/changes/3.3.0.md b/changes/3.3.0.md index de7e0dc44..da21dbee3 100644 --- a/changes/3.3.0.md +++ b/changes/3.3.0.md @@ -3,4 +3,5 @@ * Add a more rounded variant of `D` (#616). * Add support for open number sign (`VXBI` and `VXBJ`, #621). * Add toothless variant of `b` and `d` (#462). - * Fix italic Cyrillic I and Tse shape when `v-u-without-bar` is applied (#625). \ No newline at end of file + * Fix italic Cyrillic I and Tse shape when `v-u-without-bar` is applied (#625). + * Add `v-k-curly-cursive` combination (#627). \ No newline at end of file diff --git a/font-src/support/variant-data.js b/font-src/support/variant-data.js index b3ba60864..bc4fb5513 100644 --- a/font-src/support/variant-data.js +++ b/font-src/support/variant-data.js @@ -35,8 +35,17 @@ module.exports = function formVariantData(data, para) { // simple selector for (let k in data.simple) { const varDef = data.simple[k]; - if (!varDef.variant) throw new Error("Unreachable! Variant definition is invalid"); - const hive = { ...varDef.variant }; + let hive; + if (varDef.variant) { + hive = { ...varDef.variant }; + } else if (varDef.variantUpright && !para.isItalic) { + hive = { ...varDef.variantUpright }; + } else if (varDef.variantItalic && para.isItalic) { + hive = { ...varDef.variantItalic }; + } else { + hive = {}; + } + vs[k] = hive; const tag = varDef.tag; diff --git a/params/variants.toml b/params/variants.toml index 410913dc8..43315dacb 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -246,23 +246,34 @@ variant.dotlessj = "straight" [simple.v-k-straight] tag = "cv68" sampler = 'kK' -description = '`k` with standard shape' +description = '`k` and `K` with standard shape' variant.k = 'straight' variant.K = 'straight' [simple.v-k-curly] tag = "cv69" sampler = 'kK' -description = 'Slightly curly `k`, like Iosevka 2.x' +description = 'Slightly curly `k` and `K`, like Iosevka 2.x' variant.k = 'curly' variant.K = 'curly' [simple.v-k-cursive] -tagItalic = "cv70" +tag = "cv70" sampler = 'kK' -description = '`k` with a cursive loop' -variant.k = 'cursive' -variant.K = 'straight' +description = '`k` with a cursive loop, and `K` with standard shape' +variantUpright.k = 'straight' +variantUpright.K = 'straight' +variantItalic.k = 'cursive' +variantItalic.K = 'straight' + +[simple.v-k-curly-cursive] +tag = "VXBR" +sampler = 'kK' +description = '`k` with a cursive loop, and `K` with curly shape' +variantUpright.k = 'curly' +variantUpright.K = 'curly' +variantItalic.k = 'cursive' +variantItalic.K = 'curly' [simple.v-l-hooky] tag = 'cv09'