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
FontName
System font family name, if specified in the config.
public string? FontName { get; set; }
Property Value
Options
Font generation options parsed from the .bmfc file.
public FontGeneratorOptions Options { get; set; }
Property Value
OutputFormat
Output format for the font descriptor file (Text, Xml, or Binary). Default is Text.
public OutputFormat OutputFormat { get; set; }
Property Value
OutputPath
Output file path, if specified in the config.
public string? OutputPath { get; set; }
Property Value
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
optionsFontGeneratorOptionsFont generation options to wrap.
fontFilestringPath to the font file, or null.
fontNamestringSystem font family name, or null.
outputPathstringOutput path, or null.
outputFormatOutputFormatOutput format (default Text).
Returns
- BmfcConfig
A new BmfcConfig wrapping the given options.