Add weight 'Book'. Fixes #424.
This commit is contained in:
parent
1765923f8d
commit
296afad705
4 changed files with 194 additions and 183 deletions
|
@ -535,6 +535,11 @@ shape = 400
|
||||||
menu = 400
|
menu = 400
|
||||||
css = 400
|
css = 400
|
||||||
|
|
||||||
|
[weights.book]
|
||||||
|
shape = 450
|
||||||
|
menu = 450
|
||||||
|
css = 450
|
||||||
|
|
||||||
[weights.medium]
|
[weights.medium]
|
||||||
shape = 500
|
shape = 500
|
||||||
menu = 500
|
menu = 500
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
* Fix “Lucida” style's `one` character
|
* Fix “Lucida” style's `one` character.
|
||||||
|
* Added weight “Book”.
|
|
@ -34,6 +34,7 @@ define weightToMenuStyleMap : object
|
||||||
200 "Extralight"
|
200 "Extralight"
|
||||||
300 "Light"
|
300 "Light"
|
||||||
400 ""
|
400 ""
|
||||||
|
450 "Book"
|
||||||
500 "Medium"
|
500 "Medium"
|
||||||
600 "Semibold"
|
600 "Semibold"
|
||||||
700 "Bold"
|
700 "Bold"
|
||||||
|
@ -59,6 +60,7 @@ define weightToMenuStyleMapShort : object
|
||||||
200 "XLt"
|
200 "XLt"
|
||||||
300 "Lt"
|
300 "Lt"
|
||||||
400 ""
|
400 ""
|
||||||
|
450 "Bk"
|
||||||
500 "Md"
|
500 "Md"
|
||||||
600 "SmBd"
|
600 "SmBd"
|
||||||
700 "Bd"
|
700 "Bd"
|
||||||
|
|
|
@ -137,8 +137,11 @@ function nValidate(key, v, f) {
|
||||||
function vlShapeWeight(x) {
|
function vlShapeWeight(x) {
|
||||||
return x >= 100 && x <= 900;
|
return x >= 100 && x <= 900;
|
||||||
}
|
}
|
||||||
|
function vlCssWeight(x) {
|
||||||
|
return x >= 0 && x <= 1000;
|
||||||
|
}
|
||||||
function vlMenuWeight(x) {
|
function vlMenuWeight(x) {
|
||||||
return x >= 100 && x <= 900 && x % 100 === 0;
|
return (x >= 100 && x <= 900 && x % 100 === 0) || x === 450;
|
||||||
}
|
}
|
||||||
function vlShapeWidth(x) {
|
function vlShapeWidth(x) {
|
||||||
return x === 3 || x === 5 || x === 7;
|
return x === 3 || x === 5 || x === 7;
|
||||||
|
@ -157,7 +160,7 @@ function getSuffixSet(weights, slants, widths) {
|
||||||
hives: [`shape-weight`, `s-${s}`, `wd-${widths[wd].shape}`],
|
hives: [`shape-weight`, `s-${s}`, `wd-${widths[wd].shape}`],
|
||||||
weight: w,
|
weight: w,
|
||||||
shapeWeight: nValidate("Shape weight of " + w, weights[w].shape, vlShapeWeight),
|
shapeWeight: nValidate("Shape weight of " + w, weights[w].shape, vlShapeWeight),
|
||||||
cssWeight: nValidate("CSS weight of " + w, weights[w].css),
|
cssWeight: nValidate("CSS weight of " + w, weights[w].css, vlCssWeight),
|
||||||
menuWeight: nValidate("Menu weight of " + w, weights[w].menu, vlMenuWeight),
|
menuWeight: nValidate("Menu weight of " + w, weights[w].menu, vlMenuWeight),
|
||||||
width: wd,
|
width: wd,
|
||||||
shapeWidth: nValidate("Shape width of " + wd, widths[wd].shape, vlShapeWidth),
|
shapeWidth: nValidate("Shape width of " + wd, widths[wd].shape, vlShapeWidth),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue