feat: add font settings
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user