ttname man page

ttname — CLI font metadata editor

Synopsis

ttname [options] input_file [output_file]

Description

ttname provides a simple CLI interface to edit the name table in TrueType or OpenType fonts, which contains metadata regarding the font. It uses the the same library underlying the venerable ttx(1) utility to do it's work.

Options

Universal Options

These options are valid regardless of whether you are using ttname to read or write to font files.

input_file
The path to a OpenType of TrueType file
-a, --all
Operate on all platform/encoding/language combinations. By default, ttname will only operate on the first combination found. You probably want to use this option when writing.
-p, --platform

Specifies the OpenType platform ID number to operate on. You can provide the numeric ID or use one of the following short names:

unicodefor platform ID #0
isofor platform ID #1
macintoshfor platform ID #2
windowsfor platform ID #3
customfor platform ID #4
-e, --encoding
Specifies the OpenType platform encoding ID number to operate on.
-l, --lang
Specifies the OpenType language encoding ID number to operate on.

Read Options

The following option is only valid when you are using ttname to read the metadata from

-n {nameID}, --record={nameID}
Specifies the OpenType name ID number to return on the standard output. In addition to using the numeric form, you can also pass one of the short names listed below in Write Options.

Write Options

These options are only valid when ttname is used to write new metadata to font files.

--name{nameID}=*{DATA}*
Updates the OpenType name ID number {nameID} with the provided {DATA}.

If the record does not exist, it will be created. If -a is provided on the command line, the same name ID will be updated for all platform/encoding/language combinations that exist in the file. Otherwise, the specified or default platform/encoding/language are used.

In addition to using the numeric form as above, ttname also supports textual options for the well known name ID numbers, which range from 0-. Using any of the following is equivalent to passing the numeric form as above.

--copyright
Updates name id #0, which contains the copyright notice.
--family
Updates name id #1, which contains the font family name.
--subfamily
Updates name id #2, which contains the font subfamily name.
--id
Updates name id #3, which contains a unique font identifier.
--name
Updates name id #4, which contains the full font name.
--version
Updates name id #5, which contains a version string.
--ps-name
Updates name id #6, which contains the PostScript name.
--trademark
Updates name id #7, which contains trademark information.
--mfg-name
Updates name id #8, which contains the manufacturer name.
--designer
Updates name id #9, which contains the designer name.
--desc
Updates name id #10, which contains a description of the font.
--vendor-url
Updates name id #11, which contains the URL of the font vendor.
--designer-url
Updates name id #12, which contains the URL of the font designer.
--license
Updates name id #13, which contains a license description.
--license-url
Updates name id #14, which contains the license info URL.
--pref-family
Updates name id #16, which contains the preferred family.
--pref-subfamily
Updates name id #17, which contains the preferred subfamily.
--compat-full
Updates name id #18, which contains a compatible full name. Used only by the Macintosh platform (platform ID #1).
--sample
Updates name id #19, which contains sample text.
--ps-cid-findfont-name
Updates name id #20, which contains the PostScript CID findfont name.
--wws-family
Updates name id #21, which contains the WWS family name.
--wws-subfamily
Updates name id #22, which contains the WWS subfamily name.

Examples

Display the name records from the first platform/encoding/language combination present in the font file:

ttname font.ttf

Display all name records in the font file:

ttname -a font.ttf

Display only the first copyright record in the font file:

ttname --record=copyright font.ttf

or use the number, if you don't know the name:

ttname -n0 font.ttf

Change the font designer's URL:

ttname --designer-url='http://www.example.com/' font.ttf

Again, you can use the number, which is useful for weird names:

ttname --name12='http://www.example.com/' font.ttf

See Also

·
ttx(1)
·
fc-query(1)
·

Microsoft's documentation of the name table

·

Apple's documentation of the name table

·
ISO/IEC 14496-22:2009

Bugs

In the likely event that you encounter a bug, you can report it at:

<https://github.com/tchollingsworth/ttname/issues>

or contact the author listed below.

Author

T.C. Hollingsworth

<tchollingsworth@gmail.com>

Info

August 25, 2013