Replies: 9 comments 3 replies
-
Is there a way to specify a font path, e.g. D:workspacettfHarmonyOS_Sans_SC_Light.ttf, or search for fonts under C:WindowsFonts? I've installed fonts in C:WindowsFonts, but I still can't find it in the font list |
Beta Was this translation helpful? Give feedback.
-
If you want to set the font family of a widget, you can do: tab.Style(func(s *styles.Style) {
s.Font.Family = "MyFontFamily"
}) If you want to make a widget for selecting a font, you can do: myFontFamily := gi.FontName("Select a font")
giv.NewValue(parent, &myFontFamily) |
Beta Was this translation helpful? Give feedback.
-
Thanks!
…---Original---
From: ***@***.***>
Date: Thu, Feb 29, 2024 14:24 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [cogentcore/core] How to assign a font to a button (Discussion#919)
If you want to set the font family of a widget, you can do:
tab.Style(func(s *styles.Style) { s.Font.Family = "MyFontFamily" })
If you want to make a widget for selecting a font, you can do:
myFontFamily := gi.FontName("Select a font") giv.NewValue(parent, &myFontFamily)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Okay
…---Original---
From: ***@***.***>
Date: Thu, Feb 29, 2024 14:25 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [cogentcore/core] How to assign a font to a button (Discussion#919)
I will work on better font path loading in the context of #568 and #515.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Will the font of the body be applied to all widgets in the body?
…---Original---
From: ***@***.***>
Date: Thu, Feb 29, 2024 14:24 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [cogentcore/core] How to assign a font to a button (Discussion#919)
If you want to set the font family of a widget, you can do:
tab.Style(func(s *styles.Style) { s.Font.Family = "MyFontFamily" })
If you want to make a widget for selecting a font, you can do:
myFontFamily := gi.FontName("Select a font") giv.NewValue(parent, &myFontFamily)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I tested both setting methods and it didn't seem to find the location of the font I said, if it doesn't find the specified font, please let it print the error okay? So that I should be prompted to put the font file where it asks for it
…---Original---
From: ***@***.***>
Date: Thu, Feb 29, 2024 14:44 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [cogentcore/core] How to assign a font to a button (Discussion#919)
If you want to change the font of all widgets, you should go to your settings and change Font family. You can also access this programmatically with gi.AppearanceSettings.FontFamily. Again, if the issue that you are experiencing is that certain fonts are not showing up, that is a separate issue that I will work on fixing soon in the context of #568 and #515.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
thank you
…---Original---
From: ***@***.***>
Date: Thu, Feb 29, 2024 14:50 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [cogentcore/core] How to assign a font to a button (Discussion#919)
I will work on improving font loading error handling when I implement better international font support for #568 and #515.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If the test fails after the international input is supported, it will be turned on again and temporarily closed |
Beta Was this translation helpful? Give feedback.
-
see png
Beta Was this translation helpful? Give feedback.
All reactions