front mess when i typing Chinese characters
Closed this issue · 1 comments
BabelQwerty commented
code:
use clap::{App, Arg};
use klask::Settings;
let matches = App::new("little scrape tools")
// .arg(Arg::with_name("xpath")
// .short('x')
// .long("xpath")
// .value_name("XPATH")
// .help("Sets the (XPath / Css) expression")
// .takes_value(true)
// )
.arg(Arg::with_name("keyword")
.short('k')
.long("key-world")
.value_name("KEYWORD")
.help("Sets the keyword")
.takes_value(true)
.required(true))
.arg(Arg::with_name("screen")
.short('s')
.long("screen")
.help("Enables screen display")
.takes_value(false));
Hambaka commented
因为 Klask 使用的 egui 默认不支持 CJK 字符,如果想显示汉字就得像 examples 里的 custom_font.rs 那样使用自定义字体才行。不过如果使用了自定义字体,字体也会被嵌入进编译后的可执行文件里,而中文字体普遍体积都不小,所以编译后的文件体积也会跟着变大许多,想要减小可执行文件的体积只能用 UPX 压缩了。