ttname - CLI font metadata editor
ttname [options] input_file [output_file]
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.
These options are valid regardless of whether you are using ttname to read or write to font files.
The path to a OpenType of TrueType file
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.
Specifies the OpenType platform ID number to operate on. You can provide the numeric ID or use one of the following short names:
unicode | for platform ID #0 |
iso | for platform ID #1 |
macintosh | for platform ID #2 |
windows | for platform ID #3 |
custom | for platform ID #4 |
Specifies the OpenType platform encoding ID number to operate on.
Specifies the OpenType language encoding ID number to operate on.
The following option is only valid when you are using ttname to read the metadata from
These options are only valid when ttname is used to write new metadata to font files.
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.
Updates name id #0, which contains the copyright notice.
Updates name id #1, which contains the font family name.
Updates name id #2, which contains the font subfamily name.
Updates name id #3, which contains a unique font identifier.
Updates name id #4, which contains the full font name.
Updates name id #5, which contains a version string.
Updates name id #6, which contains the PostScript name.
Updates name id #7, which contains trademark information.
Updates name id #8, which contains the manufacturer name.
Updates name id #9, which contains the designer name.
Updates name id #10, which contains a description of the font.
Updates name id #11, which contains the URL of the font vendor.
Updates name id #12, which contains the URL of the font designer.
Updates name id #13, which contains a license description.
Updates name id #14, which contains the license info URL.
Updates name id #16, which contains the preferred family.
Updates name id #17, which contains the preferred subfamily.
Updates name id #18, which contains a compatible full name. Used only by the Macintosh platform (platform ID #1).
Updates name id #19, which contains sample text.
Updates name id #20, which contains the PostScript CID findfont name.
Updates name id #21, which contains the WWS family name.
Updates name id #22, which contains the WWS subfamily name.
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
Microsoft's documentation of the name table
Apple's documentation of the name table
https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html
ISO/IEC 14496-22:2009
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.
T.C. Hollingsworth
ttname is distributed under the simplified 2-clause BSD license.
Copyright 2013 T.C. Hollingsworth
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.