• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.Fonts
      • ColorFontSupport
      • Font
      • FontCollection
      • FontDescription
      • FontFamily
      • FontFamilyCollectionExtensions
      • FontInstance
      • FontRectangle
      • FontStyle
      • Glyph
      • GlyphColor
      • GlyphInstance
      • GlyphMetric
      • GlyphRendererParameters
      • GlyphType
      • HorizontalAlignment
      • IColorGlyphRenderer
      • IFontCollection
      • IFontInstance
      • IGlyphRenderer
      • IGlyphRendererExtensions
      • IReadOnlyFontCollection
      • IReadonlyFontCollectionExtensions
      • RendererOptions
      • SystemFonts
      • TextMeasurer
      • TextRenderer
      • VerticalAlignment
    • SixLabors.Fonts.Exceptions
      • FontException
      • FontFamilyNotFoundException
      • GlyphMissingException
      • InvalidFontFileException
      • InvalidFontTableException
      • MissingFontTableException

    Class SystemFonts

    Provides a collection of fonts.

    Inheritance
    Object
    SystemFonts
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: SixLabors.Fonts
    Assembly: SixLabors.Fonts.dll
    Syntax
    public static class SystemFonts

    Properties

    | Improve this Doc View Source

    Collection

    Gets the collection containing the globaly installled system fonts.

    Declaration
    public static IReadOnlyFontCollection Collection { get; }
    Property Value
    Type Description
    IReadOnlyFontCollection

    The system fonts.

    | Improve this Doc View Source

    Families

    Gets the collection of FontFamilys installed on current system.

    Declaration
    public static IEnumerable<FontFamily> Families { get; }
    Property Value
    Type Description
    IEnumerable<FontFamily>

    The families.

    Methods

    | Improve this Doc View Source

    CreateFont(String, Single)

    Create a new instance of the Font for the named font family with regular styling.

    Declaration
    public static Font CreateFont(string fontFamily, float size)
    Parameters
    Type Name Description
    String fontFamily

    The family.

    Single size

    The size.

    Returns
    Type Description
    Font

    Returns instance of the Font from the current collection.

    | Improve this Doc View Source

    CreateFont(String, Single, FontStyle)

    Create a new instance of the Font for the named font family.

    Declaration
    public static Font CreateFont(string fontFamily, float size, FontStyle style)
    Parameters
    Type Name Description
    String fontFamily

    The family.

    Single size

    The size.

    FontStyle style

    The style.

    Returns
    Type Description
    Font

    Returns instance of the Font from the current collection.

    | Improve this Doc View Source

    FamiliesByCulture(CultureInfo)

    Gets the collection of FontFamily objects associated with this FontCollection in the current threads culture.

    Declaration
    public static IEnumerable<FontFamily> FamiliesByCulture(CultureInfo culture)
    Parameters
    Type Name Description
    CultureInfo culture

    The culture to find the list of font familes for.

    Returns
    Type Description
    IEnumerable<FontFamily>

    The set of fonts families using the fonts culture aware font name

    | Improve this Doc View Source

    Find(String)

    Finds the specified font family from the system font store.

    Declaration
    public static FontFamily Find(string fontFamily)
    Parameters
    Type Name Description
    String fontFamily

    The font family.

    Returns
    Type Description
    FontFamily

    The found family.

    Exceptions
    Type Condition
    FontFamilyNotFoundException

    Thrown when the font family is not found.

    | Improve this Doc View Source

    Find(String, CultureInfo)

    Finds the specified font family.

    Declaration
    public static FontFamily Find(string fontFamily, CultureInfo culture)
    Parameters
    Type Name Description
    String fontFamily

    The font family.

    CultureInfo culture

    The culture to find the font from of font family for.

    Returns
    Type Description
    FontFamily

    The family if installed otherwise throws FontFamilyNotFoundException

    | Improve this Doc View Source

    TryFind(String, out FontFamily)

    Finds the specified font family from the system font store.

    Declaration
    public static bool TryFind(string fontFamily, out FontFamily family)
    Parameters
    Type Name Description
    String fontFamily

    The font family to find.

    FontFamily family

    The found family.

    Returns
    Type Description
    Boolean

    True if a font of that family has been installed into the font collection.

    | Improve this Doc View Source

    TryFind(String, CultureInfo, out FontFamily)

    Finds the specified font family.

    Declaration
    public static bool TryFind(string fontFamily, CultureInfo culture, out FontFamily family)
    Parameters
    Type Name Description
    String fontFamily

    The font family to find.

    CultureInfo culture

    The culture to find the font from of font family for.

    FontFamily family

    The found family.

    Returns
    Type Description
    Boolean

    true if a font of that family has been installed into the font collection.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX