VT100 Terminal App
Circle VT100 module documentation
Loading...
Searching...
No Matches
TFontConverter.h
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// Module: CTFontConverter
3// Description: Loads and caches VT100 font assets for renderer consumption.
4// Author: R. Zuehlsdorff, ralf.zuehlsdorff@t-online.de
5// Created: 2026-01-18
6// License: MIT License (https://opensource.org/license/mit/)
7//------------------------------------------------------------------------------
8// Change Log:
9// 2026-01-18 R. Zuehlsdorff Initial creation
10//------------------------------------------------------------------------------
11
12#pragma once
13
14// Include Circle core components
15#include <circle/sched/task.h>
16#include <circle/font.h>
17
18#include "TColorPalette.h"
19
29enum class EFontSelection : unsigned int
30{
31 VT100Font8x20 = 1, // Standard VT100 font 8x20
32 VT100Font10x20 = 2, // DEC VT100 font 10x20 with dot stretching and scan lines
33 VT100Font10x20Solid = 3, // DEC VT100 font 10x20 solid variant
34 VT100GraphicsFont8x20 = 6, // Graphic VT100 font
35 VT100GraphicsFont10x20 = 8, // DEC Graphic VT100 font 10x20
36 VT100GraphicsFont10x20Solid = 10 // DEC Graphic VT100 font 10x20 solid variant
37};
38
39
48class CTFontConverter : public CTask
49{
50public:
53 static CTFontConverter *Get(void);
54
59
62 bool Initialize();
63
65 void Run() override;
66
70 static const TFont &GetFont(EFontSelection font);
71
72private:
74 bool m_Initialized{false};
75};
Declares shared color selection enums for the VT100 renderer stack.
Background task that materializes VT100 fonts on demand.
Definition TFontConverter.h:49
bool Initialize()
Initialize font assets and resume the task.
Definition TFontConverter.cpp:61
static const TFont & GetFont(EFontSelection font)
Retrieve the Circle font matching the given selection.
Definition TFontConverter.cpp:82
CTFontConverter()
Construct the font converter task.
Definition TFontConverter.cpp:48
~CTFontConverter()
Release any converter resources.
Definition TFontConverter.cpp:56
static CTFontConverter * Get(void)
Access the singleton font converter task.
Definition TFontConverter.cpp:36
void Run() override
Idle loop keeping the converter task alive when needed.
Definition TFontConverter.cpp:74