문제

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.

도움이 되었습니까?

해결책

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.)

다른 팁

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.

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/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top