Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.3.0 load ttc font file error #3509

Closed
2 tasks done
chindev2012 opened this issue Dec 28, 2022 · 1 comment
Closed
2 tasks done

v2.3.0 load ttc font file error #3509

chindev2012 opened this issue Dec 28, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@chindev2012
Copy link

chindev2012 commented Dec 28, 2022

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

2022/12/28 14:09:20 Fyne error: font load error
2022/12/28 14:09:20 Cause: unsupported font format
2022/12/28 14:09:20 At: C:/Users/xxx/go/pkg/mod/fyne.io/fyne/[email protected]/internal/painter/font.go:150
panic: runtime error: invalid memory address or nil pointer dereference

How to reproduce

Install fyne v2.3.0
Use code from example

Screenshots

No response

Example code

package main

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/widget"
	"os"
)

func init(){
	os.Setenv("FYNE_FONT", "C:\\windows\\fonts\\msyh.ttc")
}

func main() {
	a := app.New()
	w := a.NewWindow("demo")
        w.Resize(fyne.Size{300, 200})
	w.CenterOnScreen()
	w.SetContent(widget.NewLabel("Hello World!"))
	w.ShowAndRun()
}

Fyne version

2.3.0

Go compiler version

1.19.3

Operating system

Windows

Operating system version

Windows 11 22H2 Build 22621.963

Additional Information

No response

@chindev2012 chindev2012 added the unverified A bug that has been reported but not verified label Dec 28, 2022
@andydotxyz
Copy link
Member

Seems like a dupe of #3245 - we only support .ttf at this time.

@andydotxyz andydotxyz added duplicate This issue or pull request already exists and removed unverified A bug that has been reported but not verified labels Dec 28, 2022
@andydotxyz andydotxyz closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants