// available in FR.OS, FR.NET, FR.WPF #if !SKIA && !FRCORE && (!MONO || WPF) using System; using System.Diagnostics; using System.Drawing.Text; using System.IO; namespace FastReport { public static partial class FontManager { /// /// Adds a font from the specified file to this collection. /// /// A System.String that contains the file name of the font to add. /// true if the font is registered by application. public static bool AddFont(string filename) { bool success = false; if (File.Exists(filename)) { PrivateFontCollection.AddFontFile(filename); success = true; } else { Debug.WriteLine($"Font file '{filename}' not found"); } return success; } /// /// Adds a font contained in system memory to this collection. /// /// The memory address of the font to add. /// The memory length of the font to add. public static void AddFont(IntPtr memory, int length) { PrivateFontCollection.AddMemoryFont(memory, length); } } } #endif