GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — widget_truetype

widget_truetype

Jump to bottom
Alejandro Mora edited this page Apr 10, 2026 · 1 revision

TrueType Widget

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>
}

Parameters

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.


Example

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


  • News
  • Features · DE
  • Wish List

Documentation

  • Manual · DE
  • Howto · DE
  • FAQ
  • Configuration
  • Evaluator
  • Widgets & Layout
  • Displays
  • Plugins
  • Sample Config

Developers

  • Write a Driver
  • Write a Plugin

Resources

  • Download
  • Mailing Lists
  • Credits
  • Logos
  • Cool Stuff
  • Links

Legacy (0.9)

  • Old Documentation

AX206 Fork

  • Fork Features
  • Theme Management
  • TrueType Widget
  • Gauge Widget
  • GraphicBar Widget
  • Sparkline Widget

Clone this wiki locally

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.