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

Chinese Font Support #1937

Open
Yxnt opened this issue May 7, 2024 · 3 comments
Open

Chinese Font Support #1937

Yxnt opened this issue May 7, 2024 · 3 comments
Labels
bug Something isn't working clien-ui

Comments

@Yxnt
Copy link

Yxnt commented May 7, 2024

Describe the problem

client latest version (v0.27.4) added the Network Routes Panel, when there is Chinese will display garbled code, this is because Fyne does not support Chinese fonts by default, Fyne's solution to this issue

To Reproduce

Steps to reproduce the behavior:

  1. Open Web Dashboard
  2. Open network-routes page
  3. Add New Route
  4. Enter the name “测试”

Expected behavior

recommended to use noto fonts (OFL) for commercial licensing reasons.

NetBird version

0.27.4

Screenshots
0.27.4 version
image

local debug version
image

Additional context

But I set the FYNE_FONT environment variable before running Netbird UI, which can solve the problem of garbled code, the code is very simple to add the init method (currently the package for internal employees is done this way)

//client_ui.go
func init() {
	defaultFontPath := "./fonts/NotoSansSC-Regular.ttf"
	font, exists := os.LookupEnv("FYNE_FONT")

	if exists {
		os.Setenv("FYNE_FONT", font)
	} else {
		os.Setenv("FYNE_FONT", defaultFontPath)
	}
}
@MrChenhtlss
Copy link

Yes it does exist and I'm waiting for it to be fixed
image

@Yxnt
Copy link
Author

Yxnt commented May 14, 2024

maybe other language should also be support, not only Chinese.

:)

@mlsmaycon
Copy link
Collaborator

This is bad; thanks for reporting, folks. We will handle it.

@mlsmaycon mlsmaycon added bug Something isn't working clien-ui and removed triage-needed labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clien-ui
Projects
None yet
Development

No branches or pull requests

3 participants