Skip to content

Commit

Permalink
Add v-k-curly-cursive combination (#627).
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Jul 3, 2020
1 parent ab51c5a commit a775b36
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
3 changes: 2 additions & 1 deletion changes/3.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
* Fix italic Cyrillic I and Tse shape when `v-u-without-bar` is applied (#625).
* Add `v-k-curly-cursive` combination (#627).
13 changes: 11 additions & 2 deletions font-src/support/variant-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
23 changes: 17 additions & 6 deletions params/variants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit a775b36

Please sign in to comment.