Skip to content

baskerville/txtw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 <nihilhill at gmail.com>

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published