cogentcore / core

A free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the web with a single Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.76k stars 83 forks source link

Support international input #698

Open kkoreilly opened 11 months ago

kkoreilly commented 11 months ago

For example, when using a Japanese romaji virtual input method, the input menu is put in the corner of the window and does synchronize with events well. This is related to #9 and #568.

kkoreilly commented 9 months ago

We could do this if https://github.com/go-gl/glfw/pull/371 is ever merged, or if we fold glfw into goosi (see #274).

ddkwork commented 9 months ago

gio seems to be implemented through this, but I still don't understand, currently core is specifying the font through the global setting to display Chinese?


https://github.com/go-text/typesetting
https://github.com/go-text/typesetting-utils
https://github.com/go-text/render
kkoreilly commented 9 months ago

I am going to figure out a good approach to international input, international fonts, and translation soon when I do my implementation of internationalization.

ddkwork commented 9 months ago

We could do this if go-gl/glfw#371 is ever merged, or if we fold glfw into goosi (see #274).

Let's slowly study the PR that can't be merged for two years, but I don't recommend merging the code into the core module because it's not convenient for us to pull its updates. Therefore, we should fork one, and its repository updates are not very frequent. This way, there are few conflicts when pulling, and it's easy to merge. Then, we can replace it in the module to your fork address

kkoreilly commented 9 months ago

We are going to see what happens with https://github.com/go-gl/glfw/pull/392, and then we may consider forking glfw.

ddkwork commented 9 months ago

I don't think there's much hope, I used to play Fyne when I saw him deal with some issues and PR situations, compared to you, one in the sky and one underground, you are the kind of talent with good skills but very modesty, and he is not, let's start anew, no accident, that PR will continue to die in a few months.

---Original--- From: @.> Date: Tue, Feb 27, 2024 23:41 PM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] Support international input (Issue #698)

We are going to see what happens with go-gl/glfw#392, and then we may consider forking glfw.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

kkoreilly commented 9 months ago

Thanks! If there is no motion on that PR by the time I start working on internationalization, we will fork glfw.

ddkwork commented 9 months ago

okay

---Original--- From: @.> Date: Wed, Feb 28, 2024 00:11 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] Support international input (Issue #698)

Thanks! If there is no motion on that PR by the time I start working on internationalization, we will fork glfw.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

andydotxyz commented 9 months ago

gio seems to be implemented through this, but I still don't understand, currently core is specifying the font through the global setting to display Chinese?

https://github.com/go-text/typesetting
https://github.com/go-text/typesetting-utils
https://github.com/go-text/render

As I do some work in the go-text project I can provide a little context. Those packages handle how text is displayed (typesetting is the layout and complex language rules, render is rasterising the information to image/screen). As both Gio and Fyne use those packages for text handling it's not a differentiator with regards to international support. The input (IME and more) relates to the OS level input and event handling framework and there isn't anything we can do at the text handling level to take care of it for you.

kkoreilly commented 9 months ago

Yep, there are three main parts of internationalization: fonts, translation, and input. We know how to implement international fonts, and the issue for that is #568. We know how to implement translation, and the issue for that is #9. This issue is for international input (IME) support, which must be implemented at the OS driver level. There are four separate PRs in different places that each implement that: https://github.com/glfw/glfw/pull/658, https://github.com/glfw/glfw/pull/2130, https://github.com/go-gl/glfw/pull/371, and https://github.com/go-gl/glfw/pull/392. If none of these PRs are merged by the time we get to international input support, which should be in a few weeks, then we will likely have to maintain a fork of go-gl/glfw with an IME PR merged.

andydotxyz commented 9 months ago

Cool, seems like you have it covered then :)

gedw99 commented 4 weeks ago

polite ping

the typesetting package ( github.com/go-text/typesetting ) does not seem to be in yet.

The Webgpu system is the new system so I am hoping that this can be brought forward .

My own itch to scratch is Cut and Paste, and precise Font control abilities...

kkoreilly commented 4 weeks ago

Yes, we are planning to switch over to go-text soon. Cut and paste for core.Text is a separate issue (#1051), and we will likely have better text styling as part of go-text. Thanks for the ping!