当前位置:网站首页>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
边栏推荐
- Druid SQL和Security在美团点评的实践
- CANopen STM32 transplantation
- Setting up keil environment of GD single chip microcomputer
- 配置iptables
- SQL中函数 decode()与 replace()的用法
- Error reported when running tensorboard: valueerror: duplicate plugins for name projector, solution
- Daily CISSP certification common mistakes (April 13, 2022)
- 昇腾 AI 开发者创享日全国巡回首站在西安成功举行
- 教你用简单几个步骤快速重命名文件夹名
- Machine learning theory (7): kernel function kernels -- a way to help SVM realize nonlinear decision boundary
猜你喜欢
随机推荐
ESP32 LVGL8. 1 - calendar (calendar 25)
Ctfshow - web362 (ssti)
ctfshow-web362(SSTI)
If condition judgment in shell language
Loop path
Introduction to QT programming
Resolution: cnpm: unable to load file \cnpm. PS1, because running scripts is prohibited on this system
In win10 system, all programs run as administrator by default
Log4j2 cross thread print traceid
Machine learning theory (8): model integration ensemble learning
Use bitnami / PostgreSQL repmgr image to quickly set up PostgreSQL ha
CISSP certified daily knowledge points (April 18, 2022)
Deeply understand what new and make in golang are and what are the differences?
Daily CISSP certification common mistakes (April 18, 2022)
纠结
Sentinel服务熔断实战(sentinel整合ribbon+openFeign+fallback)
Quantexa CDI(场景决策智能)Syneo平台介绍
iptables初探
Ucosiii transplantation and use, reference punctual atom
14 py games source code share the second bullet