text_input can't accept chinese input
Is there an existing issue for this?
- [X] I have searched the existing issues.
Is this issue related to iced?
- [X] My hardware is compatible and my graphics drivers are up-to-date.
What happened?
the text_input Can display Chinese,but when app run,I can't change to input chinese
config:
[dependencies]
iced ='0.9.0'
iced_lazy= '0.6.0'
iced_native ='0.10.0'
and the main code:
App::run(
Settings{
window:window::Settings{
size:(800,600),
..Default::default()
},
default_font:Some(include_bytes!("STXINGKA.TTF")), //设置中文的.ttf字体
..Default::default()
})
text_input("请输入",&self.inpur_txt)
.id(text_input::Id::new("1-input"))
.on_input(Message::EditInput)
.on_submit(Message::EditCmt)
.width(180)
.size(25)
,
What is the expected behavior?
when I Press shift key, I should Switch to Chinese input,but it didn‘t
when I use other app,it's normal, such as vscode
Version
master
Operative System
Windows
Do you have any log output?
No response
In fact, the example todos cannot switch the input method to Chinese either in my computer
https://github.com/iced-rs/iced/pull/1474
emm , I hava tested the example : https://github.com/t18b219k/iced_text_input_sample/
yeal,that's work well,but it's version seem too old.
in 0.9.0 version, the text_input can't work well,I don't know how to fix it
emm , I hava tested the example : https://github.com/t18b219k/iced_text_input_sample/
yeal,that's work well,but it's version seem too old.
in 0.9.0 version, the text_input can't work well,I don't know how to fix it
Change method main:
Todos::run(Settings {
default_font: Some(include_bytes!("../assets/font/STSong.ttf")),
)}
Add this line works well for me. Tips: the STSong.ttf can be downloaded from elsewhere.
@ys928 你这个问题解决了吗,我也遇到这个问题,UI可以显示中文,text_input可以粘贴中文,但是无法切换中文输入法,无法直接输入中文
@rongjv 你用这个PR试试 #1858
@rongjv 你用这个PR试试 #1858
你好,感谢,我还想问下,PR是什么意思,还有怎么单独使用某个PR,我是vscode上,iced在toml的依赖里设置后,所有模块都是它自己下载的
@rongjv 你用这个PR试试 #1858
谢谢,我已经试过了,的确可行,不过稍微有点小问题,就是鼠标在文本框点击后,有时候输入法还是会丢失,需要再点击文本框一次,输入法又回来了。但还是谢谢你的回答