diff --git a/src/lang/en.ts b/src/lang/en.ts
index cbfed9ac..9d720913 100644
--- a/src/lang/en.ts
+++ b/src/lang/en.ts
@@ -651,4 +651,5 @@ export const languageEnglish = {
v2Warning: "Warning: V2 card is no longer supported. it may not contain all the data.",
applyModule: "Apply Module",
successApplyModule: "Module is successfully applied",
+ font: "Font",
}
\ No newline at end of file
diff --git a/src/lib/Setting/Pages/DisplaySettings.svelte b/src/lib/Setting/Pages/DisplaySettings.svelte
index a4ec9fb1..77a5cad0 100644
--- a/src/lib/Setting/Pages/DisplaySettings.svelte
+++ b/src/lib/Setting/Pages/DisplaySettings.svelte
@@ -12,6 +12,7 @@
import { DownloadIcon, FolderUpIcon } from "lucide-svelte";
import { guiSizeText, updateGuisize } from "src/ts/gui/guisize";
+ import TextInput from "src/lib/UI/GUI/TextInput.svelte";
const onSchemeInputChange = (e:Event) => {
changeColorScheme((e.target as HTMLInputElement).value)
@@ -137,6 +138,17 @@
{/if}
+{language.font}
+
+ Default
+ Times New Roman
+ Custom
+
+
+{#if $DataBase.font === "custom"}
+
+{/if}
+
{language.UISize}
{($DataBase.zoomsize)}%
diff --git a/src/styles.css b/src/styles.css
index d84e08ed..149f3156 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -29,6 +29,7 @@ body{
--risu-theme-darkborderc: #4b5563;
--risu-theme-darkbutton: #374151;
--risu-height-size: 100%;
+ --risu-font-family: Arial, sans-serif, serif;
}
@@ -126,7 +127,7 @@ html, body{
}
*{
- font-family: Arial, Helvetica, sans-serif;
+ font-family: var(--risu-font-family);
}
.chattext p:first-child{
diff --git a/src/ts/gui/colorscheme.ts b/src/ts/gui/colorscheme.ts
index 80672109..25e4da65 100644
--- a/src/ts/gui/colorscheme.ts
+++ b/src/ts/gui/colorscheme.ts
@@ -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
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ts/storage/database.ts b/src/ts/storage/database.ts
index 44527a30..4c07e9f5 100644
--- a/src/ts/storage/database.ts
+++ b/src/ts/storage/database.ts
@@ -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{