in my Project Used Fonts, for install fonts when ClickOnce.
string strFontsPathFile = Environment.GetEnvironmentVariable("windir")
+ @"\Fonts\" + strFileName;
File.Copy(strFontFilePath, strFontsPathFile, true);
//2)Step 2 : Install font in resource of MS-Windows
if (AddFontResource(strFontsPathFile) == 0)
return false;
//3)Step 3 : Set registry information of new installed font for use
RegistryKey reg = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", true);
reg.SetValue(strFileName.Split('.')[0] + " (TrueType)", strFileName);
reg.Close();
SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
But Error:
Access to the path '' is denied.