Skip to documentation
DocumentationAll documentsEnglish

FBLABEL(1)

NAME

fblabel - display a text string on a framebuffer

On this page

SYNOPSIS

fblabel [-a] [-c] [-d] [-F framebuffer] [-f fontname] [-C r/g/b]
        [-r red] [-g green] [-b blue]
        [-s squaresize] [-S squaresize]
        [-w width] [-W width] [-n height] [-N height]
        x_position y_position text_string

DESCRIPTION

fblabel writes a text string onto the image of the currently selected framebuffer. By default the text is anti-aliased (Gaussian filtered) against the existing image, so the label blends with whatever is already displayed. The lower-left corner of the text begins at the given x_position and y_position (in pixels); use fbpoint(1) to interactively locate a position.

The environment variable FB_FILE specifies the current framebuffer; see brlcad(1). The framebuffer may instead be named with the -F flag.

The text is drawn using a Berkeley vfont-format font. The default font is nonie.r.12. Fonts are located in BRL-CAD’s data directory under vfont/, falling back to /usr/lib/vfont. The default text color is white (255/255/255).

OPTIONS

-a

Disable anti-aliasing. Text is rendered with hard edges rather than filtered against the background image.

-c

Clear the framebuffer before drawing the text. By default the existing image is preserved.

-d

Enable debugging output to standard error.

-F framebuffer

Use the specified framebuffer device instead of FB_FILE.

-f fontname

Use the named vfont-format font instead of the default nonie.r.12.

-C r/g/b

Set the text color from red, green, and blue values in the range [0..255], separated by slashes. The default is white (255/255/255).

-r red

Set the red component [0..255] of the text color (backward compatibility; -C is preferred).

-g green

Set the green component [0..255] of the text color (backward compatibility; -C is preferred).

-b blue

Set the blue component [0..255] of the text color (backward compatibility; -C is preferred).

-s squaresize, -S squaresize

Set both the width and height of the framebuffer to squaresize pixels.

-w width, -W width

Set the framebuffer width in pixels.

-n height, -N height

Set the framebuffer height in pixels.

-h, -?

Print a usage message.

EXAMPLES

Example 1. Caption a rendered image
pix-fb moss.pix
fblabel -C 255/255/0 10 10 "moss scene"

Display a rendered image with pix-fb(1), then stamp a yellow caption in the lower-left corner, anti-aliased over the existing pixels.

Example 2. Position a label interactively with fbpoint
fblabel -f oldenglish.14 `fbpoint` "Title"

Use fbpoint(1) to click a location on the framebuffer; its emitted coordinates become the x_position and y_position for the label, drawn here in the oldenglish.14 font.

SEE ALSO

brlcad(1), fbpoint(1), fbline(1), fbclear(1), pix-fb(1)

AUTHOR

BRL-CAD Team

This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org