public static void SetUpFonts() { try { string str = "OCRAEXT_0.TTF"; string str2 = "OCRAEXT_0"; string sourceFileName = Path.Combine(PropertyUtil.GetValue("MAIN_PATH"), string.Format(@"Config\Fonts\{0}", str)); string path = Path.Combine(Path.Combine(Path.GetDirectoryName(Environment.GetFolderPath(Environment.SpecialFolder.System).TrimEnd(new char[] { '\\' })), "Fonts"), str); if (!File.Exists(path)) { File.Copy(sourceFileName, path); AddFontResource(path); SendMessage(0xffff, 0x1d, 0, 0); WriteProfileString("fonts", str2 + "(TrueType)", str); } } catch (Exception) { } }