using System; namespace Quik.Media { public struct FontInfo : IEquatable { public string Family { get; } public FontStyle Style { get; } public override string ToString() { return $"{Family} {Style}"; } public override int GetHashCode() { return Family.GetHashCode() ^ (Style.GetHashCode() * 3976061); } public static bool operator==(FontInfo a, FontInfo b) { return (a.Style == b.Style) && (a.Family == a.Family); } public static bool operator!=(FontInfo a, FontInfo b) { return (a.Style != b.Style) || (a.Family != b.Family); } public bool Equals(FontInfo other) { return this == other; } public override bool Equals(object obj) { return (obj.GetType() == typeof(FontInfo)) && this == (FontInfo)obj; } } }