473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Some doubts about Font Fallback and C#

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/de...tionalText.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

Jul 17 '06 #1
2 2522
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

<al***********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
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/de...tionalText.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

Jul 18 '06 #2
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!

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

<al***********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
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/de...tionalText.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
Jul 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Martin RAYROLE | last post by:
Hi folks, Does somebody know how to test the availability of a font on the browser platform ? Thanks for your help Martin
30
by: Mark Tranchant | last post by:
Take a look at this page: http://tranchant.plus.com/cycling/gears/ratio Just over half-way down is the sentence 'My wheels are approximately 27? in diameter'. I use the ″ double prime for...
10
by: Richard R Plourde | last post by:
I've got a problem that IE doesn't seem to use the entire font unicode subgroups from a hinted font file. When I display the following web page in IE 6 as opposed to Firefox 1.0 PR. Check out...
300
by: Ståle Sæbøe | last post by:
I am a bit curious about this. The graphic design people I work with say it is their preferred font for web pages. The reason being that it is "kinder" to the eye both in terms of shape and...
40
by: apprentice | last post by:
Hello, I'm writing an class library that I imagine people from different countries might be interested in using, so I'm considering what needs to be provided to support foreign languages,...
15
by: srampally | last post by:
The following code works in firefox. But IE displays the hyperlink at font-size=13 rather than font-size=10. Why? If its a known IE bug, how should I fix it? I always want the hyperlinks to take...
16
by: maya | last post by:
I have heard so much preaching here about how font sizes should be set as percentages so users can change font-sizes on their browsers... ok, so now at work am working on a site where we need to do...
37
by: shapper | last post by:
Hello, I have been reading a lot about fonts and I got to the following conclusions: 1.Use % do define font size 2. Avoid defining font in Body and P tags 3. Avoid using Verdana I...
43
by: Andy Mabbett | last post by:
I'm about to publish (what's the web equivalent of "reprint"?) an old paper article, whose heading is in this font: <http://www.flickr.com/photos/pigsonthewing/2446437162/> Can anyone kindly...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.