• 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

    Struct FontFamily

    Defines a group of type faces having a similar basic design and certain variations in styles.

    Implements
    IEquatable<FontFamily>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: SixLabors.Fonts
    Assembly: SixLabors.Fonts.dll
    Syntax
    public struct FontFamily : IEquatable<FontFamily>

    Properties

    | Edit this page View Source

    Culture

    Gets the culture this instance was extracted against.

    Declaration
    public readonly CultureInfo Culture { get; }
    Property Value
    Type Description
    CultureInfo
    | Edit this page View Source

    Name

    Gets the name.

    Declaration
    public readonly string Name { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    CreateFont(float)

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

    Declaration
    public readonly Font CreateFont(float size)
    Parameters
    Type Name Description
    float size

    The size of the font in PT units.

    Returns
    Type Description
    Font

    The new Font.

    | Edit this page View Source

    CreateFont(float, FontStyle)

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

    Declaration
    public readonly Font CreateFont(float size, FontStyle style)
    Parameters
    Type Name Description
    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

    Equals(FontFamily)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public readonly bool Equals(FontFamily other)
    Parameters
    Type Name Description
    FontFamily other

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to the other parameter; otherwise, false.

    | Edit this page View Source

    Equals(object?)

    Indicates whether this instance and a specified object are equal.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    true if obj and this instance are the same type and represent the same value; otherwise, false.

    Overrides
    ValueType.Equals(object)
    | Edit this page View Source

    GetAvailableStyles()

    Gets the collection of FontStyle that are currently available.

    Declaration
    public readonly IEnumerable<FontStyle> GetAvailableStyles()
    Returns
    Type Description
    IEnumerable<FontStyle>

    The IEnumerable<T>.

    | Edit this page View Source

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    int

    A 32-bit signed integer that is the hash code for this instance.

    Overrides
    ValueType.GetHashCode()
    | Edit this page View Source

    ToString()

    Returns the fully qualified type name of this instance.

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    string

    The fully qualified type name.

    Overrides
    ValueType.ToString()
    | Edit this page View Source

    TryGetMetrics(FontStyle, out FontMetrics?)

    Gets the specified font metrics matching the given font style.

    Declaration
    public readonly bool TryGetMetrics(FontStyle style, out FontMetrics? metrics)
    Parameters
    Type Name Description
    FontStyle style

    The font style to use when searching for a match.

    FontMetrics metrics

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

    Returns
    Type Description
    bool

    true if the FontFamily contains font metrics with the specified name; otherwise, false.

    | Edit this page View Source

    TryGetPaths(out IEnumerable<string>)

    Gets the collection of filesystem paths to the font family sources.

    Declaration
    public bool TryGetPaths(out IEnumerable<string> paths)
    Parameters
    Type Name Description
    IEnumerable<string> paths

    When this method returns, contains the filesystem paths to the font family sources, if the path exists; otherwise, an empty value for the type of the paths parameter. This parameter is passed uninitialized.

    Returns
    Type Description
    bool

    true if the FontFamily was created via filesystem paths; otherwise, false.

    Operators

    | Edit this page View Source

    operator ==(FontFamily, FontFamily)

    Compares two FontFamily objects for equality.

    Declaration
    public static bool operator ==(FontFamily left, FontFamily right)
    Parameters
    Type Name Description
    FontFamily left

    The FontFamily on the left side of the operand.

    FontFamily right

    The FontFamily on the right side of the operand.

    Returns
    Type Description
    bool

    true if the current left is equal to the right parameter; otherwise, false.

    | Edit this page View Source

    operator !=(FontFamily, FontFamily)

    Compares two FontFamily objects for inequality.

    Declaration
    public static bool operator !=(FontFamily left, FontFamily right)
    Parameters
    Type Name Description
    FontFamily left

    The FontFamily on the left side of the operand.

    FontFamily right

    The FontFamily on the right side of the operand.

    Returns
    Type Description
    bool

    true if the current left is unequal to the right parameter; otherwise, false.

    Implements

    IEquatable<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX