Skip to content

Class TerminalTheme

What a session draws with: font, colors, and cursor. Emulation ignores all of it. How each screen then shows the picture (filtering and the CRT or LCD effect) is a DarkEffekt.Terminal.Unity.TerminalScreenType on that screen.

The font fields are read when the session builds its renderer: a later font change applies through TerminalSession.RebuildRenderer, and the cell size changes per session through TerminalSession.SetFontSize, which leaves this asset alone. Colors and cursor take effect while it runs.

Declaration
[CreateAssetMenu(fileName = "TerminalTheme", menuName = "Terminal/Theme", order = 0)]
[Icon("Packages/com.darkeffekt.terminal/Editor/Icons/Assets/TerminalTheme.png")]
public sealed class TerminalTheme : ScriptableObject

Inheritance: System.Object -> UnityEngine.Object -> UnityEngine.ScriptableObject

The smallest cell size, in pixels.

Declaration
public const int MinFontSize = 6

The largest cell size, in pixels.

Declaration
public const int MaxFontSize = 96
Declaration
[Header("Font (read when the session starts)")]
[Tooltip("A monospace font asset. When empty, the OS fonts below are tried, then the bundled JetBrains Mono.")]
public Font font
Declaration
[Tooltip("Monospace OS font names to try in order when no font asset is set. Leave empty to use the bundled font on every platform.")]
public string[] osFontNames
Declaration
[Tooltip("The starting cell size in pixels. During play, call SetFontSize on the session.")]
[Range(6, 96)]
public int fontSize
Declaration
[Header("Colors (live)")]
public Color foreground
Declaration
public Color background
Declaration
public Color cursorColor
Declaration
[Tooltip("Overrides for palette entries 0..15. Leave empty for xterm defaults.")]
public Color[] ansiOverride
Declaration
[Tooltip("Bold text also uses the bright palette entry, the classic 16-color behavior.")]
public bool boldUsesBrightColors
Declaration
[Header("Cursor (live)")]
public bool cursorBlink
Declaration
[Range(0.1, 2)]
public float cursorBlinkInterval