views:

227

answers:

3

A few years back, I created a WinForms application that has been successfully deployed. The next version of the application must support Chinese and Korean characters. For aesthetic reasons, my client wanted all the text in the application displayed with the Arial font family.

However, Arial doesn't support Chinese and Korean characters. On most platforms, the Windows Uniscribe Font Fallback mechanism adequately chooses a font to display the East Asian characters. But on English Windows XP, the font it picks is terrible.

I've been looking at resolving this problem with Font Linking. This would allow me to specify which font should be used when Arial can't display a character. This seems like a very elegant solution.

The problem is that the article I linked to says that adding font links through the registry is not officially supported. Also, changing the font links in the registry would impact the whole computer and not just my application.

Does anyone have experience with added font links? Did it work? What are the situations that are going to bit me later?

+1  A: 

Can you use the font Arial Unicode MS?

That's what I use to display Chinese fonts in charts and PDFs.

Chris Persichetti
I could, but there are several reasons why I would prefer not to. The main reason is that it requires a license for redistribution. It is included with office, so most but not all of my users would have it.
epotter
+2  A: 

The "not supported" clause in the linked article is telling you that you can't call Microsoft Support and complain because you used Regedit.exe incorrectly and messed up the machine. It doesn't say that font linking isn't supported.

You can't really affect another program negatively by doing this. Font linking doesn't replace glyphs, only substitute missing ones. Such a program would previously not render text correctly. It will show readable text after you're done. They'll buy you a very nice dinner and some dancing girls.

Hans Passant
A: 

So, the problem is that you want to use one font if the characters match some criteria, and another font if they don't, right?

So, why not just write some code that, when the text is updated, checks the criteria and sets the font appropriately? It may be a little bit of busy work, but if it's done all over the place I bet you could encapsulate it in a custom control.

Sometimes it's a lot easier to just do the work than to try and get clever with a bunch of system settings. Not as fun, admittedly, but less likely to cause problems.

kyoryu
I had thought about that, but this is a fairly large application and it would require modifications to 20+ custom controls. Part of my motives behind this question was to see if font linking was a standard practice or if it was overly clever.
epotter