Table of Contents

Class BmfcConfig

Namespace
KernSmith
Assembly
KernSmith.dll

Holds the result of reading a font-generation configuration file. This is the shared model for both the BMFont/AngelCode .bmfc and libGDX Hiero .hiero formats (see ConfigFormatFactory). Combines FontGeneratorOptions with font source and output path information that lives outside the options type.

public sealed class BmfcConfig
Inheritance
BmfcConfig
Inherited Members

Properties

FontFile

Path to a font file (TTF/OTF/WOFF), if specified in the config.

public string? FontFile { get; set; }

Property Value

string

FontName

System font family name, if specified in the config.

public string? FontName { get; set; }

Property Value

string

Options

Font generation options parsed from the .bmfc file.

public FontGeneratorOptions Options { get; set; }

Property Value

FontGeneratorOptions

OutputFormat

Output format for the font descriptor file (Text, Xml, or Binary). Default is Text.

public OutputFormat OutputFormat { get; set; }

Property Value

OutputFormat

OutputPath

Output file path, if specified in the config.

public string? OutputPath { get; set; }

Property Value

string

Methods

FromOptions(FontGeneratorOptions, string?, string?, string?, OutputFormat)

Creates a BmfcConfig from existing FontGeneratorOptions with optional font source and output path. Useful for standalone config export via Write(BmfcConfig) (BMFont .bmfc), Write(BmfcConfig) (libGDX Hiero .hiero), or WriteConfig(BmfcConfig, string) (selected by extension) without parsing an existing file.

public static BmfcConfig FromOptions(FontGeneratorOptions options, string? fontFile = null, string? fontName = null, string? outputPath = null, OutputFormat outputFormat = OutputFormat.Text)

Parameters

options FontGeneratorOptions

Font generation options to wrap.

fontFile string

Path to the font file, or null.

fontName string

System font family name, or null.

outputPath string

Output path, or null.

outputFormat OutputFormat

Output format (default Text).

Returns

BmfcConfig

A new BmfcConfig wrapping the given options.