-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextBox do not support Chinese charset? #3780
Comments
Current TextBox is very limited and needs a rework that will come at some point this year. |
您这边在mac上可以正常使用TextBox输入中文吗? |
修改TextBox的fontFamily可以解决。 |
我是在linux上跑,修改fontfamily确实可以解决显示问题,不过还是不能正常打字输入,是可以复制粘贴进去,原因是无法支持输入法。我在前面的issue中提过,官方说在适配输入法,我还是想先找到一个可以暂时替代的方案,如果您有临时的解决方案,麻烦您告诉我一下谢谢。 |
mac看来是可以的。linux没试过。也许是linux独有的bug吧。 |
关注这个问题 |
|
按理来说是可以的。我在linux发现你想要的字体可能系统没有,所以我干脆找到Avalonia源码,模仿源码的添加字体方式,添加自己的字体并引用,效果不错。 |
你好,我直接修改FontFamily,在mac下还是乱码,能不能给个例子。我参考下你之前 添加的字体代码了。或者麻烦告诉下源代码中哪个目录文件是 自定义字体的了,谢谢了 |
https://github.com/AvaloniaUI/Avalonia/blob/master/samples/ControlCatalog/Pages/TextBlockPage.xaml |
好的, 非常感谢! |
我这里直接设置系统字体可以解决,将 FontFamily 设置为 |
谢谢。提供的方法很有效果。解决了大问题,感谢! |
ubuntu18.0.4上把系统语言设置成中文简体,运行程序没有响应界面都不会显示出来, 如果把系统语言设置英文,则可以运行成功。 |
As of May 13, 2022, it is still not possible to input Chinese characters |
Only current master supports this. Please try out a current nightly build. |
@chenjing1294 you need to use WenQuanYi Micro Hei font: Avalonia/samples/ControlCatalog/Pages/TextBoxPage.xaml Lines 86 to 89 in 4c1afa2
|
Just add this :
|
OSX: MacBook Pro (Retina, 15-inch, Mid 2015)
Avalonia: 0.9.7
TextBox input issue.
When input Chinese charset such as "我们",it shows two blank rectangles.
You can try it with commond + C to paste it.
Maybe it is an issue about unicode / ascii charset, something like this.
Finally, I found that change the font family will be help.
If the TextBlock/TextBox FontFamily change to "黑体", "宋体", it works well.
For Chinese guys or other ones.
The text was updated successfully, but these errors were encountered: