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 corr开发者_开发问答ect format only some rectangle showing.
in client pc i also install bangla writing softare also.
Thanks Tonmoy
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.
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.
精彩评论