tags:

views:

147

answers:

3

Hello,

I've built a simple e-card creator web app for a client that accepts a personal greeting and draws it onto a selected card design. On my local machine, I can enter asian languages and the text is drawn correctly on the image. I have the asian languages installed on my machine.

When I loaded the app to my client's server, asian languages show up as boxes. I suspect it's because their server doesn't have the asian language pack installed. But I'm wondering, is that the reason? Is there any way to accept asian languages and display it correctly without having the asian language pack installed?

Here's how I'm drawing the text onto the image

Graphics g = Graphics.FromImage(image);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.DrawString(text,
    new Font(fontFamily, fontSize),
    brushColor,
    position,
    strFormat);
g.Dispose();

I'm using Arial font.

Is there something special I need to do?

Thanks.

+1  A: 

I think you need a font that supports the Asian letters you are using. For example, my machine has the "Arial Unicode MS" font installed, which I think was installed with Microsoft Office.

ChrisW
Arial Unicode MS is installed with Office, but it is not free to redistribute. It must be licensed.
epotter
+1  A: 

You can include the fonts you need in your application. Then it doesn't matter if they aren't installed on your client's machine.

Here is one webpage I found about it: http://msdn.microsoft.com/en-us/library/ms753303.aspx

Here's another: http://dotnet-coding-helpercs.blogspot.com/

Mark Byers
+2  A: 

Arial doesn't contain the characters you need, but if the East Asian fonts are installed, Windows can use characters from those in place of Arial. You can install the fonts, pick a new font to use, or match Arial up with a different font for Asian characters using font linking. (If you set up font linking using the instructions in that article, it'd be for all software on the machine, not just your app.)

Morbo
Does Windows come default with any fonts that support Asian languages? My clients IT is very reluctant to make changes on their servers... If they don't want to install fonts, is using supporting Asian languages out of the question? Mark's link seemed promising but they've only got ASP.NET 2.0.
Daniel
Yes, but on older versions (XP, 2003) they're not installed by default. If I recall, you can install them from the Regional and Language Options control panel.If they don't want to install new fonts, you could use some of these other solutions to include the fonts you need with your application, but that will increase the complexity quite a bit, and also most likely increase the cost—if you're not going to use the fonts that come with Windows, you'll need to license some different ones. Fonts have license terms just like software, and the good ones generally aren't free.
Morbo
Thanks Morbo. I'll let them know their options.
Daniel