Font Glyph Viewer

Every glyph in the file, down to its control points.

  • TTF, OTF, WOFF
  • Outline points
  • 3D letter STL
A shallow tray of metal letterpress type blocks on a worn wooden workbench, with one tall carved wooden letter standing upright beside it in soft window light

The guide

A Font File Is a Small Database, and the Letters Are Only One of Its Tables

Open a font and you find outlines, a map from characters to those outlines, a sheet of measurements and a license, each kept in its own table and each easy to misread.

  • 8 tables that every OpenType font must carry; outlines are not among them
  • 16 to 16,384 units per em that the font header may declare
  • 620 = 70 + 490 + 60 advance of the sample b: bearing, outline, bearing
  • 0, 2, 4 or 8 the only valid values of the embedding permission
  • name IDs 13 and 14 where a font states its license and a link to it
Read the full guide Fold the guide 8 min · 20 sources

Most people meet a font as a name in a menu. Open the file itself and the name turns out to be the least of it. A font is a small database: a directory at the front, then a row of tables, each with a four-letter tag and one job. One table holds the shapes. The others say what the shapes are for, how far apart they sit, and who may use them.

A directory and its tables

OpenType was derived from TrueType and keeps its basic structure. A font file starts with a table directory, and each entry in it is sixteen bytes: a tag, a checksum, an offset and a length. The checksum is nothing subtle. It is the table’s bytes added up as 32-bit numbers. Only 8 tables are required, and they are the bookkeeping ones: the character map, the header, two for horizontal measurements, a count of glyphs, the names, a set of metrics inherited from OS/2 and Windows, and PostScript information. The outlines live in further tables, and which ones depends on the kind of curve the font uses.

A collection file puts several fonts behind one header so that tables which are identical can be shared and stored once. The saving is largest where fonts have most in common, and in 2014 Adobe extended collections to fonts with CFF outlines for the sake of its Chinese, Japanese and Korean families.

Web fonts add a wrapper. WOFF 1.0, a W3C Recommendation of December 2012, compresses each table on its own and states that the decoded font will display identically to the one that went in. WOFF 2.0 squeezes harder. It reworks some tables with a preprocessing step that knows what is in them and then applies a stronger compressor, Brotli. That is why a simple reader can unpack the first format and not the second. Neither changes what the font says once it is unpacked.

Two ways to draw a curve

The shapes are outlines, closed loops called contours, and the two outline formats disagree about curves. TrueType uses quadratic curves: two points on the curve and, between them, one control point off it. FreeType’s documentation describes a trick that saves space. Where two control points follow each other with no point on the curve between them, a point is implied exactly midway between the two, so it can be left out of the file and worked out when the outline is drawn. The other format, CFF, uses cubic curves, each with two control points. FreeType’s documentation puts the difference in a sentence: second-order arcs in TrueType, third-order arcs in PostScript Type 1 and CFF.

Neither is better at being a letter. They are two histories. The cubic format began at Adobe as a compact way to store its Type 1 fonts, and it entered OpenType when Adobe joined the effort in 1996.

What differs more is how each is stored. A TrueType glyph is data: the last point of each contour, a row of flags, then x and y coordinates, each written as a step from the point before, so that a short move fits in a single byte. A CFF glyph is a program. Adobe’s Type 2 charstring format describes a small stack machine with operators such as rmoveto, rlineto and rrcurveto. A number is pushed, an operator consumes it, and the pen moves. Programs can call shared subroutines, nested at most ten deep, and Adobe’s note gives the reason: sequences that repeat throughout a font, such as the outline of a serif, need to be stored only once.

Glyphs can also be assembled from other glyphs. A composite glyph is a list of references to other glyphs, each with an offset and, if wanted, a scale, which is how an accented letter can reuse the outline of the plain one. The parts may themselves be composites. A font records how deep its own nesting goes, but that figure is only the font’s claim, so a careful reader sets its own limit.

Direction matters too. FreeType’s reference says that outlines are filled by the non-zero winding rule, and that in TrueType the outer contours run clockwise. A loop running one way adds ink. A loop inside it running the other way takes ink out. That is how the hole in an O is made.

Units, the em, and the numbers that space text

None of these coordinates are millimeters or pixels. They are font units, on a grid whose fineness the font declares as its units per em. The format limits the value to the range from 16 to 16,384, and FreeType refuses a font that declares anything else. TrueType fonts typically use 2,048; the default matrix in the CFF format assumes 1,000.

Size enters only when text is set. FreeType gives the rule: the em in pixels is the point size times the resolution divided by 72, and a length in font units is multiplied by that figure and divided by the units per em. Take a feature 550 units long, in a font of 2,048 units per em, shown at 18 points on a screen of 72 dots per inch: 550 times 18 divided by 2,048, which is 4.83 pixels.

Spacing is kept apart from shape. Each glyph has an advance width, the distance the pen moves on after the glyph is drawn, and a left side bearing, the distance from the pen to the left edge of the glyph’s box. FreeType’s glossary defines both in those terms. The right side bearing is not stored at all. FreeType gives the formula for it: the advance, less the left bearing and less the width of the outline’s bounding box.

Vertical placement comes from numbers that belong to the whole font: an ascender and a descender, and in the OS/2 table an x-height and a cap height. Font tools commonly measure those last two straight from the tops of the lowercase x and the capital H.

The sample font that opens with the viewer on this page makes the arithmetic easy to check, because it has 1,000 units per em. Select the lowercase b. Its advance width is 620 units, its outline runs from x = 70 to x = 560, and its left side bearing is 70. The outline is therefore 490 units wide, and the right side bearing is 620 less 70 less 490, which is 60. The whole letter is 620 = 70 + 490 + 60. Set at 16 pixels per em, that advance comes to 620 times 16 divided by 1,000, a little under 10 pixels.

The capital O in the same font shows the implied points at work. Each of its two contours is stored as four control points and nothing else, so every point that is actually on the curve is one the reader must compute. Four such points cannot make a true circle. Worked out from the curve equation, a ring drawn that way stands 6.1 percent farther from its center on the diagonals than at the sides, while eight points bring the difference down to 0.3 percent. The sample O is the squarish kind of round that four produce.

One character, several glyphs, or none

A font does not store letters. It stores glyphs, numbered from zero, and a separate table, the character map, says which glyph a character code receives. Unicode’s description of its own encoding model is blunt about the gap: characters differ from glyphs, and glyphs do not correspond one-to-one with characters. Its example is an f followed by an i, which may be displayed with a single glyph called an fi ligature. The character map works on one code at a time, so that ligature has no entry there. It is reached afterward, by substitution rules kept in other tables.

The map is uneven in the other direction as well. Every code the font does not cover is sent to glyph zero, the glyph that stands for a missing character. Several codes may share one glyph. And some glyphs have no code at all. In the sample font, 16 code points lead to 15 glyphs, because the space and the no-break space share one, and two of its 17 glyphs cannot be typed by any character.

There is even a format for the extreme case. Format 13 of the character map assigns whole ranges of characters to a single glyph. Unicode’s Last Resort font is the standing example. Its high-efficiency version uses that format to answer every possible character with a fallback glyph for its kind, and needs only 387 glyphs to do it.

What the file declares, and what a viewer cannot show

A font file is software with an owner, and two places in it speak to that. The naming table holds strings by number: family, style, version, designer, and at name IDs 13 and 14 a description of the license and a link to more. The second place is one field of the OS/2 table, called fsType, which states the embedding permission. Its low bits may hold only 0, 2, 4 or 8: installable, restricted, preview and print, or editable. Two further bits forbid subsetting and limit embedding to bitmaps.

These fields are statements, not locks. FreeType’s reference describes the bits as telling applications about embedding and subsetting restrictions, and that is the one thing the field covers: storing the font inside a document. It is silent on tracing an outline, cutting it from vinyl or printing it as a solid object. For those the license governs, and name ID 13 holds whatever description of it the maker chose to write. A viewer can show what the font declares. It cannot tell you what you were sold.

Drawing every glyph from its outline is honest work, but it is not how text reaches a screen. A TrueType font may carry instructions, small programs that move outline points onto the pixel grid at low sizes. FreeType calls the operation grid-fitting, and describes the TrueType kind as a stack-based virtual machine with more than 200 operators. CFF charstrings carry stem hints for the same purpose. A viewer that skips both shows the designer’s ideal shape, not the adjusted one that a small size on a coarse screen receives.

Spacing between particular pairs is missing too. Kerning lives in the kern table or in the glyph positioning table, and recent fonts may carry only the second. A line set by advance widths alone ignores both.

Shaping is the largest gap. The HarfBuzz manual separates ligatures such as fi, which are optional refinements, from substitutions that some languages require before text is correct at all. One of its examples is Arabic, where a font holds separate glyphs for the initial, medial, final and isolated forms of each letter. Set Arabic one glyph to a character and the letters never join. A variable font adds one more layer: mechanisms that let a single font hold many design variations, of which a plain reader shows only the default.

So a glyph viewer is a view of the parts, not of the machine running. That is still worth having. It settles what a font contains, whether a character is really in it, how its spacing is built, and what its maker wrote down about its use. The rest is the work of a layout engine.

Sources

Every source consulted for this guide. Links checked October 3, 2026.

  1. OpenType Wikipedia
  2. Lib/fontTools/ttLib/sfnt.py fontTools project on GitHub (MIT License)
  3. Lib/fontTools/ttLib/tables/_g_l_y_f.py fontTools project on GitHub (MIT License)
  4. Lib/fontbakery/checks/required_tables.py Font Bakery project on GitHub (Apache License 2.0)
  5. src/sfnt/sfobjs.c The FreeType Project, source mirror on GitHub (FreeType License)
  6. include/freetype/ttnameid.h The FreeType Project, source mirror on GitHub (FreeType License)
  7. Information Retrieval - FreeType-2.14.3 API Reference The FreeType Project
  8. Outline Processing - FreeType-2.14.3 API Reference The FreeType Project
  9. FreeType Glyph Conventions | Glyph Outlines The FreeType Project
  10. FreeType Glyph Conventions | Kerning The FreeType Project
  11. ftcli os2 - FoundryTools-CLI 2.1.1 documentation FoundryTools-CLI project (MIT License)
  12. Why do I need a shaping engine?: HarfBuzz Manual HarfBuzz project
  13. Last Resort Font Unicode Consortium, unicode-org/last-resort-font on GitHub
  14. The Compact Font Format Specification Adobe Developer Support, Technical Note #5176
  15. The Type 2 Charstring Format Adobe Developer Support, Technical Note #5177
  16. FreeType Glyph Conventions | FreeType Outlines The FreeType Project
  17. FreeType Glyph Conventions | Glyph Metrics The FreeType Project
  18. UTR#17: Unicode Character Encoding Model Unicode Consortium
  19. WOFF File Format 1.0 World Wide Web Consortium (W3C)
  20. WOFF File Format 2.0 World Wide Web Consortium (W3C)