# fyne-go-demo **Repository Path**: um-why/fyne-go-demo ## Basic Information - **Project Name**: fyne-go-demo - **Description**: 基于fyne进行GUI界面开发;解决fyne中文乱码问题 - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-05-20 - **Last Updated**: 2022-05-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 中文解决方案 解释文字 https://juejin.cn/post/6909029531026194445 代码来源 https://github.com/lusingander/fyne-font-example ``` 第1步:下载fyne工程模版git@github.com:lusingander/fyne-font-example.git 第2步:下载字体ShangShouJianSongXianXiTi-2.ttf到fyne工程目录(也可以放到子目录) 第3步:进入字体下载目录,执行fyne bundle ShangShouJianSongXianXiTi-2.ttf >> bundle.go 第4步:修改工程下的theme.go -> MyTheme结构体定义的字体变量 第5步:main方法中引入新字体 a := app.New() a.Settings().SetTheme(&lib.MyTheme{}) 到此中文问题得以解决 ```