MultiByte Language support pack for Irrlicht
i'll second this.Dorth wrote:Again, this should really be moved into Irrlicht core...
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
not sure why it isn't already part of the core, perhaps because of the licence/requirements of including the freetype lib with the Irrlicht distro?
I'm not too much of a font-guru myself, but I'll post my thoughts anyway
maybe just create a set of custom font grid "bitmaps" with all the required characters for these languages, then create a simple sort of parser which converts the ascii value to a reference number to render out the characters as image-quads?
I currently use a similar method to render plain Latin texts in my non-irrlicht project, and I was planning to use the same method to add Japanese support
I do realise, however, it might become quite tricky when dealing with lots of text onscreen, changing font size, etc.
ofcourse, there's also the slight issue of these bitmap images bloating the end filesize of the Irrlicht dist, and the need to include them with all irrlicht-compiled programs...
or maybe a new "font-type" plugin system for these additional language characters, with all the neccessary image data precompiled (hardcoded) into additional DLL files, then included if they're needed?
I guess it wouldn't need to be Irrlicht-specific then...
tell me if I'm talking nonsense...
I'm not too much of a font-guru myself, but I'll post my thoughts anyway
maybe just create a set of custom font grid "bitmaps" with all the required characters for these languages, then create a simple sort of parser which converts the ascii value to a reference number to render out the characters as image-quads?
I currently use a similar method to render plain Latin texts in my non-irrlicht project, and I was planning to use the same method to add Japanese support
I do realise, however, it might become quite tricky when dealing with lots of text onscreen, changing font size, etc.
ofcourse, there's also the slight issue of these bitmap images bloating the end filesize of the Irrlicht dist, and the need to include them with all irrlicht-compiled programs...
or maybe a new "font-type" plugin system for these additional language characters, with all the neccessary image data precompiled (hardcoded) into additional DLL files, then included if they're needed?
I guess it wouldn't need to be Irrlicht-specific then...
tell me if I'm talking nonsense...
Thanks fmx.
In multibyte language support, there are three problems, input, display, and font.
Most difficult problem is the input, then I want the idea how to implement this.
[INPUT]
"problem"
Multibyte character cannot be input, because Irrlicht disregards WM_IME messages.
"implementation candidacy"
* The WM_IME message processing is added to the core by using imm32 lib. (Need to modify the core like IrrlichtML. imm32 will die gradually in future)
* Hijack irr::IrrlichtDevice::run(). (No need to modify the core like IrrIM Test. Imperfection)
* Use Third party window system. WPF, SDL, CEGUI... and the input is left them. (No need to modify the core)
* Use TSF(Text Services Framework) COM API. (No need to modify the core? The mainstream in near future. But, I don't know how to code... )
Which is best among these candidates? or don't you have other ideas?
[DISPLAY]
"problem"
Multibyte character is garbled in IGUIEditBox and IGUIFileOpenDialog.
"implementation"
It is necessary to convert multibyte char to wide char. (Not need to modify the core?)
[FONT]
"problem"
Bitmap font is inconvenient.
"implementation"
Use IrrTT class. (No need to modify the core)
Multibyte languages can be used for original Irrlicht by the Bitmap font, only displays them, isn't it?fmx wrote:maybe just create a set of custom font grid "bitmaps" with all the required characters for these languages, then create a simple sort of parser which converts the ascii value to a reference number to render out the characters as image-quads?
In multibyte language support, there are three problems, input, display, and font.
Most difficult problem is the input, then I want the idea how to implement this.
[INPUT]
"problem"
Multibyte character cannot be input, because Irrlicht disregards WM_IME messages.
"implementation candidacy"
* The WM_IME message processing is added to the core by using imm32 lib. (Need to modify the core like IrrlichtML. imm32 will die gradually in future)
* Hijack irr::IrrlichtDevice::run(). (No need to modify the core like IrrIM Test. Imperfection)
* Use Third party window system. WPF, SDL, CEGUI... and the input is left them. (No need to modify the core)
* Use TSF(Text Services Framework) COM API. (No need to modify the core? The mainstream in near future. But, I don't know how to code... )
Which is best among these candidates? or don't you have other ideas?
[DISPLAY]
"problem"
Multibyte character is garbled in IGUIEditBox and IGUIFileOpenDialog.
"implementation"
It is necessary to convert multibyte char to wide char. (Not need to modify the core?)
[FONT]
"problem"
Bitmap font is inconvenient.
"implementation"
Use IrrTT class. (No need to modify the core)
Like I said, I'm not a font-guru
you're right, using Bitmaps only renders the fonts, it doesn't deal with Input and issues related to Irrlicht's GUI
for INPUT it would probably be best to use either IrrIM test, or TSF.
I don't know much about TSF either but I'll have a look into it and see if its appropriate or how it could be implemented.
I think its about time I contributed back to Irrlicht... been a while since my last endevours (went horribly wrong )
Can I just ask everyone, what non-Latin languages do you think should be specifically targeted to allow support for in Irrlicht?
I'm personally just trying to get more Japanese support, but I guess Korean and Chinese might also be desirable?
you're right, using Bitmaps only renders the fonts, it doesn't deal with Input and issues related to Irrlicht's GUI
for INPUT it would probably be best to use either IrrIM test, or TSF.
I don't know much about TSF either but I'll have a look into it and see if its appropriate or how it could be implemented.
I think its about time I contributed back to Irrlicht... been a while since my last endevours (went horribly wrong )
Can I just ask everyone, what non-Latin languages do you think should be specifically targeted to allow support for in Irrlicht?
I'm personally just trying to get more Japanese support, but I guess Korean and Chinese might also be desirable?
OK, I will also research TSF in fuller detail:Dfmx wrote:for INPUT it would probably be best to use either IrrIM test, or TSF.
I don't know much about TSF either but I'll have a look into it and see if its appropriate or how it could be implemented.
Japanese,Korean,Chinese, and Virion's country Malaysia?fmx wrote:Can I just ask everyone, what non-Latin languages do you think should be specifically targeted to allow support for in Irrlicht?
I'm personally just trying to get more Japanese support, but I guess Korean and Chinese might also be desirable?
Version 1.5 has been released.
http://etwas.wolfish.org/files/Irrlicht ... 2Linux.zip
- Added EditBox's MultiLine and WordWrap switch support.
- Changed sample apps.
- Broke off the DirectX 8 support in precompiled DLL. (I'm using VS2008 and DirectX SDK - August 2008)
also, I submitted garbled CGUIFileOpenDialog fix patch from this code.
http://etwas.wolfish.org/files/Irrlicht ... 2Linux.zip
- Added EditBox's MultiLine and WordWrap switch support.
- Changed sample apps.
- Broke off the DirectX 8 support in precompiled DLL. (I'm using VS2008 and DirectX SDK - August 2008)
also, I submitted garbled CGUIFileOpenDialog fix patch from this code.
-
- Posts: 20
- Joined: Sat Jan 10, 2009 12:53 pm
nice work. i read the code but i couldn't figure out how you draw the candidate list window? Why don't you get the candidate list and render them directly?MadHyde wrote:Version 1.5 has been released.
http://etwas.wolfish.org/files/Irrlicht ... 2Linux.zip
- Added EditBox's MultiLine and WordWrap switch support.
- Changed sample apps.
- Broke off the DirectX 8 support in precompiled DLL. (I'm using VS2008 and DirectX SDK - August 2008)
also, I submitted garbled CGUIFileOpenDialog fix patch from this code.
I modified the code to support rendering the IME candidate string list directly in the GUI. Check the pic below, the candidate string list was rendered on top of the red line.
Only avaliable on Windows.
I tried Chinese, but I think all the eastern languagies (mainly Chinese, Japanese and Korean) are supported.
Only avaliable on Windows.
I tried Chinese, but I think all the eastern languagies (mainly Chinese, Japanese and Korean) are supported.
I set only window position. Candidate list window is under the contorol of OS. I'm not doing anything. because that is easy and comfortable.venomj wrote: nice work. i read the code but i couldn't figure out how you draw the candidate list window? Why don't you get the candidate list and render them directly?
Wow, that's great!! How did you receive IME Messages? I want you to publish the sourcevenomj wrote:I modified the code to support rendering the IME candidate string list directly in the GUI. Check the pic below, the candidate string list was rendered on top of the red line.
Well, you may have problems displaying the candidate list window in full screen mode.Candidate list window is under the contorol of OS. I'm not doing anything.
I process the WM_IME_NOTIFY message in CIrrDeviceWin32 to get the candidate list strings. Then I send an event to the edit to display the strings.
I add a minor improvement to display the composition string before the candidate list. Check pic below.
Tell me your email address, I can send you my code.