feat: add font settings

This commit is contained in:
kwaroran
2024-06-07 17:47:10 +09:00
parent 49b14939c4
commit 58bf0807d2
5 changed files with 34 additions and 1 deletions

View File

@@ -225,4 +225,19 @@ export function updateTextTheme(){
break
}
}
switch(db.font){
case "default":{
root.style.setProperty('--risu-font-family', 'Arial, sans-serif');
break
}
case "timesnewroman":{
root.style.setProperty('--risu-font-family', 'Times New Roman, serif');
break
}
case "custom":{
root.style.setProperty('--risu-font-family', db.customFont);
break
}
}
}

View File

@@ -413,6 +413,8 @@ export function setDatabase(data:Database){
data.dallEQuality ??= 'standard'
data.customTextTheme.FontColorQuote1 ??= '#8BE9FD'
data.customTextTheme.FontColorQuote2 ??= '#FFB86C'
data.font ??= 'default'
data.customFont ??= ''
changeLanguage(data.language)
DataBase.set(data)
}
@@ -680,6 +682,8 @@ export interface Database{
cohereAPIKey:string
goCharacterOnImport:boolean
dallEQuality:string
font: string
customFont: string
}
export interface customscript{