txtw icon indicating copy to clipboard operation
txtw copied to clipboard

Return the pixel width of the given strings for the given font

:man source: Txtw :man version: {revnumber} :man manual: Txtw Manual

txtw(1)

Name

txtw - Compute text widths

Synopsis

txtw [-h|-v|-f FONT|-s SIZE|-F ALT_FONT|-S ALT_SIZE] STRING ...

Description

Returns the width in pixels of the given strings for the the given font.

Options

-h:: Print the synopsis to standard output and exit.

-v:: Print the version information to standard output and exit.

-f FONT:: Set the main font.

-s SIZE:: Set the size of the main font.

-F ALT_FONT:: Set the alternate font.

-S ALT_SIZE:: Set the size of the alternate font.

String Syntax

By default the main font is used to compute the width.

The alternate font is used for the parts of the string enclosed between ( and ).

Example


txtw -f 'DejaVu Sans' -s 11 -F SimpleIcons -S 16 'One (U) Two (D) Three'

Author

Bastien Dejean

//// vim: set ft=asciidoc: ////