• 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 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 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.

    | 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.

    FontStyle style

    The 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 family.

    Single size

    The size.

    | 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 family.

    Single size

    The size.

    FontStyle style

    The style.

    Properties

    | Improve this Doc View Source

    Ascender

    Gets the ascender (from the OS/2 table field TypoAscender).

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

    Bold

    Gets a value indicating whether this Font is bold.

    Declaration
    public bool Bold { get; }
    Property Value
    Type Description
    Boolean

    true if bold; otherwise, false.

    | Improve this Doc View Source

    Descender

    Gets the descender (from the OS/2 table field TypoDescender).

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

    EmSize

    Gets the size of the em.

    Declaration
    public ushort EmSize { get; }
    Property Value
    Type Description
    UInt16

    The size of the em.

    | Improve this Doc View Source

    Family

    Gets the family.

    Declaration
    public FontFamily Family { get; }
    Property Value
    Type Description
    FontFamily

    The family.

    | Improve this Doc View Source

    Instance

    Gets the font instance.

    Declaration
    public IFontInstance Instance { get; }
    Property Value
    Type Description
    IFontInstance

    The font instance.

    | Improve this Doc View Source

    Italic

    Gets a value indicating whether this Font is italic.

    Declaration
    public bool Italic { get; }
    Property Value
    Type Description
    Boolean

    true if italic; otherwise, false.

    | Improve this Doc View Source

    LineGap

    Gets the line gap (from the OS/2 table field TypoLineGap).

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

    LineHeight

    Gets the line height.

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

    Name

    Gets the name.

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

    The name.

    | Improve this Doc View Source

    Size

    Gets the size.

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

    The size.

    Methods

    | Improve this Doc View Source

    GetGlyph(Int32)

    Gets the glyph.

    Declaration
    public Glyph GetGlyph(int codePoint)
    Parameters
    Type Name Description
    Int32 codePoint

    The code point of the character.

    Returns
    Type Description
    Glyph

    Returns the glyph

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