views:

1479

answers:

4

My application correctly handles different kind of character sets, but only internally - when it comes to displaying text in standard WinForms labels und textboxes, it seems to have problems with chinese characters.

The problem seems to be the font used (Tahoma), because when I copy&paste the text, or view it in the debugger, it is displayed correctly. Also when I set MS Mincho as the font to be used, the characters on the screen look OK.

Of course, I don't want to use MS Mincho in the entire application. Do I have to switch the font depending on the characters displayed, or is there a better way I have missed?

A: 

All fonts don't have data for all the glyphs that can be expressed in unicode. You´ll have to locate a suitable font which has the subset you want.

edit: Just to clarify, there are fonts which cover the full unicode range, but the one you´re using now isn´t one of them.

Internet Friend
+4  A: 

UniScribe, which was introduced in Windows 2000, is supposed to handle this transparently, meaning that it will automatically use a different font (such as Mincho) for characters that aren't present in the font you've selected. This is why it looks correct in the debugger, even though the font used in the debugger doesn't contain Chinese characters. Perhaps you are doing something that disables UniScribe, or is problematic in some other way. Perhaps if you could paste some code it would be easier to identify the problem.

bzlm
Seems like this is the kind of library I've been looking for.
Stefan Schultze
@Stefan If you use the standard development mechanisms (ie. Visual Studio), UniScribe should already be there and do the work for you (see comment by Mihai on question).
bzlm
A: 

I want to render Unicode glyphs to jpg format. Should I change the font for each Unicode block in my java Code? I tried not to do that, but it did not work. However, changing the font for each block takes a lot of time. Do you know any better way?

Can I ask which font covers the full Unicode range?

Shadi
You should probably start your own, separate question, since your problem is not the same as the above question.
stakx
thanks. I have asked here because "Internet Friend" in the last post said : " there are fonts which cover the full unicode range, but the one you´re using now isn´t one of them"However, I have asked in another thread as well.Shadi.
Shadi
A: 

Hi and thanks for your answer.

you said: "here are fonts which cover the full unicode range" May I ask which font covers the full unicode range? I really need it.

Thanks

Shadi