What is a .TTF file?
A TTF font is typically a TrueType font, that is a binary sfnt font format that features quadratical Bézier glyph descriptions, character mappings, metrics information and hinting instructions. The TrueType font technology was developed in the late 80s by Apple company for their proprietary platform as one alternative to proprietary Adobe Type 1. Starting from Windows 3.1 (1992), Microsoft introduced TrueType fonts into their systems too. Today lots of .TTF font extensions files are actually OpenType font fonts which still use the same description of glyphs based on TrueType outlines.
In everyday life people deal with the use of TTF font files while downloading and installing any new fonts for desktop PC's, while downloading fonts of different foundries on line; during embedding of fonts, etc. The rarer but nevertheless quite actual usage case is an erroneous usage of a .TTF file for a TrueType Collections that has the ASCII signature "ttcf" inside the file header.
Since both fonts types can contain similar information regarding scaler type (usually, 00 01 00 00) we should be aware that the table contents distinguish the feature set better than the extension alone that can have similar .TTF extension. And .TTF file is not the text format at all. If it opens as text, it is misnamed or potentially malicious.
How to open a .TTF file
Open a .TTF file on Windows
- 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
- 2 Double-click your .TTF file if you have an app for .ttf files on your computer. In case it does not open, move on to step three.
- 3 Right-click your .TTF file -> select .
- 4 Choose Microsoft Windows Font Viewer in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .ttf files" and click OK.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Windows
- Microsoft Windows Font Viewer free
- FontForge open-source
- Birdfont freemium
- FontLab paid
- High-Logic FontCreator paid
- TransType paid
- FreeType open-source
- HarfBuzz open-source
Open a .TTF file on macOS
- 1 In the Finder app, locate your .TTF file.
- 2 Just double-click your .TTF file in order to automatically launch the program which is connected with it.
- 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select .
- 4 If it isn't in the list, choose and find the application manually.
Still not opening? See common problems and fixes, or view it in your browser.
Open a .TTF file on Linux
- 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
- 2 Double-click the file.
- 3 Or choose another program by right-clicking the file -> .
- 4 Install GNOME Fonts (if it is not installed on your computer) from the software centre, repository or Flathub.
Still not opening? See common problems and fixes, or view it in your browser.
Open a .TTF file on Android
- 1 Launch Files or another file management app.
- 2 In Downloads, find the .TTF file and open it by tapping.
- 3 A list of apps capable of opening the file will be shown. Tap FreeType and press Always to permanently connect the file type with this app.
- 4 No apps able to open this file? Download FreeType from the Google Play Store.
Still not opening? See common problems and fixes, or view it in your browser.
Open a .TTF file on iPhone / iPad
- 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
- 2 Tap the .TTF file you want to open.
- 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
- 4 Touch and hold the file to get the context menu -> choose -> select FreeType from the list of apps.
- 5 If there is no such option, download the app first from the App Store and then tap the document again.
Still not opening? See common problems and fixes, or view it in your browser.
Open a .TTF file online
- 1 Move to the online viewer at the top of this page.
- 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Online
- CorelDRAW paid
- Adobe Illustrator paid
More details about opening .TTF files
Windows: On a Windows computer the file should be opened by Microsoft Windows Font Viewer which displays the glyphs and allows you to proceed with its installation. If double-clicking cannot do the job, you should try another method , right-clicking and using "Install" or "Install for All Users".
macOS: In the macOS you should double-click and the file will be sent to Font Book program which analyzes the font and installs it either for the user himself/herself or for all users. The case of failure in using the font may lie in that in case there is an older version, the same name might be displayed for the new one , it might overshadow it in Font Book. The older font in question needs removing for solving the problem.
Desktop-based distribution Linux: GNOME Fonts/KDE fonts are useful for local installation on a desktop-based Linux distribution, copying to the directory ~/.local/share/fonts plus fc-cache -f -v enables you to install it in Fontconfig application. They are all free-of-charge tools.
Popular font editor or font production tools are FontForge, Birdfont, FontLab, Glyphs, RoboFont, High-Logic FontCreator and TransType
The Android OS has built-in ability to work with font data in terms of rendering true-type font outlines. However, the actual process requires installation and the device vendor needs a UI for fonts or a third party installer application for fonts. As usual most of the application vendors bundle files under folders "res/font" and "assets".
In terms of third party installation iOS and iPadOS support only such fonts installation using configuration-profile apps such as iFont.
CSS @font-face in Web browser does not support opening of this kind of files but allows loading if it appears together with font/ttf and CORS enabled on the server.
If you have problems in opening a file check if the file has first four bytes for 00 01 00 00 with a hex-editor. Then you can check whether MIME types or extensions associated are correct and try using fonttools or fontForge in order to test your file.
Technical details
A TTF (TrueType Font) is defined as a binary sfnt format font and not as text. The first 4 bytes are used to specify the scaler format with the values being; 00 01 00 00 representing that the font outline is of TrueType type and; 74 74 63 66 which represents “ttcf”. The latter defines the font as a font container known as True Type Collection. Immediately after comes the offset table with fields of numTables, searchRange, entrySelector, rangeShift, followed by 16-byte table records. Every table has the following four fields; tag, checksum, offset and length respectively. Major tables for the standard font consist of cmap, glyf, loca, head, hhea, hmtx, maxp, name,OS/2 and post. Common tables related to hinting and controls consist of cvt, fpgm, prep, gasp andhdmx.
The glyf table consists of encoding the contours of the glyph shape as quadratic béizer splines. Composite glyphs reference other glyphs instead of copying their outlines thus reducing the size of complex glyphs like accented letters and some symbols. Truetype instructions are stored separately but carried out on runtime through TrueType virtual machine during rasterizing process. Additionally, OpenTypeLayout has been added in for adding further information about GSUB for replacements (substitutions), GPOS for positioningglyphs. Other commonly used tables by modern TTF font include; thekern table, BASE, GDEF,VORG tables and STAT, fvar, gvar, COLR/ CPAL.
Registered MIME types are; font/ttf for .ttf files and font/collection for .ttc. Older software and web servers may still use application/x-font-ttf or application/font-sfnt. The size is normally between 20KB- 500 KB for the common fonts and between several MBs-tens of MBS for color font or large cjk family fonts andvariable fonts. Name table consists of; copyright, family, Subfamily name strings, but encoded depending on the platform record. Modern name table encoding will depend on the platformrecord, usually utf-16 big-endian (Windows) and mac roman (older mac platforms). Current MS openType specifications are Open Type 1.9.1.
How to convert .TTF files
Conversion to the web requires .. Using FontTools (fonttools ttLib), fonttools ttLib.woff2 compress MyFont.ttf does that, Google’s woff2_compress MyFont.ttf converts MyFont.ttf to the WOFF2 format file MyFont.woff2, residing in the current directory. The WOFF2 uses Brotli-based compression technique and is compatible with all major currently available web-browsers. When compatibility with older web-browsers is important, the old and relatively space-intensive but compatible font file can be created via ttx -o MyFont.woff --flavor woff MyFont.ttf
The FontTools TTX is good enough tool when engineering works have to be performed - command-line utility ttx MyFont.ttf will decompile the font-file into the XML format for further manipulation (patching), while later, the modified version of MyFont.ttx will be compiled using ttx MyFont.ttx back into a binary MyFont.ttf file.
FontForge, FontLab, Glyphs and FontCreator provide conversion among .TTF (TrueType fonts), .OTF files (.TTF to .otf is called "CFF flavored" conversion that changes glyph’s technology (disables native TrueType instruction)) and SVG font file, as well as Bitmap fonts creation. When re-working existing .TTF file in another tool and then want to return back to its format, the conversion to PNG or SVG will just create an outline representation of a font's letters - not the font - but will delete all keyboard information and layout tables. For webpages usage, in such cases pyftsubset is preferred to use instead.
| Convert to | Tool | Command / note |
|---|---|---|
| WOFF2 | FontTools ttLib.woff2 | fonttools ttLib.woff2 compress MyFont.ttf Creates a compressed web font; outlines and most OpenType tables are preserved, but some nonessential or private tables may be removed by workflows. |
| WOFF | FontTools ttLib.woff2 | ttx -o MyFont.woff --flavor woff MyFont.ttf Useful for older web-browser support; WOFF wraps sfnt data with web metadata and compression. |
| XML TTX | FontTools TTX | ttx MyFont.ttf Dumps OpenType/TrueType tables to editable XML for inspection or version control; binary hinting/program tables can be verbose. |
| TTF from XML TTX | FontTools TTX | ttx MyFont.ttx Rebuilds a binary font after editing TTX; invalid table data can make the output uninstallable. |
| OTF/CFF | FontForge | fontforge -lang=ff -c 'Open($1); Generate($2)' MyFont.ttf MyFont.otf Converts to OpenType with CFF/PostScript outlines in FontForge workflows; TrueType instructions may be lost or replaced. |
| SVG font | FontForge | fontforge -lang=ff -c 'Open($1); Generate($2)' MyFont.ttf MyFont.svg Legacy SVG font output is mainly for inspection or old systems, not modern web deployment. |
| WOFF2 | Google woff2_compress | woff2_compress MyFont.ttf Fast dedicated compressor for web deployment; produces MyFont.woff2 in the current directory. |
Common problems and fixes
For Windows Font Viewer, the reason of failure can be an incorrect sfnt header in the offset 0, invalid table checksum or the absence of the necessary ones: cmap, head, glyf, loca, hhea, hmtx, name, OS/2 and post. Redownload the font and do not rename its web archive or ZIP file to .TTF format.
Font Book on macOS reports about "serious errors were found" in the validation process. Do not install a font unless it comes from a known source. It should be checked for corrupted name, cmap or outline information. However, sometimes Font Book can allow using a file with faulty glyph tables, so the failure means an actual error.
The font could be successfully installed but not seen by CorelDRAW, Adobe Illustrator and others because of the cached list of the installed fonts in the application. Restart the program. Otherwise, Linux applications require rebuilding the Fontconfig cache with the command fc-cache -f -v.
Two fonts have the same name and style information inside although they can differ in filenames. It results in a collision in Font Book, GNOME Fonts, Fontmanager and other similar tools. Delete a redundant font or modify internal information in accordance with a license if possible.
If the older software refuses using variable or color-font tables in the font, install its static version exported from the source file.
The web applications can return such errors as "OTS parsing error" or "cors" errors. Use fonttools ots-sanitize tool or open it in FontForge and make a server side sending of the font/ttf with the correct permissions. The boxes or tofu in case of glyphs mean lack of Unicode cmap support.
Security considerations
TTF files do not feature macros in Office; however, they do consist of many tables and TrueType bytecode, interpreted as binary sfnt files by such font renderers as FreeType, DirectWrite, and the built-in browser ones. Malformed fonts could be used as exploit mechanisms on kernel-mode font engine, the graphical device interface, the above two font rendering tools and browser sanboxed ones - so patching your operating systems, browsers and font libraries is critical. Do not download fonts but from known and reputable manufacturers or trusted font archives: most of viewers will automatically process all installed fonts by design. Preview an unknown file you receive either in e-mail or as a component of some package in such programs as FontTools and in isolated environment. Such items as name, vendor, copyright, trademark and license notice, designer, URI, UID may expose private data, while embedding rights, available in an OS/2 font table, cannot be taken as legal permissions to conversion and redistribution of the concerned typefaces.
History and versions
TrueType was developed by Apple and came to be integrated with their System 7 back in 1991 as a scalable technology for outline-based fonts design. It has been subsequently licensed by Microsoft in 1992 who launched the technology alongside Windows 3.1 thereby cementing .TTF font extension format on personal computers. TrueType's sfnt format later became a starting point for developing an advanced technology of OpenType which has been first publicly released in 1996 by Microsoft in partnership with Adobe in order to bring both TrueType and Adobe's proprietary PS CFF technology into a unified format specification.
The first version of OpenType layouts with advanced typography features that have included such technologies as ligatures, mark positioning, contextual shaping and complex script support, among others has seen its development in late 1990s and 2000s. Variable fonts has been officially added in the year 2016 via adding version 1.8 to an OpenType technology where one can adjust the parameters like weight/width and pack multiple weights into one true type/OTF fonts.
Related formats
The file extension .otf identifies OpenType fonts containing outlines such as CFF and PostScript, but .ttf suggests either True Type or legacy support, while .ttc stands for the TrueType collection containing multiple fonts and sharing tables, saving space for families and CJK fonts while some pipeline processes can't accommodate this format. The file format .woff or .woff2 comprises a package of sfnt and is used on the web through CSS with @font-face where the choice is .woff2 over .ttf; the former is also superior to .eot which refers to the Embedded OpenType by Microsoft for older versioned IE browsers. The extensions .pfb and .pfm suggest legacy Adobe Type 1 files. As a rule, .ufo refers to UFO format which is a source format in font design and development and is saved as a directory and edited. .svg fonts are old fashioned web fonts; .pfb and .pfm stand for a combination of old legacy Type 1 Adobe fonts which are largely obsolete.
No comments yet. Be the first to share your experience with this file type.