mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-15 20:49:02 +08:00
added more fonts
This commit is contained in:
parent
4938a5a044
commit
ca4d2b3575
3 changed files with 9 additions and 3 deletions
|
|
@ -732,7 +732,7 @@ $.getJSON("js/fonts.json", function (data) {
|
|||
data.forEach((font) => {
|
||||
commandsFonts.list.push({
|
||||
id: "changeFont" + font.name.replace(/ /g, "_"),
|
||||
display: font.name,
|
||||
display: font.display !== undefined ? font.display : font.name,
|
||||
exec: () => {
|
||||
setFontFamily(font.name);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -24,5 +24,9 @@
|
|||
},
|
||||
{
|
||||
"name": "Lexend Deca"
|
||||
},
|
||||
{
|
||||
"name": "Comic Sans MS",
|
||||
"display": "Helvetica"
|
||||
}
|
||||
]
|
||||
|
|
@ -60,9 +60,11 @@ function updateSettingsPage() {
|
|||
fontsList.forEach((font) => {
|
||||
fontsEl.append(
|
||||
`<div class="button" style="font-family:${
|
||||
font.name
|
||||
font.display !== undefined ? font.display : font.name
|
||||
}" fontFamily="${font.name.replace(/ /g, "_")}" tabindex="0"
|
||||
onclick="this.blur();">${font.name}</div>`
|
||||
onclick="this.blur();">${
|
||||
font.display !== undefined ? font.display : font.name
|
||||
}</div>`
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue