当前位置:   article > 正文

[Rust GUI]0.10.0版本iced代码示例 - progress_bar_iced 0.10.0 如何设置中文字库

iced 0.10.0 如何设置中文字库

-1 字体支持

iced0.10.0 仅支持指定系统内置字体(iced默认字体中文会乱码)
iced0.10.0 手动加载字体的功能已经砍了,想手动加载就用0.9.0版本,文档0.9.0版本
想显示中文则需要运行在一个自带字体的Windows系统上。而且这个字体最好不要钱。
(Windows闲着没事不会给你放免费字体进去,都是微软自己买的,只能微软用)

如果选用的字体用户的电脑里恰好没有,iced就直接乱码给你看。
https://blog.csdn.net/qq_39124701/article/details/132662186

0、准备

1、安装Visual Studio C++ Build tools

1、访问微软官网下载生成工具
2、勾选这个
https://blog.csdn.net/qq_39124701/article/details/132662186
3、对比勾选细节
https://blog.csdn.net/qq_39124701/article/details/132662186
4、点击安装
5、安装完成
https://blog.csdn.net/qq_39124701/article/details/132662186
6、关闭Visual Studio Installer
7、重启电脑

2、安装Rust

访问Rust官网下载 RUSTUP-INIT.EXE(64位)
在 PowerShell 中运行$ENV:RUSTUP_DIST_SERVER='https://mirrors.ustc.edu.cn/rust-static';$ENV:RUSTUP_UPDATE_ROOT='https://mirrors.ustc.edu.cn/rust-static/rustup';.\rustup-init.exe,输入1并回车
https://blog.csdn.net/qq_39124701/article/details/132662186

3、设置cargo镜像

运行powershell -command ii (where.exe cargo).substring(0,(where.exe cargo).Length-'\bin\cargo.exe'.Length)
.cargo目录下新建文件,名为config,无后缀名,保存为以下内容

[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
  • 1
  • 2
  • 3
  • 4
  • 5

4、安装VSCode

访问这个

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/753356
推荐阅读
相关标签