Tipografía

OpenType

Modern font format developed by Microsoft and Adobe supporting up to 65,535 glyphs, advanced typographic features (ligatures, alternates, kerning), and Unicode-based character mapping.

What is OpenType?

OpenType is the dominant font format for digital typography, developed jointly by Microsoft and Adobe in the mid-1990s and now governed by the OpenType Specification (part of the ISO/IEC 14496-22 standard, "Open Font Format"). OpenType extends the earlier TrueType format by adding support for advanced typographic features, broader Unicode coverage, and multiple outline formats within a single container.

An OpenType font file (.otf, .ttf) is a binary container of structured tables, each encoding a different aspect of the font's data.

Core Tables

cmap — Character to Glyph Mapping The cmap table is the bridge between Unicode code points and the font's internal glyph IDs. It contains one or more subtables, the most important being Format 4 (for BMP characters, U+0000–U+FFFF) and Format 12 (for full Unicode, including supplementary characters). When a renderer needs to display a character, it looks up the code point in cmap to get a glyph ID, then uses other tables to render that glyph.

GSUB — Glyph Substitution The GSUB table enables glyph substitution rules — replacing one or more glyph IDs with others. This is how typographic features like ligatures, small capitals, contextual alternates, and stylistic sets work. GSUB rules are organized into feature tags (4-character codes) and applied based on the script and language of the text.

liga → Standard Ligatures     (fi → fi, fl → fl)
smcp → Small Capitals         (a → ᴀ)
calt → Contextual Alternates  (context-sensitive glyph swaps)
onum → Oldstyle Figures       (3 → ³ styled digits)

GPOS — Glyph Positioning The GPOS table defines positioning adjustments — moving glyphs relative to each other for kerning, mark attachment (diacritic positioning), and cursive attachment. The kern feature historically used a separate kern table, but modern fonts use GPOS for more precise and contextual kerning.

CFF vs. TrueType Outlines

OpenType supports two outline formats:

Format Extension Developer Curve Type
TrueType outlines .ttf Apple/Microsoft Quadratic Bézier splines
CFF (PostScript) outlines .otf Adobe Cubic Bézier curves

TrueType fonts include hinting instructions for pixel-grid alignment at small sizes. CFF fonts rely on the font rasterizer's autohinting. At high resolutions (Retina/HiDPI), the difference is negligible; at 12–16px, hinting quality can be visually significant.

Variable Fonts

OpenType 1.8 introduced variable fonts (also known as OpenType Font Variations), allowing a single font file to encode a continuous design space along one or more axes:

  • wght — Weight (100–900)
  • wdth — Width (condensed to expanded)
  • ital — Italic (upright to italic)
  • Custom axes (e.g., optical size opsz, x-height xhgt)
/* Variable font usage in CSS */
@font-face {
  font-family: "MyVariable";
  src: url("font.woff2") format("woff2-variations");
  font-weight: 100 900;
}
h1 { font-weight: 650; }  /* Any value in the supported range */

Quick Facts

Property Value
Standard OpenType Specification / ISO/IEC 14496-22
File extensions .otf (CFF), .ttf (TrueType), .woff2 (web)
Unicode mapping table cmap
Glyph substitution table GSUB (ligatures, small caps, contextual alternates)
Glyph positioning table GPOS (kerning, mark attachment)
Outline formats TrueType (quadratic) and CFF (cubic Bézier)
Variable fonts OpenType 1.8+ (design axes: weight, width, etc.)

Términos relacionados

Más en Tipografía