[GH-ISSUE #1937] Chinese Font Support #3611

Open
opened 2026-08-05 00:53:21 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @Yxnt on GitHub (May 7, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1937

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

Originally created by @Yxnt on GitHub (May 7, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1937 **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](https://github.com/fyne-io/fyne/issues/2660#issuecomment-1046591932) **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 ](https://fonts.google.com/noto)(OFL) for commercial licensing reasons. **NetBird version** `0.27.4` **Screenshots** 0.27.4 version ![image](https://github.com/netbirdio/netbird/assets/10323352/bb006e07-1570-4ccc-98f6-e72b95e05c4f) local debug version ![image](https://github.com/netbirdio/netbird/assets/10323352/99b9ec68-4c6e-4341-80ed-8e606cb3afc0) **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) ```go //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) } } ```
saavagebueno added the bugclient-ui labels 2026-08-05 00:53:21 -04:00
Sign in to join this conversation.
No Label bug client-ui
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#3611