Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » CJK source code comment
CJK source code comment [message #15056] Thu, 27 March 2008 14:31 Go to next message
mobilehunter is currently offline  mobilehunter
Messages: 87
Registered: November 2006
Member
I just installed TheIDE for linux (sabayon).
I tried to insert some japanese comment to UWord source code.
But nothing happened (no character shown).
I also tried to enter japanese character at UWord, i got box character instead. One box character per IME session, i input many characters but only 1 box character shown.

Does this feature already supported?
Which source code part should i play with?

Thanks
Re: CJK source code comment [message #15057 is a reply to message #15056] Thu, 27 March 2008 14:38 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mobilehunter wrote on Thu, 27 March 2008 09:31

I just installed TheIDE for linux (sabayon).
I tried to insert some japanese comment to UWord source code.
But nothing happened (no character shown).
I also tried to enter japanese character at UWord, i got box character instead. One box character per IME session, i input many characters but only 1 box character shown.

Does this feature already supported?
Which source code part should i play with?

Thanks


I guess, for the comment, make sure you have utf-8 encoding for the file first...

Then the problem is fonts. AFAIK, "predefined" linux fonts do not contain CJK glyphs. In fact, they do not usually contain even anything else than ISO8859-1, but U++ goes over this limitation somewhat by synthetising characters in unicode range 256-512...

Frankly, I am not 100% sure what to do with it. I guess we will need to pull CJK from other fonts than those predefined I guess (but at what priority?).

BTW, speaking about it, what is the notion of font for CJK? I have noticed that for the limited number of fonts that support CJK on Win32, all glyps look basically the same, just the density is somewhat altered... (if this is the case, I could probably just use some "default CJK" font for missing glyphs or something like that..).

Mirek
Re: CJK source code comment [message #15065 is a reply to message #15057] Fri, 28 March 2008 01:45 Go to previous messageGo to next message
mobilehunter is currently offline  mobilehunter
Messages: 87
Registered: November 2006
Member
I have set to UTF-8 but still no luck.

Thanks for mentioning the Win32.
I think i saw this problem again at current UWord for XP.

Another test with KDE 4.0.2, previously i tested against KDE 3.5.7.
Now i can see box character inside TheIDE if i write something.

Hope this help.
Re: CJK source code comment [message #15597 is a reply to message #15057] Wed, 30 April 2008 03:40 Go to previous messageGo to next message
mobilehunter is currently offline  mobilehunter
Messages: 87
Registered: November 2006
Member
luzr wrote on Thu, 27 March 2008 22:38


Then the problem is fonts. AFAIK, "predefined" linux fonts do not contain CJK glyphs. In fact, they do not usually contain even anything else than ISO8859-1, but U++ goes over this limitation somewhat by synthetising characters in unicode range 256-512...

Frankly, I am not 100% sure what to do with it. I guess we will need to pull CJK from other fonts than those predefined I guess (but at what priority?).

BTW, speaking about it, what is the notion of font for CJK? I have noticed that for the limited number of fonts that support CJK on Win32, all glyps look basically the same, just the density is somewhat altered... (if this is the case, I could probably just use some "default CJK" font for missing glyphs or something like that..).

Mirek


I know nothing too about this, i just try to fill something missing.

I tried to enumerate all fonts, and print japanese text using those fonts. Some of the font which able to print japanese are "kochi mincho" and "kochi gothic".

Is there any algorithm to select this font automatically if we use Draw::DrawText function?

Another one, which part of UPP codes do characters synthetising?


Thanks
Re: CJK source code comment [message #15598 is a reply to message #15597] Wed, 30 April 2008 10:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mobilehunter wrote on Tue, 29 April 2008 21:40

luzr wrote on Thu, 27 March 2008 22:38


Then the problem is fonts. AFAIK, "predefined" linux fonts do not contain CJK glyphs. In fact, they do not usually contain even anything else than ISO8859-1, but U++ goes over this limitation somewhat by synthetising characters in unicode range 256-512...

Frankly, I am not 100% sure what to do with it. I guess we will need to pull CJK from other fonts than those predefined I guess (but at what priority?).

BTW, speaking about it, what is the notion of font for CJK? I have noticed that for the limited number of fonts that support CJK on Win32, all glyps look basically the same, just the density is somewhat altered... (if this is the case, I could probably just use some "default CJK" font for missing glyphs or something like that..).

Mirek


I know nothing too about this, i just try to fill something missing.

I tried to enumerate all fonts, and print japanese text using those fonts. Some of the font which able to print japanese are "kochi mincho" and "kochi gothic".

Is there any algorithm to select this font automatically if we use Draw::DrawText function?



Not yet. BTW, are "kochi mincho" and "gothic" different glyphs?

(I mean, has CJK notion of things like font style?).


Quote:


Another one, which part of UPP codes do characters synthetising?



Draw/ComposeText.cpp

Mirek
Re: CJK source code comment [message #15604 is a reply to message #15598] Wed, 30 April 2008 13:26 Go to previous messageGo to next message
mobilehunter is currently offline  mobilehunter
Messages: 87
Registered: November 2006
Member
luzr wrote on Wed, 30 April 2008 17:41



Not yet. BTW, are "kochi mincho" and "gothic" different glyphs?

(I mean, has CJK notion of things like font style?).



I cannot answer more Sad. Don't have any experience with font world.

Through google i got some links:

http://en.wikipedia.org/wiki/Kochi_font
http://ubuntuforums.org/archive/index.php/t-206280.html
http://www.geocities.jp/ep3797/japanese_fonts.html
Re: CJK source code comment [message #16321 is a reply to message #15056] Sat, 07 June 2008 21:19 Go to previous messageGo to next message
phirox is currently offline  phirox
Messages: 49
Registered: December 2007
Member
Having the same problem using U++ with Linux. My default charset and all my files are UTF-8, when I make a string and put some unicode characteres in there like: ♩♪♫♬♭♮♯

They show up as boxes, but they do work for the end-goal. In my case this is console output.

Thus the problem lies with the rendering. Therefor I first tried different fonts in the environment settings, but no luck there. (these fonts do have success when using other programs like gnome text-editor).

Then I tried an ide version compiled with NOGTK, but it has the same problem.

Since it just the 'viewing' that is broken it might be low priority, but if you can take a look or direct me to the files I should look into; I'd be glad to help.
Re: CJK source code comment [message #16329 is a reply to message #16321] Sun, 08 June 2008 09:10 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
phirox wrote on Sat, 07 June 2008 15:19

Having the same problem using U++ with Linux. My default charset and all my files are UTF-8, when I make a string and put some unicode characteres in there like: ♩♪♫♬♭♮♯

They show up as boxes, but they do work for the end-goal. In my case this is console output.

Thus the problem lies with the rendering. Therefor I first tried different fonts in the environment settings, but no luck there. (these fonts do have success when using other programs like gnome text-editor).

Then I tried an ide version compiled with NOGTK, but it has the same problem.

Since it just the 'viewing' that is broken it might be low priority, but if you can take a look or direct me to the files I should look into; I'd be glad to help.


Draw/DrawTextXft.cpp

Anyway, I think that the real cause is really missing glyphs in fonts and the fact that U++ does not look for missing glyphs in other fonts. That is a little bit more complex to fix...

Mirek
Previous Topic: Unicode input in Windows (not IME)
Next Topic: Korean text in .t file opened in the IDE does not display properly
Goto Forum:
  


Current Time: Thu Mar 28 15:12:19 CET 2024

Total time taken to generate the page: 0.01249 seconds