Open zdl361 opened 11 months ago
为啥我中文显示都是方块
为啥我中文显示都是方块
@birnfly 因为你没有设置中文字体。egui内置字体不包含中文。我给你个添加了中文字体的demo。下载编译就行。 https://delongnas.synology.me:5001/d/s/vyVrJcxssuZfzNS3Qh13kmTTjnec4b4Q/FutcXndK_u2tWCXIOv_3uj9pyorWkV3w-Q7sAWJhD5Ao
Have you tried a git bisect to find the cause of this? From the changelog there were two PRs affecting IME:
Have you tried a git bisect to find the cause of this? From the changelog there were two PRs affecting IME:
* [Only show on-screen-keyboard and IME when editing text #3362](https://github.com/emilk/egui/pull/3362) * [Prevent text from being cleared when selected due to winit IME #3376](https://github.com/emilk/egui/pull/3376)
PS E:\myfile\src\rust\egui-hello_world_cn\egui> git bisect start 5f4046d68aa482167198d5fa3b8f506f04242014 ad8b41cad65c632a3a35edd0b3dd6d25f6f962a9
Bisecting: 21 revisions left to test after this (roughly 5 steps)
[cfbad1f8656f90f02336890bb9f9f323af506e25] Update example screenshots
PS E:\myfile\src\rust\egui-hello_world_cn\egui> git bisect bad
Bisecting: 10 revisions left to test after this (roughly 4 steps)
[1b830bbcb4c8bfbbd17233be5850cb41854b730b] Less loud warning when loading old memories
PS E:\myfile\src\rust\egui-hello_world_cn\egui> git bisect bad
Bisecting: 5 revisions left to test after this (roughly 3 steps)
[99a1b5b62e60b2a2b3cb5728cc57108669242855] Add `Context::open_url` and `Context::copy_text` (#3380)
PS E:\myfile\src\rust\egui-hello_world_cn\egui> git bisect bad
Bisecting: 2 revisions left to test after this (roughly 1 step)
[c07394b5766053fcdb5cb506e369f60a535a4800] Only show on-screen-keyboard and IME when editing text (#3362)
PS E:\myfile\src\rust\egui-hello_world_cn\egui> git bisect good
Bisecting: 0 revisions left to test after this (roughly 1 step)
[d77c44657206d6a5a9eda0d3b10fac6e189acc27] Prevent text from being cleared when selected due to winit IME (#3376)
@emilk, Bug locate at #3362.
The idea of https://github.com/emilk/egui/pull/3362 was the IME should be enabled once the user clicks a text edit box, but apparently something broke. Luckily it is a very small PR, so it should be easy to figure out a fix if someone wants to work on it!
most likely fixed by https://github.com/emilk/egui/pull/4436
Egui v0.23,chinese punctuation cannot be inputted by IME, but copy/paste does work. Egui v0.22 works fine. Screenshots
https://github.com/emilk/egui/assets/71546076/2e5d87da-5ead-4605-9eda-774830d4a25c
Desktop (please complete the following information):