当前位置:网站首页>Go 语言 GUI 框架 fyne 中文乱码或者不显示的问题
Go 语言 GUI 框架 fyne 中文乱码或者不显示的问题
2022-04-23 18:39:00 【简单教程】
不得不说 fyne 真的非常不错的 Go 语言第三方 GUI 框架。
简单不简单另外说,至少颜值比比人高太多了。
但是也碰到了几个问题,首当其冲的就是中文乱码。 解决方案呢,有两种,一种就是使用 FYNE_FONT
指定字体路径
FYNE_FONT=./fonts/alibaba/Alibaba-PuHuiTi-Regular.ttf go run main.go
我下的是阿里巴巴的普惠字体,你可以用任意支持中文的字体
当然了,这种方式有个弊端,就是,会高速你缺少好几种其它字体,比如
Cause: open fonts/alibaba/Alibaba-PuHuiTi-Italic.ttf: no such file or directory Cause: open fonts/alibaba/Alibaba-PuHuiTi-BoldItalic.ttf: no such file or directory
另一种,就是自定义主题,这个可以参考 https://github.com/fyne-io/fyne/issues/2660
版权声明
本文为[简单教程]所创,转载请带上原文链接,感谢
https://www.twle.cn/t/37646#reply0
边栏推荐
- ESP32 LVGL8. 1 - label (style 14)
- Daily CISSP certification common mistakes (April 19, 2022)
- Sentinel服务熔断实战(sentinel整合ribbon+openFeign+fallback)
- 特征选择feature_selection--SelectKBest
- Use bitnami / PostgreSQL repmgr image to quickly set up PostgreSQL ha
- 22 year flying Book manpower Kit
- Database computer experiment 4 (data integrity and stored procedure)
- Configure iptables
- Introduction to QT programming
- After CANopen starts PDO timing transmission, the heartbeat frame time is wrong, PDO is delayed, and CANopen time axis is disordered
猜你喜欢
Halo 开源项目学习(七):缓存机制
Use of regular expressions in QT
STM32: LCD显示
Solution to Chinese garbled code after reg file is imported into the registry
ctfshow-web361(SSTI)
ctfshow-web362(SSTI)
WiFi ap6212 driver transplantation and debugging analysis technical notes
The first leg of the national tour of shengteng AI developer creation and enjoyment day was successfully held in Xi'an
教你用简单几个步骤快速重命名文件夹名
os_authent_prefix
随机推荐
Jeecg boot microservice architecture
Feign requests the log to be printed uniformly
CISSP certified daily knowledge points (April 11, 2022)
[popular science] CRC verification (I) what is CRC verification?
深入理解 Golang 中的 new 和 make 是什么, 差异在哪?
特征选择feature_selection--SelectKBest
QT notes on qmap container freeing memory
CISSP certified daily knowledge points (April 12, 2022)
ESP32 LVGL8. 1 - img picture (IMG 20)
Using transmittablethreadlocal to realize parameter cross thread transmission
Gson fastjason Jackson of object to JSON difference modifies the field name
QT error: no matching member function for call to ‘connect‘
logstash 7. There is a time problem in X. the difference between @ timestamp and local time is 8 hours
Mysqldump backup database
Const keyword, variable and function are decorated with const
14 py games source code share the second bullet
Daily CISSP certification common mistakes (April 18, 2022)
SQL database syntax learning notes
使用 bitnami/postgresql-repmgr 镜像快速设置 PostgreSQL HA
Use bitnami / PostgreSQL repmgr image to quickly set up PostgreSQL ha