Some doubts about Font Fallback and C#

A

alberto.ribao

Hello,

I'm making some proofs of concept about localization with .NET
Framework 2.0

My trouble is I'm trying to display the next string with a call to
MessageBox.Show method:

MessageBox.Show("250\u2009000 points");

With the default font system (Verdana) it shows a square instead of the
proper unicode glyph. If I switch manually to Arial Unicode font, it's
displayed perfectly.

In MSDN, you can read this:

- Using Font Fallback (
http://msdn.microsoft.com/library/d...bleWFCControlsSupportingInternationalText.asp
)
To take advantage of this feature, do not set the Font property for
your form or any other element. The application will automatically use
the default system font, which differs from one localized language of
the operating system to another. When the application runs, the system
will automatically provide the correct font for the culture selected in
the operating system.


So, my question is: is there any way to perform font fallback
automatically in .NET? Am I doing anything wrong? Any code snippet?

Thanks in advance
 
D

Dave Sexton

Hi Alberto,

What is the current culture of the UI thread when you see the 'square'
glyph? I assume you are testing this on a computer where the default
culture is en-US or any other culture that uses Verdana as the default font?
What cultures have you tried?

- Dave Sexton
 
A

alberto.ribao

Hi, I've tried with japanase culture, but I think that my problem is
I've misunderstood the MSDN explanation: it says that "The application
will automatically use the default system font", and my default system
font is Verdana, so when I do a MessageBox, I get that square glyph. If
I set my default system font to Arial Unicode MS, I get the correct
character.

So, I guess that if you execute my sample code on a Windows system
configured with a default font that support that glyph, it will work
fine. I guess that asian versions of Windows will have that kind of
default fonts. But to be sure I must test this code with several
Windows versions or a MUI Windows.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top