• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Inferno
    • CollisionMode
    • DrawMode
    • Game
    • Game.OnResizeEventArgs
    • GameState
    • GameState.StateOnDrawEventArgs
    • GameWindow
    • Instance
    • MathHelper
    • Matrix
    • Point
    • Rectangle
    • Settings
    • SpatialMode
    • UpdateMode
    • Vector2
    • Vector3
    • Vector4
  • Inferno.Audio
    • AudioDevice
    • Sound
  • Inferno.Content
    • ContentLoader
  • Inferno.Formats.Audio
    • WaveFormat
  • Inferno.Formats.Graphics.Text
    • FontFormat
  • Inferno.Graphics
    • Camera
    • Color
    • GraphicsDevice
    • PlatformType
    • Renderable
    • RenderableType
    • Renderer
    • RenderSortMode
    • RenderTarget
    • Shader
    • ShaderLanguage
    • ShaderType
    • Sprite
    • Texture2D
    • Tileset
  • Inferno.Graphics.Text
    • Font
    • FontBuilder
  • Inferno.Input
    • ButtonState
    • Key
    • Keyboard
    • Keyboard.KeyEventArgs
    • KeyboardState
    • KeyState
    • Mouse
    • MouseState
  • Inferno.Tiled
    • RenderOrder
    • TiledLayer
    • TiledLayerChunk
    • TiledLoader
    • TiledMap
    • TiledMapOrientation
    • TiledObject
    • TiledObjectLayer
    • TiledVersion
  • Inferno.UI
    • MessageBox
    • MessageBoxType
    • UserInterface
  • Inferno.UI.Controls
    • Button
    • Control
    • Control.ControlClickedEvent
    • Control.ControlHoveredEvent
    • Control.TextChangedEventArgs
    • ControlState
    • Cursor
    • Label

Class Font

A Text Font

Inheritance
System.Object
Font
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Inferno.Graphics.Text
Assembly: Inferno.Desktop.dll
Syntax
public class Font : IDisposable

Fields

| Improve this Doc View Source

CharMap

Declaration
public List<Vector4> CharMap
Field Value
Type Description
System.Collections.Generic.List<Vector4>
| Improve this Doc View Source

LineHeight

The amount of pixels between each line of text

Declaration
public int LineHeight
Field Value
Type Description
System.Int32
| Improve this Doc View Source

SpaceSize

The number of pixels for a space character

Declaration
public int SpaceSize
Field Value
Type Description
System.Int32
| Improve this Doc View Source

Texture

This is the texture containing all the glyphs

Declaration
public Texture2D Texture
Field Value
Type Description
Texture2D

Methods

| Improve this Doc View Source

CreateFont(String, Int32, Boolean)

Create an Inferno font from a system font

Declaration
[Obsolete("This will be removed once we fully remove FontBuilder from the core engine.")]
public static Font CreateFont(string fontname, int ptSize = 12, bool antialiasing = true)
Parameters
Type Name Description
System.String fontname
System.Int32 ptSize
System.Boolean antialiasing
Returns
Type Description
Font
| Improve this Doc View Source

CreateFontFromFile(String, Int32, Boolean)

Create an Inferno font from a font file

Declaration
public static Font CreateFontFromFile(string filename, int ptSize = 12, bool antialiasing = true)
Parameters
Type Name Description
System.String filename
System.Int32 ptSize
System.Boolean antialiasing
Returns
Type Description
Font
| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

FromFontFormat(FontFormat)

Declaration
public static Font FromFontFormat(FontFormat fontFormat)
Parameters
Type Name Description
FontFormat fontFormat
Returns
Type Description
Font
| Improve this Doc View Source

MeasureString(String)

Measure how big a string would be in this font

Declaration
public Vector2 MeasureString(string text)
Parameters
Type Name Description
System.String text
Returns
Type Description
Vector2

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX