public static FontUtil GetInstance() { if (inst == null) { inst = new FontUtil(); inst.GetAllFonts(); } return inst; }
public static void CopyFontToResources(string fontName, string resourceFolder) { char ds = Path.DirectorySeparatorChar; string fontPath = FontUtil.GetInstance().FontMap[fontName]; string fileName = fontPath.Substring(fontPath.LastIndexOf(ds)); string targetPath = resourceFolder + ds + fileName; IOUtils.EnsurePath(targetPath); if (!File.Exists(targetPath)) { File.Copy(fontPath, targetPath); } }