Class FigletFontAsset
A FIGlet font as an asset. A .flf file in the project imports as one, checked when it imports, so a field of this type takes the file directly. DarkEffekt.Terminal.Unity.FigletFontAsset.Font is the parsed font, for a DarkEffekt.Terminal.FigletText or a BigText element.
Assembly: DarkEffekt.Terminal
Section titled “Assembly: DarkEffekt.Terminal”[Icon("Packages/com.darkeffekt.terminal/Editor/Icons/Assets/FigletFontAsset.png")]public sealed class FigletFontAsset : ScriptableObjectInheritance: System.Object -> UnityEngine.Object -> UnityEngine.ScriptableObject
Properties
Section titled “Properties”The parsed font, read from the asset’s data on first use and kept. Null for an asset with no data.
public FigletFont Font { get; }Height
Section titled “Height”The rows in every glyph.
public int Height { get; }Baseline
Section titled “Baseline”The rows from the top of a glyph down to and including the baseline.
public int Baseline { get; }GlyphCount
Section titled “GlyphCount”The number of glyphs in the font.
public int GlyphCount { get; }Layout
Section titled “Layout”The layout the font’s header asks for.
public FigletLayout Layout { get; }Direction
Section titled “Direction”The direction the font’s header asks for.
public FigletDirection Direction { get; }Comment
Section titled “Comment”The font’s comment block, where its author and terms are usually given.
public string Comment { get; }Fields
Section titled “Fields”BundledFolder
Section titled “BundledFolder”The folder, under any Resources folder, that the demo shell’s figlet command and the sample interface take their font from.
public const string BundledFolder = "DarkEffektTerminal"Methods
Section titled “Methods”LoadBundled()
Section titled “LoadBundled()”The first font found in DarkEffekt.Terminal.Unity.FigletFontAsset.BundledFolder, or null when there is none.
public static FigletFont LoadBundled()Returns
Section titled “Returns”DarkEffekt.Terminal.FigletFont
Render(string)
Section titled “Render(string)”The rows of text rendered in the font with its own layout. No rows for an asset with no data.
public string[] Render(string text)Returns
Section titled “Returns”System.String[]
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
text |
Create(byte[])
Section titled “Create(byte[])”Makes an asset in memory from the bytes of a .flf file.
public static FigletFontAsset Create(byte[] flf)Returns
Section titled “Returns”DarkEffekt.Terminal.Unity.FigletFontAsset
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Byte[] |
flf |
Exceptions
Section titled “Exceptions”System.FormatException
The data is not a FIGfont, or is a zip-compressed one.