GeezerVison is showing github.com — widget_truetype
Alejandro Mora edited this page
Apr 10, 2026
·
1 revision
The TrueType widget renders text using TrueType fonts via libgd. Unlike the built-in Text widget (which is limited to bitmap fonts), TrueType supports variable-size text, antialiasing, and arbitrary font files. Added by Eric Loxat; background color support added in the AX206 fork.
Widget <name> {
class 'Truetype'
expression <expr>
font <path>
size <number>
width <number>
height <number>
align <char>
fcolor <color>
background <color>
inverted <number>
debugborder <color>
update <number>
visible <expr>
}
| expression |
Text to display (string expression) |
| font |
Full path to a .ttf font file |
| size |
Font height in points. If 0 or omitted, auto-sizes to fill the bounding box height |
| width |
Width of the bounding box in pixels |
| height |
Height of the bounding box in pixels |
| align |
Horizontal alignment: 'L' (left), 'C' (center), or 'R' (right). Default: 'L'
|
| fcolor |
Font color as RGB or RGBA hex (e.g. 'ffffff') |
| background |
Background fill color as RGB or RGBA hex. If omitted, background is transparent (AX206 fork addition)
|
| inverted |
If non-zero, inverts fcolor (e.g. '0000ff' → 'ffff00') |
| debugborder |
Draws a colored border around the bounding box — useful for layout debugging |
| update |
Update interval in milliseconds. Default: 1000 |
| visible |
Visibility expression; widget is hidden when this evaluates to zero |
If size is set and the rendered text is wider than width, it will be cropped. Text is always vertically centered within the bounding box; descenders are ignored for centering purposes.
Widget CpuLabel {
class 'Truetype'
expression 'CPU'
font '/usr/share/fonts/gnu-free/FreeSansBold.ttf'
size 14
width 60
height 20
align 'C'
fcolor 'ffffff'
background '000000'
update 60000
}
This widget is available in the AX206 fork. See Widgets & Layout for all widget types.
The official LCD4Linux(AX206) Wiki
Back from the dead!
Home
Documentation
Developers
Resources
Legacy (0.9)
AX206 Fork
Clone this wiki locally