Table of Contents

Class FontCode

Namespace
MLEM.Formatting.Codes
Assembly
MLEM.dll

An instance of a formatting code that can be used for a TextFormatter. To add a new formatting code, see Codes

public class FontCode : Code, IGenericDataHolder
Inheritance
FontCode
Implements
Inherited Members

Constructors

FontCode(Match, Regex, Func<GenericFont, GenericFont>)

public FontCode(Match match, Regex regex, Func<GenericFont, GenericFont> font)

Parameters

match Match
regex Regex
font Func<GenericFont, GenericFont>

Methods

EndsHere(Code)

Returns whether this formatting code should end when the passed formatting code starts. If this method returns true, a new Token is started at its position. This is the opposite version of EndsOther(Code).

public override bool EndsHere(Code other)

Parameters

other Code

The code that is started here.

Returns

bool

If this code should end here.

GetFont(GenericFont)

Get the font that this token will be rendered with

public override GenericFont GetFont(GenericFont defaultPick)

Parameters

defaultPick GenericFont

The default font, if none is specified

Returns

GenericFont

The font to render with