Imamul Karim Tonmoy
Imamul Karim Tonmoy

Reputation: 584

Font Problem in .NET 4

i am developing a simple application on .NET 4 visual studio 2010. i am using default font microsoft san serif. but i am was writing in bangla (unicode) for label button text. but my development pc show everyting correctly. but when i install this program on other computer then font not showing correct format only some rectangle showing.

in client pc i also install bangla writing softare also.

Thanks Tonmoy

Upvotes: 0

Views: 1373

Answers (2)

John Leidegren
John Leidegren

Reputation: 61077

If you're writing a WinForms application you can load the font into a private collection. Check out this question. If you do that then the font will always be available to your app.

There's a class System.Drawing.Text.PrivateFontCollection in System.Drawing.dll which can manage fonts on a per application basis.

All you do is that you maintain this collection within your app and you add fonts through AddFontFile or AddMemoryFont and you'll then be able to use that font as if it was installed on your system.

It's like installing the font for the application only. The font will be uninstalled once the process terminates.

Upvotes: 1

Marc Gravell
Marc Gravell

Reputation: 1064244

It sounds simply like the target computer doesn't have the necessary fonts. Perhaps they have a different version or locale of windows (with a different "Sans Serif" font), or maybe you are actually using a different font that the target PC lacks.

Upvotes: 1

Related Questions