当前位置:网站首页>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 - roller rolling (roller 24)
- If condition judgment in shell language
- CANopen usage method and main parameters of object dictionary
- 22年字节跳动飞书人力套件三面面经
- 使用晨曦记账本,分析某个时间段每个账户收支结余
- ESP32 LVGL8. 1 - input devices (input devices 18)
- Hard core parsing promise object (do you know these seven common APIs and seven key questions?)
- Deeply understand what new and make in golang are and what are the differences?
- ESP32 LVGL8. 1 - checkbox (checkbox 23)
- Configure iptables
猜你喜欢
Solution to Chinese garbled code after reg file is imported into the registry
【数学建模】—— 层次分析法(AHP)
Creation and use of QT dynamic link library
使用 bitnami/postgresql-repmgr 镜像快速设置 PostgreSQL HA
玻璃体中的硫酸软骨素
ctfshow-web361(SSTI)
Iptables - L executes slowly
In win10 system, all programs run as administrator by default
根据快递单号查询物流查询更新量
Summary of actual business optimization scheme - main directory - continuous update
随机推荐
QT add external font ttf
Excel intercept text
Use of regular expressions in QT
回路-通路
Mysqldump backup database
硬核解析Promise对象(这七个必会的常用API和七个关键问题你都了解吗?)
ESP32 LVGL8. 1 - bar progress bar (bar 21)
MVVM模型
Serial port debugging tools cutecom and minicom
【科普】CRC校验(一)什么是CRC校验?
程序员如何快速开发高质量的代码?
The first leg of the national tour of shengteng AI developer creation and enjoyment day was successfully held in Xi'an
使用 bitnami/postgresql-repmgr 镜像快速设置 PostgreSQL HA
Test questions of daily safety network (February 2024)
Resolution: cnpm: unable to load file \cnpm. PS1, because running scripts is prohibited on this system
Quantexa CDI(场景决策智能)Syneo平台介绍
机器学习理论之(7):核函数 Kernels —— 一种帮助 SVM 实现非线性化决策边界的方式
纠结
Seata处理分布式事务
Creation and use of QT dynamic link library