Skip to content

Commit c8cd02d

Browse files
Fix Font Styles Bug
1 parent 3e9301a commit c8cd02d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/alacritty.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ class Alacritty {
263263
this.config["font"][fontTypes[t]]["family"] = fonts[font][fontTypes[t]]
264264
? fonts[font][fontTypes[t]]
265265
: "tmp";
266+
const capitalize = ([firstLetter, ...restOfWord]) =>
267+
firstLetter.toUpperCase() + restOfWord.join("");
268+
const fontType = fontTypes[t] === "normal" ? "regular" : fontTypes[t];
269+
this.config["font"][fontTypes[t]]["style"] = capitalize(fontType);
266270
}
267271
log(chalk.blue(`Font ${font} applied`));
268272
}

0 commit comments

Comments
 (0)