using System; using System.IO; using System.Net.Mime; using Dashboard.Pal; namespace Dashboard.Drawing { public class Font(IFont iFont) : IFont { public IFont Base => iFont; public string Family => iFont.Family; public FontWeight Weight => iFont.Weight; public FontSlant Slant => iFont.Slant; public FontStretch Stretch => iFont.Stretch; public void Dispose() { iFont.Dispose(); } public static Font Create(Stream stream) { IFont iFont = Application.Current.ExtensionRequire().Load(stream); return new Font(iFont); } public static Font Create(FontInfo info) { IFont iFont = Application.Current.ExtensionRequire().Load(info); return new Font(iFont); } public static Font Create(string path) { IFont iFont = Application.Current.ExtensionRequire().Load(path); return new Font(iFont); } } }