MuGameFramework  1.0
MuGameFramework is a 2D game framework built upon C# and SFML
 All Classes Namespaces Files Functions Variables Enumerations Properties
MuGameFramework.Graphics.Font Class Reference

Representing a font in memory for use for drawing text on screen More...

Inheritance diagram for MuGameFramework.Graphics.Font:
MuGameFramework.IContent

Public Member Functions

int GetKerning (uint first, uint second, uint characterSize)
 Get the kerning offset of two glyphs
int GetLineSpacing (uint characterSize)
 Get the line spacing. Vertical offset to apply between two consecutive lines of text
Texture2D GetTexture (uint characterSize)
 Retrieve the texture containing the loaded glyphs of a certain size.
Size MeasureString (string toMeasure, uint fontSize=30)
 Measure a string using this font type
void Dispose ()
 Used to explicitly free all resources currently in use by this object before destruction
bool IsDisposed ()
 Is this Font disposed?
- Public Member Functions inherited from MuGameFramework.IContent
void LoadContent (string fileToLoad)
 Load a file into this object (if file is not already loaded into it)

Static Public Attributes

static readonly Font DefaultFont = new Font(SFMLFont.DefaultFont)
 Get the default font for basic text rendering
static readonly uint DefaultSize = 30
 Default size at which the strings are drawn at

Protected Member Functions

virtual void Dispose (bool disposing)
 Dispose any and all objects, either managed or unmanaged at the end of this objects lifespan

Properties

bool Disposed [get, set]
 Is this Texture disposed?

Detailed Description

Representing a font in memory for use for drawing text on screen

Member Function Documentation

virtual void MuGameFramework.Graphics.Font.Dispose ( bool  disposing)
protectedvirtual

Dispose any and all objects, either managed or unmanaged at the end of this objects lifespan

Parameters
disposingDispose of Managed objects?
void MuGameFramework.Graphics.Font.Dispose ( )

Used to explicitly free all resources currently in use by this object before destruction

int MuGameFramework.Graphics.Font.GetKerning ( uint  first,
uint  second,
uint  characterSize 
)

Get the kerning offset of two glyphs

Parameters
firstUnicode code point of the first character
secondUnicode code point of the second character
characterSizeReference character size
Returns
Kerning of the characters
int MuGameFramework.Graphics.Font.GetLineSpacing ( uint  characterSize)

Get the line spacing. Vertical offset to apply between two consecutive lines of text

Parameters
characterSizeReference character size
Returns
Reference character size
Texture2D MuGameFramework.Graphics.Font.GetTexture ( uint  characterSize)

Retrieve the texture containing the loaded glyphs of a certain size.

Parameters
characterSize
Returns
bool MuGameFramework.Graphics.Font.IsDisposed ( )

Is this Font disposed?

Returns
Is this Font disposed?

Implements MuGameFramework.IContent.

Size MuGameFramework.Graphics.Font.MeasureString ( string  toMeasure,
uint  fontSize = 30 
)

Measure a string using this font type

Parameters
toMeasureString to measure
fontSizeSize of the font
Returns
Size of the string

Member Data Documentation

readonly Font MuGameFramework.Graphics.Font.DefaultFont = new Font(SFMLFont.DefaultFont)
static

Get the default font for basic text rendering

readonly uint MuGameFramework.Graphics.Font.DefaultSize = 30
static

Default size at which the strings are drawn at

Property Documentation

bool MuGameFramework.Graphics.Font.Disposed
getset

Is this Texture disposed?


The documentation for this class was generated from the following file: