• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.Fonts
      • ColorFontSupport
      • Font
      • FontCollection
      • FontCollectionExtensions
      • FontDescription
      • FontException
      • FontFamily
      • FontFamilyNotFoundException
      • FontMetrics
      • FontRectangle
      • FontStyle
      • Glyph
      • GlyphBounds
      • GlyphColor
      • GlyphLayoutMode
      • GlyphMetrics
      • GlyphMissingException
      • GlyphRendererParameters
      • GlyphType
      • HintingMode
      • HorizontalAlignment
      • HorizontalMetrics
      • IColorGlyphRenderer
      • IFontCollection
      • IGlyphRenderer
      • IGlyphRendererExtensions
      • IMetricsHeader
      • IReadOnlyFontCollection
      • IReadOnlySystemFontCollection
      • InvalidFontFileException
      • InvalidFontTableException
      • KerningMode
      • LayoutMode
      • LayoutModeExtensions
      • MissingFontTableException
      • SystemFonts
      • TextAlignment
      • TextAttributes
      • TextDecorations
      • TextDirection
      • TextJustification
      • TextMeasurer
      • TextOptions
      • TextRenderer
      • TextRun
      • VerticalAlignment
      • VerticalMetrics
      • WordBreaking
    • SixLabors.Fonts.Tables.AdvancedTypographic
      • FeatureTags
      • GlyphClassDef
      • Tag
    • SixLabors.Fonts.Tables.TrueType
      • TrueTypeGlyphMetrics
    • SixLabors.Fonts.Unicode
      • ArabicJoiningClass
      • ArabicJoiningGroup
      • ArabicJoiningType
      • BidiCharacterType
      • BidiClass
      • BidiPairedBracketType
      • CodePoint
      • GraphemeClusterClass
      • IndicPositionalCategory
      • IndicSyllabicCategory
      • LineBreakClass
      • MemoryExtensions
      • ScriptClass
      • SpanCodePointEnumerator
      • SpanGraphemeEnumerator
      • VerticalOrientationType
    • SixLabors.Fonts.WellKnownIds
      • KnownNameIds

    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

    | Edit this page View Source

    Collection

    Gets the collection containing the globally installed system fonts.

    Declaration
    public static IReadOnlySystemFontCollection Collection { get; }
    Property Value
    Type Description
    IReadOnlySystemFontCollection
    | Edit this page 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>

    Methods

    | Edit this page View Source

    CreateFont(string, CultureInfo, float)

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

    Declaration
    public static Font CreateFont(string name, CultureInfo culture, float size)
    Parameters
    Type Name Description
    string name

    The font family name.

    CultureInfo culture

    The font culture.

    float size

    The size of the font in PT units.

    Returns
    Type Description
    Font

    The new Font.

    | Edit this page View Source

    CreateFont(string, CultureInfo, float, FontStyle)

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

    Declaration
    public static Font CreateFont(string name, CultureInfo culture, float size, FontStyle style)
    Parameters
    Type Name Description
    string name

    The font family name.

    CultureInfo culture

    The font culture.

    float size

    The size of the font in PT units.

    FontStyle style

    The font style.

    Returns
    Type Description
    Font

    The new Font.

    | Edit this page View Source

    CreateFont(string, float)

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

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

    The font family name.

    float size

    The size of the font in PT units.

    Returns
    Type Description
    Font

    The new Font.

    | Edit this page View Source

    CreateFont(string, float, FontStyle)

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

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

    The font family name.

    float size

    The size of the font in PT units.

    FontStyle style

    The font style.

    Returns
    Type Description
    Font

    The new Font.

    | Edit this page View Source

    Get(string)

    Gets the specified font family matching the invariant culture and font family name.

    Declaration
    public static FontFamily Get(string name)
    Parameters
    Type Name Description
    string name

    The font family name.

    Returns
    Type Description
    FontFamily

    The first FontFamily matching the given name.

    Exceptions
    Type Condition
    ArgumentNullException

    name is null

    FontFamilyNotFoundException

    The collection contains no matches.

    | Edit this page View Source

    Get(string, CultureInfo)

    Gets the specified font family matching the given culture and font family name.

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

    The culture to use when searching for a match.

    Returns
    Type Description
    FontFamily

    The first FontFamily matching the given name.

    Exceptions
    Type Condition
    ArgumentNullException

    name is null

    FontFamilyNotFoundException

    The collection contains no matches.

    | Edit this page View Source

    GetByCulture(CultureInfo)

    Gets the collection of FontFamily in this FontCollection using the given culture.

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

    The culture of the families to return.

    Returns
    Type Description
    IEnumerable<FontFamily>

    The IEnumerable<T>.

    | Edit this page View Source

    TryGet(string, out FontFamily)

    Gets the specified font family matching the invariant culture and font family name.

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

    When this method returns, contains the family associated with the specified name, if the name is found; otherwise, the default value for the type of the family parameter. This parameter is passed uninitialized.

    Returns
    Type Description
    bool

    true if the IReadOnlyFontCollection contains a family with the specified name; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    name is null

    | Edit this page View Source

    TryGet(string, CultureInfo, out FontFamily)

    Gets the specified font family matching the given culture and font family name.

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

    The culture to use when searching for a match.

    FontFamily family

    When this method returns, contains the family associated with the specified name, if the name is found; otherwise, the default value for the type of the family parameter. This parameter is passed uninitialized.

    Returns
    Type Description
    bool

    true if the IReadOnlyFontCollection contains a family with the specified name; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    name is null

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX