Class BmFontResult
The result of a BMFont generation pipeline, containing the font model and atlas pages.
public sealed class BmFontResult
- Inheritance
-
BmFontResult
- Inherited Members
Properties
FailedCodepoints
Codepoints that were requested but could not be rasterized (missing from the font).
public IReadOnlyList<int> FailedCodepoints { get; }
Property Value
FntBinary
Returns the BMFont descriptor in binary format.
public byte[] FntBinary { get; }
Property Value
- byte[]
FntText
Returns the BMFont descriptor in text format.
public string FntText { get; }
Property Value
FntXml
Returns the BMFont descriptor in XML format.
public string FntXml { get; }
Property Value
Metrics
Pipeline timing metrics. Only populated when CollectMetrics is enabled.
public PipelineMetrics? Metrics { get; }
Property Value
Model
The BMFont descriptor model.
public BmFontModel Model { get; }
Property Value
Pages
The rendered atlas pages.
public IReadOnlyList<AtlasPage> Pages { get; }
Property Value
Methods
GetDdsData()
Encodes all atlas pages as DDS byte arrays.
public byte[][] GetDdsData()
Returns
- byte[][]
An array of DDS-encoded byte arrays, one per page.
GetDdsData(int)
Encodes a single atlas page as DDS bytes.
public byte[] GetDdsData(int pageIndex)
Parameters
pageIndexintZero-based page index.
Returns
- byte[]
DDS-encoded byte array for the specified page.
GetPngData()
Encodes all atlas pages as PNG byte arrays.
public byte[][] GetPngData()
Returns
- byte[][]
An array of PNG-encoded byte arrays, one per page.
GetPngData(int)
Encodes a single atlas page as PNG bytes.
public byte[] GetPngData(int pageIndex)
Parameters
pageIndexintZero-based page index.
Returns
- byte[]
PNG-encoded byte array for the specified page.
GetTgaData()
Encodes all atlas pages as TGA byte arrays.
public byte[][] GetTgaData()
Returns
- byte[][]
An array of TGA-encoded byte arrays, one per page.
GetTgaData(int)
Encodes a single atlas page as TGA bytes.
public byte[] GetTgaData(int pageIndex)
Parameters
pageIndexintZero-based page index.
Returns
- byte[]
TGA-encoded byte array for the specified page.
ToBinary()
Returns the BMFont descriptor in binary format.
public byte[] ToBinary()
Returns
- byte[]
ToBmfc()
Serializes this result's source options to a BMFont/AngelCode .bmfc config string.
Requires that this result was produced by a generation call (not loaded from disk).
See ToHiero() for the libGDX Hiero equivalent.
public string ToBmfc()
Returns
- string
The
.bmfcconfig file content.
Exceptions
- InvalidOperationException
Thrown when no source options are available.
ToFile(string, OutputFormat)
Writes the BMFont descriptor and atlas page images to disk.
public void ToFile(string outputPath, OutputFormat format = OutputFormat.Text)
Parameters
outputPathstringBase path without extension (e.g., "output/myfont").
formatOutputFormatThe output format for the .fnt file.
ToHiero()
Serializes this result's source options to a libGDX Hiero .hiero config string.
Requires that this result was produced by a generation call (not loaded from disk).
See ToBmfc() for the BMFont/AngelCode equivalent.
public string ToHiero()
Returns
- string
The
.hieroconfig file content.
Exceptions
- InvalidOperationException
Thrown when no source options are available.
ToString()
Returns the BMFont descriptor in text format.
public override string ToString()
Returns
ToXml()
Returns the BMFont descriptor in XML format.
public string ToXml()