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

Unicode characters not showing properly, any solution? #1579

Closed
mateors opened this issue Nov 19, 2020 · 7 comments
Closed

Unicode characters not showing properly, any solution? #1579

mateors opened this issue Nov 19, 2020 · 7 comments
Labels
duplicate This issue or pull request already exists Internationalisation I18n and support for non-bundled fonts and languages

Comments

@mateors
Copy link

mateors commented Nov 19, 2020

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")

image

@andydotxyz
Copy link
Member

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"

@mateors
Copy link
Author

mateors commented Nov 19, 2020

@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?

@andydotxyz
Copy link
Member

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.

@mateors
Copy link
Author

mateors commented Nov 20, 2020

@andydotxyz can you show me a sample code? how can i create custom theme and use distributed font generate using bundle?

@andydotxyz
Copy link
Member

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

@andydotxyz andydotxyz added the Internationalisation I18n and support for non-bundled fonts and languages label Jan 5, 2021
@andydotxyz andydotxyz added this to the 3.0 - Multimedia and more milestone Jan 5, 2021
@andydotxyz
Copy link
Member

This is resolved by PR #4721

@andydotxyz
Copy link
Member

Looks like this issue #2572 is the root cause, either way both are about to be fixed.

@andydotxyz andydotxyz added the duplicate This issue or pull request already exists label Mar 29, 2024
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 Internationalisation I18n and support for non-bundled fonts and languages
Projects
None yet
Development

No branches or pull requests

2 participants