using System.Collections.Generic; using System.Globalization; namespace Robust.Client.Graphics; /// /// Provides access to fonts installed on the user's operating system. /// /// /// /// Different operating systems ship different fonts, so you should generally not rely on any one /// specific font being available. This system is primarily provided for allowing user preference. /// /// /// [NotContentImplementable] public interface ISystemFontManager { /// /// Whether access to system fonts is currently supported on this platform. /// bool IsSupported { get; } /// /// The list of font face available from the operating system. /// IEnumerable SystemFontFaces { get; } } /// /// A single font face, provided by the user's operating system. /// /// [NotContentImplementable] public interface ISystemFontFace { /// /// The PostScript name of the font face. /// This is generally the closest to an unambiguous unique identifier as you're going to get. /// /// /// /// For example, "Arial-ItalicMT" /// /// string PostscriptName { get; } /// /// The full name of the font face, localized to the current locale. /// /// /// /// For example, "Arial Cursiva" /// /// /// string FullName { get; } /// /// The family name of the font face, localized to the current locale. /// /// /// /// For example, "Arial" /// /// /// string FamilyName { get; } /// /// The face name (or "style name") of the font face, localized to the current locale. /// /// /// /// For example, "Cursiva" /// /// /// string FaceName { get; } /// /// Get the , localized to a specific locale. /// /// The locale to fetch the localized string for. string GetLocalizedFullName(CultureInfo culture); /// /// Get the , localized to a specific locale. /// /// The locale to fetch the localized string for. string GetLocalizedFamilyName(CultureInfo culture); /// /// Get the , localized to a specific locale. /// /// The locale to fetch the localized string for. string GetLocalizedFaceName(CultureInfo culture); /// /// The weight of the font face. /// FontWeight Weight { get; } /// /// The slant of the font face. /// FontSlant Slant { get; } /// /// The width of the font face. /// FontWidth Width { get; } /// /// Load the font face so that it can be used in-engine. /// /// The size to load the font at. /// A font object that can be used to render text. Font Load(int size); } /// /// Engine-internal API for . /// internal interface ISystemFontManagerInternal : ISystemFontManager { void Initialize(); void Shutdown(); }