Fix Mono families' width grade (#943).

This commit is contained in:
be5invis 2021-04-11 14:05:35 -07:00
parent 09d5ff7c42
commit 9aecb6fa9c
4 changed files with 4 additions and 4 deletions

View file

@ -958,7 +958,7 @@ menu = 5
css = "normal"
[widths.extended]
shape = 576
shape = 600
menu = 7
css = "expanded"

View file

@ -95,7 +95,7 @@ menu = 5 # Width grade for the font's names.
css = "normal" # "font-stretch' property of webfont CSS.
[buildPlans.iosevka-custom.widths.extended]
shape = 576
shape = 600
menu = 7
css = "expanded"

View file

@ -927,7 +927,7 @@ const VlShapeWidth = {
fix(x) {
if (x >= 3 && x <= 9) {
if (g_widthFixupMemory.has(x)) return g_widthFixupMemory.get(x);
const xCorrected = Math.round(500 * Math.pow(Math.sqrt(576 / 500), x - 5));
const xCorrected = Math.round(500 * Math.pow(Math.sqrt(600 / 500), x - 5));
echo.warn(
`The build plan is using legacy width grade ${x}. ` +
`Converting to unit width ${xCorrected}.`