From 25ef3199601f93e4d9bf7d00d6e8aa03a6da12a7 Mon Sep 17 00:00:00 2001
From: Alexei Anoshenko <2277098+anoshenko@users.noreply.github.com>
Date: Mon, 13 Apr 2026 15:38:32 +0300
Subject: [PATCH] Added GoogleFonts field to AppParams
---
CHANGELOG.md | 1 +
application.go | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f936f3..f3fcf1a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
# v0.21.0
* Removed "style-disabled" property and GetDisabledStyle function
+* Added GoogleFonts field to AppParams
# v0.20.0
diff --git a/application.go b/application.go
index dca8c8d..a4907f2 100644
--- a/application.go
+++ b/application.go
@@ -59,6 +59,11 @@ type AppParams struct {
// The countdown begins after the OnPause event arrives.
// If the value of this property is less than or equal to 0 then the socket is not closed.
SocketAutoClose int
+
+ // GoogleFonts - url of Google fonts included in the application. For example, adding two fonts: "Open Sans" and "Roboto"
+ //
+ // GoogleFonts : "https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap"
+ GoogleFonts string
}
func getStartPage(buffer *strings.Builder, params AppParams) {
@@ -83,7 +88,18 @@ func getStartPage(buffer *strings.Builder, params AppParams) {
buffer.WriteString(`
-
+ `)
+
+ if params.GoogleFonts != "" {
+ buffer.WriteString(`
+
+
+ `)
+ }
+
+ buffer.WriteString(`