Add v-k-curly-cursive combination (#627).

This commit is contained in:
be5invis 2020-07-02 20:08:18 -07:00
parent ab51c5a17b
commit a775b36fa9
3 changed files with 30 additions and 9 deletions

View file

@ -4,3 +4,4 @@
* Add support for open number sign (`VXBI` and `VXBJ`, #621). * Add support for open number sign (`VXBI` and `VXBJ`, #621).
* Add toothless variant of `b` and `d` (#462). * Add toothless variant of `b` and `d` (#462).
* Fix italic Cyrillic I and Tse shape when `v-u-without-bar` is applied (#625). * Fix italic Cyrillic I and Tse shape when `v-u-without-bar` is applied (#625).
* Add `v-k-curly-cursive` combination (#627).

View file

@ -35,8 +35,17 @@ module.exports = function formVariantData(data, para) {
// simple selector // simple selector
for (let k in data.simple) { for (let k in data.simple) {
const varDef = data.simple[k]; const varDef = data.simple[k];
if (!varDef.variant) throw new Error("Unreachable! Variant definition is invalid"); let hive;
const hive = { ...varDef.variant }; 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; vs[k] = hive;
const tag = varDef.tag; const tag = varDef.tag;

View file

@ -246,23 +246,34 @@ variant.dotlessj = "straight"
[simple.v-k-straight] [simple.v-k-straight]
tag = "cv68" tag = "cv68"
sampler = 'kK' sampler = 'kK'
description = '`k` with standard shape' description = '`k` and `K` with standard shape'
variant.k = 'straight' variant.k = 'straight'
variant.K = 'straight' variant.K = 'straight'
[simple.v-k-curly] [simple.v-k-curly]
tag = "cv69" tag = "cv69"
sampler = 'kK' 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'
variant.K = 'curly' variant.K = 'curly'
[simple.v-k-cursive] [simple.v-k-cursive]
tagItalic = "cv70" tag = "cv70"
sampler = 'kK' sampler = 'kK'
description = '`k` with a cursive loop' description = '`k` with a cursive loop, and `K` with standard shape'
variant.k = 'cursive' variantUpright.k = 'straight'
variant.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] [simple.v-l-hooky]
tag = 'cv09' tag = 'cv09'