You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You have not provided any information about Fyne version, etc - please fill in the bug report template so we can help.
andydotxyz
changed the title
The set on button can't be show correctly when use imported font
The text on button can't be show correctly when use imported font
Dec 7, 2021
I expect you see these errors in the console as well:
FYNE_FONT=~/Downloads/PingFang\ Regular.ttf go run .
2021/12/06 19:34:00 Fyne error: Error loading specified font
2021/12/06 19:34:00 Cause: open /Users/andy/Downloads/PingFang Bold.ttf: no such file or directory
2021/12/06 19:34:00 At: /Users/andy/Code/fyne/theme/theme.go:626
2021/12/06 19:34:00 Fyne error: Error loading specified font
2021/12/06 19:34:00 Cause: open /Users/andy/Downloads/PingFang Italic.ttf: no such file or directory
2021/12/06 19:34:00 At: /Users/andy/Code/fyne/theme/theme.go:626
2021/12/06 19:34:00 Fyne error: Error loading specified font
2021/12/06 19:34:00 Cause: open /Users/andy/Downloads/PingFang BoldItalic.ttf: no such file or directory
2021/12/06 19:34:00 At: /Users/andy/Code/fyne/theme/theme.go:626
Clearly it expects other fonts to be available at the moment.
We could probably fall back to regular if the others are not found.
Describe the bug:
The set on button can't be show correctly when use imported font
The text in label can be shown correctly but the text on button can't.
To Reproduce:
Steps to reproduce the behaviour:
Screenshots:
Example code:
func init() {
fontPaths := findfont.List()
for _, path := range fontPaths {
fmt.Println(path)
//楷体:simkai.ttf
//黑体:simhei.ttf
//PingFang-Regular.ttf
if strings.Contains(path, "PingFang-Regular.ttf") {
os.Setenv("FYNE_FONT", path)
break
}
}
fmt.Println("=============")
}
Device (please complete the following information):
The text was updated successfully, but these errors were encountered: