• 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
      • GlyphMetrics
      • GlyphMissingException
      • GlyphRendererParameters
      • GlyphType
      • HintingMode
      • HorizontalAlignment
      • IColorGlyphRenderer
      • IFontCollection
      • IGlyphDecorationRenderer
      • IGlyphRenderer
      • IGlyphRendererExtensions
      • InvalidFontFileException
      • InvalidFontTableException
      • IReadOnlyFontCollection
      • IReadOnlySystemFontCollection
      • KerningMode
      • LayoutMode
      • MissingFontTableException
      • SystemFonts
      • TextAlignment
      • TextAttributes
      • TextDecorations
      • TextDirection
      • TextJustification
      • TextMeasurer
      • TextOptions
      • TextRenderer
      • TextRun
      • VerticalAlignment
      • WordBreaking
    • SixLabors.Fonts.Tables.AdvancedTypographic
      • FeatureTags
      • GlyphClassDef
      • Tag
    • SixLabors.Fonts.Tables.TrueType
      • TrueTypeGlyphMetrics
    • SixLabors.Fonts.Tables.TrueType.Glyphs
      • GlyphOutline
    • SixLabors.Fonts.Unicode
      • BidiCharacterType
      • BidiClass
      • BidiPairedBracketType
      • CodePoint
      • GraphemeClusterClass
      • JoiningClass
      • JoiningGroup
      • JoiningType
      • LineBreakClass
      • MemoryExtensions
      • ScriptClass
      • SpanCodePointEnumerator
      • SpanGraphemeEnumerator
    • SixLabors.Fonts.WellKnownIds
      • KnownNameIds

    Class Font

    Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.

    Inheritance
    Object
    Font
    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 sealed class Font

    Constructors

    | Improve this Doc View Source

    Font(Font, FontStyle)

    Initializes a new instance of the Font class.

    Declaration
    public Font(Font prototype, FontStyle style)
    Parameters
    Type Name Description
    Font prototype

    The prototype.

    FontStyle style

    The font style.

    | Improve this Doc View Source

    Font(Font, Single)

    Initializes a new instance of the Font class.

    Declaration
    public Font(Font prototype, float size)
    Parameters
    Type Name Description
    Font prototype

    The prototype.

    Single size

    The size of the font in PT units.

    | Improve this Doc View Source

    Font(Font, Single, FontStyle)

    Initializes a new instance of the Font class.

    Declaration
    public Font(Font prototype, float size, FontStyle style)
    Parameters
    Type Name Description
    Font prototype

    The prototype.

    Single size

    The size of the font in PT units.

    FontStyle style

    The font style.

    | Improve this Doc View Source

    Font(FontFamily, Single)

    Initializes a new instance of the Font class.

    Declaration
    public Font(FontFamily family, float size)
    Parameters
    Type Name Description
    FontFamily family

    The font family.

    Single size

    The size of the font in PT units.

    | Improve this Doc View Source

    Font(FontFamily, Single, FontStyle)

    Initializes a new instance of the Font class.

    Declaration
    public Font(FontFamily family, float size, FontStyle style)
    Parameters
    Type Name Description
    FontFamily family

    The font family.

    Single size

    The size of the font in PT units.

    FontStyle style

    The font style.

    Properties

    | Improve this Doc View Source

    Family

    Gets the family.

    Declaration
    public FontFamily Family { get; }
    Property Value
    Type Description
    FontFamily
    | Improve this Doc View Source

    FontMetrics

    Gets the font metrics.

    Declaration
    public FontMetrics FontMetrics { get; }
    Property Value
    Type Description
    FontMetrics
    | Improve this Doc View Source

    IsBold

    Gets a value indicating whether this Font is bold.

    Declaration
    public bool IsBold { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsItalic

    Gets a value indicating whether this Font is italic.

    Declaration
    public bool IsItalic { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Name

    Gets the name.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Size

    Gets the size of the font in PT units.

    Declaration
    public float Size { get; }
    Property Value
    Type Description
    Single

    Methods

    | Improve this Doc View Source

    GetGlyphs(CodePoint, ColorFontSupport)

    Gets the glyphs for the given codepoint.

    Declaration
    public IEnumerable<Glyph> GetGlyphs(CodePoint codePoint, ColorFontSupport support)
    Parameters
    Type Name Description
    CodePoint codePoint

    The code point of the character.

    ColorFontSupport support

    Options for enabling color font support during layout and rendering.

    Returns
    Type Description
    IEnumerable<Glyph>

    Returns the glyph

    | Improve this Doc View Source

    GetGlyphs(CodePoint, TextAttributes, ColorFontSupport)

    Gets the glyphs for the given codepoint.

    Declaration
    public IEnumerable<Glyph> GetGlyphs(CodePoint codePoint, TextAttributes textAttributes, ColorFontSupport support)
    Parameters
    Type Name Description
    CodePoint codePoint

    The code point of the character.

    TextAttributes textAttributes

    The text attributes to apply to the glyphs.

    ColorFontSupport support

    Options for enabling color font support during layout and rendering.

    Returns
    Type Description
    IEnumerable<Glyph>

    Returns the glyph

    | Improve this Doc View Source

    TryGetPath(out String)

    Gets the filesystem path to the font family source.

    Declaration
    public bool TryGetPath(out string path)
    Parameters
    Type Name Description
    String path

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

    Returns
    Type Description
    Boolean

    true if the Font was created via a filesystem path; otherwise, false.

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