change config UseSystemFonts to CustomFonts, allow user to specify which font to use

This commit is contained in:
aynakeya
2025-06-30 00:21:41 +08:00
parent cdc3c5d118
commit 1fa82c2a01
2 changed files with 5 additions and 5 deletions

View File

@@ -35,8 +35,8 @@ func Initialize() {
logger = global.Logger.WithPrefix("GUI")
black_magic()
logger.Info("Initializing GUI")
if !config.General.UseSystemFonts {
_ = os.Setenv("FYNE_FONT", config.GetAssetPath("msyh.ttc"))
if config.General.CustomFonts != "" {
_ = os.Setenv("FYNE_FONT", config.GetAssetPath(config.General.CustomFonts))
}
App = app.NewWithID(config.ProgramName)
//App.Settings().SetTheme(&myTheme{})