egui icon indicating copy to clipboard operation
egui copied to clipboard

IME input broken

Open zdl361 opened this issue 2 years ago • 6 comments
trafficstars

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):

  • OS: Win10 LTSC
  • Browser Native
  • Version 0.23

zdl361 avatar Nov 06 '23 15:11 zdl361

为啥我中文显示都是方块

birnfly avatar Nov 10 '23 08:11 birnfly

为啥我中文显示都是方块

@birnfly 因为你没有设置中文字体。egui内置字体不包含中文。我给你个添加了中文字体的demo。下载编译就行。 https://delongnas.synology.me:5001/d/s/vyVrJcxssuZfzNS3Qh13kmTTjnec4b4Q/FutcXndK_u2tWCXIOv_3uj9pyorWkV3w-Q7sAWJhD5Ao

zdl361 avatar Nov 10 '23 10:11 zdl361

Have you tried a git bisect to find the cause of this? From the changelog there were two PRs affecting IME:

  • https://github.com/emilk/egui/pull/3362
  • https://github.com/emilk/egui/pull/3376

emilk avatar Nov 10 '23 20:11 emilk

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.

zdl361 avatar Nov 11 '23 10:11 zdl361

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!

emilk avatar Nov 16 '23 10:11 emilk

most likely fixed by https://github.com/emilk/egui/pull/4436

TicClick avatar May 10 '24 22:05 TicClick