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

    Represents a font face with metrics, which is a set of glyphs with a specific style (regular, italic, bold etc).

    Inheritance
    Object
    FontMetrics
    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 abstract class FontMetrics

    Properties

    | Improve this Doc View Source

    AdvanceHeightMax

    Gets the maximum advance height, in font units, for all glyphs in this face.This is only relevant for vertical layouts, and is set to LineHeight for fonts that do not provide vertical metrics.

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

    AdvanceWidthMax

    Gets the maximum advance width, in font units, for all glyphs in this face.

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

    Ascender

    Gets the typographic ascender of the face, expressed in font units.

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

    Descender

    Gets the typographic descender of the face, expressed in font units.

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

    Description

    Gets the basic description of the face.

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

    ItalicAngle

    Gets the italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).

    Declaration
    public abstract float ItalicAngle { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    LineGap

    Gets the typographic line gap of the face, expressed in font units. This field should be combined with the Ascender and Descender values to determine default line spacing.

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

    LineHeight

    Gets the typographic line spacing of the face, expressed in font units.

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

    ScaleFactor

    Gets the scale factor that is applied to all glyphs in this face. Calculated as 72 * UnitsPerEm so that 1pt = 1px.

    Declaration
    public abstract float ScaleFactor { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    StrikeoutPosition

    Gets the position of the top of the strikeout stroke relative to the baseline in font design units.

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

    StrikeoutSize

    Gets thickness of the strikeout stroke in font design units.

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

    SubscriptXOffset

    Gets the recommended horizontal offset in font design units for subscripts for this font.

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

    SubscriptXSize

    Gets the recommended horizontal size in font design units for subscripts for this font.

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

    SubscriptYOffset

    Gets the recommended vertical offset in font design units for subscripts for this font.

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

    SubscriptYSize

    Gets the recommended vertical size in font design units for subscripts for this font.

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

    SuperscriptXOffset

    Gets the recommended horizontal offset in font design units for superscripts for this font.

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

    SuperscriptXSize

    Gets the recommended horizontal size in font design units for superscripts for this font.

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

    SuperscriptYOffset

    Gets the recommended vertical offset in font design units for superscripts for this font.

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

    SuperscriptYSize

    Gets the recommended vertical size in font design units for superscripts for this font.

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

    UnderlinePosition

    Gets the suggested distance of the top of the underline from the baseline (negative values indicate below baseline).

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

    UnderlineThickness

    Gets the suggested values for the underline thickness. In general, the underline thickness should match the thickness of the underscore character (U+005F LOW LINE), and should also match the strikeout thickness, which is specified in the OS/2 table.

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

    UnitsPerEm

    Gets the number of font units per EM square for this face.

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

    Methods

    | Improve this Doc View Source

    GetGlyphMetrics(CodePoint, ColorFontSupport)

    Gets the glyph metrics for a given code point.

    Declaration
    public abstract IEnumerable<GlyphMetrics> GetGlyphMetrics(CodePoint codePoint, ColorFontSupport support)
    Parameters
    Type Name Description
    CodePoint codePoint

    The Unicode code point to get the glyph for.

    ColorFontSupport support

    Options for enabling color font support during layout and rendering.

    Returns
    Type Description
    IEnumerable<GlyphMetrics>

    The glyph metrics to find.

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