string WinFontDir = System.Environment.GetEnvironmentVariable("windir") + "\\fonts/;
string FontFileName = "MSYH.TTF";
string FontName = "MSYH";
int Ret;
int Res;
string FontPath;
const int WM_FONTCHANGE = 0x001D;
const int HWND_BROADCAST = 0xffff;
FontPath = WinFontDir + "\\" + FontFileName;
if (!File.Exists(FontPath))
{
File.Copy(System.Windows.Forms.Application.StartupPath + "\\msyh.ttf/", FontPath);
Ret = AddFontResource(FontPath);
Res = SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
Ret = WriteProfileString("fonts", FontName + "(TrueType)", FontFileName);
}