Open frg2089 opened 3 years ago
?
------------------ Original ------------------ chinez plz
I've noticed that it's very difficult to achieve IME support for better results without modifying MonoGame. On platforms that use WinForms (WindowsDX or XNA), I can Hook WndProc via NativeWindow. But when using SDL2 the situation is different, there is no Hook solution for the SdlRunLoop method, making it impossible to provide good IME support on SDL2 platforms.
We have to wait for MonoGame to make changes before we can move forward.
As well, this means that versions built for the .Net Framework will never be able to fully support IME, as MonoGame has dropped support for that version. Unless we create our own fork.
@SadPencil Do you think we should create our own fork to provide IME support? Mainly to provide support for .Net Framework 4.8
I think we shouldn't have enough manpower and energy to do that.
@SadPencil Do you think we should create our own fork to provide IME support?
Mainly to provide support for .Net Framework 4.8
I think we shouldn't have enough manpower and energy to do that.
I am not familiar with MonoGame. Personally I think DX and XNA should be sufficient for most Chinese players?
I am not familiar with MonoGame. Personally I think DX and XNA should be sufficient for most Chinese players?
I have a simple demo, you can see how it works and I can send a PR if you think it's good.
DX and XNA only. And I don't have the XNA runtime to test it. demo.zip
We can used MonoGame.IMEHelper to support IME easily.
However, as @Rampastring said, support for CJK character input requires that Chinese fonts be encapsulated in a spritefont file.
MonoGame's tool for making spritefont exchanges build time for space making the resulting spritefont.xnb file very small.
This is not a problem in general, there aren't that many letters in total are there?
But with CJK, it's a big problem, we have thousands of characters! The time required for one build is very, very huge (maybe a month?) !
1. So, we need to modify the source code of
dotnet-mgcb
so that instead of trading time for space, we trade space for time.https://github.com/MonoGame/MonoGame/blob/931bbd110cfce68e351dd1ca53de9938b06dbf4f/MonoGame.Framework.Content.Pipeline/Graphics/Font/IFontImporter.cs#L5
2. Or used FontStashSharp.MonoGame to supported ttf file.
Link
Translated with DeepL.com (free version)