Closed mateors closed 7 months ago
The usage of FYNE_FONT references a file on the filesystem - when you package and ship your app then the file may not be found.
If you want to package a font in the application you probably need to use a custom Theme
along with bundling the font file using "fyne bundle"
@andydotxyz I must bundle the font when ship but now already font file in the same directory where my code base exist, so it should not create any issue for this problem. The same message using c# code base working fine. can you help me how can i fix this issue?
Go based (and Fyne) apps are designed to distribute as a single file. You can use "fyne bundle" to embed assets in this file https://developer.fyne.io/tutorial/bundle.
Otherwise you can provide the .ttf
file and tell your app users to place the file next to your app when they install.
@andydotxyz can you show me a sample code? how can i create custom theme and use distributed font generate using bundle?
See https://github.com/andydotxyz/beebui/, specifically you can see a custom font bundled in gen.sh
and used at https://github.com/andydotxyz/beebui/blob/f886e993bd9aa327ae3f411be49cdde9df4b4b2a/theme.go#L89
This is resolved by PR #4721
Looks like this issue #2572 is the root cause, either way both are about to be fixed.
I am developing a stk based windows gui application and for that using fyne library but unfortunately it seems fyne package unable to parse unicode character properly, but in golang codebase i can successfully print unicode character...so whats wrong?
I already set environtment variable using
os.Setenv("FYNE_FONT", "SolaimanLipi.ttf")