Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    FontSystem Class

    Namespace: Stride.Graphics.Font
    Assembly: Stride.Graphics.dll

    The system managing the fonts.

    System.Object → FontSystem
    Derived from FontSystem:

    public class FontSystem : IFontFactory
    Name Description
    Constructors
    FontSystem()

    Create a new instance of FontSystem base on the provided Stride.Graphics.Font.FontSystem.GraphicsDevice.

    Methods
    Draw()
    Load(GraphicsDevice, IDatabaseFileProviderService)

    Load this system.

    NewDynamic(Single, String, FontStyle, FontAntiAliasMode, Boolean, Single, Single, Char)
    NewScalable(Single, IList<Glyph>, IList<Image>, Single, Single, IList<Kerning>, Single, Single, Char)
    NewScalable(Single, IList<Glyph>, IList<Texture>, Single, Single, IList<Kerning>, Single, Single, Char)
    NewStatic(Single, IList<Glyph>, IList<Image>, Single, Single, IList<Kerning>, Single, Single, Char)
    NewStatic(Single, IList<Glyph>, IList<Texture>, Single, Single, IList<Kerning>, Single, Single, Char)
    Unload()
    | Improve this Doc View Source

    Constructors


    FontSystem()

    Create a new instance of FontSystem base on the provided Stride.Graphics.Font.FontSystem.GraphicsDevice.

    public FontSystem()
    | Improve this Doc View Source

    Methods


    Draw()

    public void Draw()

    Load(GraphicsDevice, IDatabaseFileProviderService)

    Load this system.

    public void Load(GraphicsDevice graphicsDevice, IDatabaseFileProviderService fileProviderService)
    Parameters
    Type Name Description
    GraphicsDevice graphicsDevice

    The graphics device.

    IDatabaseFileProviderService fileProviderService
    Exceptions
    Type Condition
    System.ArgumentNullException

    graphicsDevice


    NewDynamic(Single, String, FontStyle, FontAntiAliasMode, Boolean, Single, Single, Char)

    public SpriteFont NewDynamic(float defaultSize, string fontName, FontStyle style, FontAntiAliasMode antiAliasMode = FontAntiAliasMode.Default, bool useKerning = false, float extraSpacing = 0F, float extraLineSpacing = 0F, char defaultCharacter = ' ')
    Parameters
    Type Name Description
    System.Single defaultSize
    System.String fontName
    FontStyle style
    FontAntiAliasMode antiAliasMode
    System.Boolean useKerning
    System.Single extraSpacing
    System.Single extraLineSpacing
    System.Char defaultCharacter
    Returns
    Type Description
    SpriteFont

    NewScalable(Single, IList<Glyph>, IList<Image>, Single, Single, IList<Kerning>, Single, Single, Char)

    public SpriteFont NewScalable(float size, IList<Glyph> glyphs, IList<Image> images, float baseOffset, float defaultLineSpacing, IList<Kerning> kernings = null, float extraSpacing = 0F, float extraLineSpacing = 0F, char defaultCharacter = ' ')
    Parameters
    Type Name Description
    System.Single size
    System.Collections.Generic.IList<Glyph> glyphs
    System.Collections.Generic.IList<Image> images
    System.Single baseOffset
    System.Single defaultLineSpacing
    System.Collections.Generic.IList<Kerning> kernings
    System.Single extraSpacing
    System.Single extraLineSpacing
    System.Char defaultCharacter
    Returns
    Type Description
    SpriteFont

    NewScalable(Single, IList<Glyph>, IList<Texture>, Single, Single, IList<Kerning>, Single, Single, Char)

    public SpriteFont NewScalable(float size, IList<Glyph> glyphs, IList<Texture> textures, float baseOffset, float defaultLineSpacing, IList<Kerning> kernings = null, float extraSpacing = 0F, float extraLineSpacing = 0F, char defaultCharacter = ' ')
    Parameters
    Type Name Description
    System.Single size
    System.Collections.Generic.IList<Glyph> glyphs
    System.Collections.Generic.IList<Texture> textures
    System.Single baseOffset
    System.Single defaultLineSpacing
    System.Collections.Generic.IList<Kerning> kernings
    System.Single extraSpacing
    System.Single extraLineSpacing
    System.Char defaultCharacter
    Returns
    Type Description
    SpriteFont

    NewStatic(Single, IList<Glyph>, IList<Image>, Single, Single, IList<Kerning>, Single, Single, Char)

    public SpriteFont NewStatic(float size, IList<Glyph> glyphs, IList<Image> images, float baseOffset, float defaultLineSpacing, IList<Kerning> kernings = null, float extraSpacing = 0F, float extraLineSpacing = 0F, char defaultCharacter = ' ')
    Parameters
    Type Name Description
    System.Single size
    System.Collections.Generic.IList<Glyph> glyphs
    System.Collections.Generic.IList<Image> images
    System.Single baseOffset
    System.Single defaultLineSpacing
    System.Collections.Generic.IList<Kerning> kernings
    System.Single extraSpacing
    System.Single extraLineSpacing
    System.Char defaultCharacter
    Returns
    Type Description
    SpriteFont

    NewStatic(Single, IList<Glyph>, IList<Texture>, Single, Single, IList<Kerning>, Single, Single, Char)

    public SpriteFont NewStatic(float size, IList<Glyph> glyphs, IList<Texture> textures, float baseOffset, float defaultLineSpacing, IList<Kerning> kernings = null, float extraSpacing = 0F, float extraLineSpacing = 0F, char defaultCharacter = ' ')
    Parameters
    Type Name Description
    System.Single size
    System.Collections.Generic.IList<Glyph> glyphs
    System.Collections.Generic.IList<Texture> textures
    System.Single baseOffset
    System.Single defaultLineSpacing
    System.Collections.Generic.IList<Kerning> kernings
    System.Single extraSpacing
    System.Single extraLineSpacing
    System.Char defaultCharacter
    Returns
    Type Description
    SpriteFont

    Unload()

    public void Unload()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation