# TrueType

**TrueType** 是由苹果电脑（Apple Computer）设计的一种轮廓字体格式，现已被苹果和微软（Microsoft）两家公司用于各自的操作系统中。每个字形都以一系列点构成的数学描述来存储，正因如此，TrueType 被称为轮廓字体格式；字形可缩放至任意大小而不损失品质。<sup>[1](https://learn.microsoft.com/en-us/typography/truetype/)</sup> 该技术包含两部分：字体文件本身，以及 TrueType 光栅化器（rasterizer）——将字体描述转换为屏幕和打印机用位图的软件。<sup>[1](https://learn.microsoft.com/en-us/typography/truetype/)</sup>

| 关键事实 | 详情 |
|---|---|
| 起源 | 由苹果电脑设计；代号“Bass”，后改称“Royal”；授权给微软<sup>[2](https://learn.microsoft.com/en-us/typography/truetype/history)</sup> |
| 首次随系统发布 | Macintosh 上的 System 7，1991 年 5 月；Windows 3.1，1992 年 4 月<sup>[2](https://learn.microsoft.com/en-us/typography/truetype/history)</sup> |
| 轮廓格式 | 二次贝塞尔曲线（quadratic Bézier curves），由曲线上点和曲线外点定义；PostScript 轮廓使用三次贝塞尔曲线<sup>[3](https://arxiv.org/abs/2502.00250)</sup> |
| 文件结构 | 'sfnt' 容器中的表；必需的表包括 'cmap'、'glyf'、'head'、'hhea'、'hmtx'、'loca'、'maxp'、'name' 和 'post'<sup>[4](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)</sup> |
| 微调（Hinting） | 一台基于栈的虚拟机，拥有 200 多个操作码，执行字体中存储的指令，在扫描转换之前对轮廓进行网格拟合<sup>[5](https://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-2.html)</sup> |
| 专利 | 苹果的 TrueType 字节码微调专利已于 2010 年 5 月在全球到期<sup>[6](https://freetype.org/patents.html)</sup> |
| 后继者 | OpenType 以相同的 'sfnt' 容器扩展 TrueType，并增加 CFF 轮廓、布局表和可变字体<sup>[7](https://learn.microsoft.com/en-us/typography/opentype/spec/overview)</sup> |

## 历史

该格式由苹果创造，目的是避免向其他字体技术所有者支付按字体计算的版税，同时解决 Adobe Type 1 格式的一些技术局限。其设计追求存储和处理上的高效、可扩展，并与字体行业已在使用的微调方法兼容，从而使现有字体可以方便地转换为 TrueType。一直在寻找轮廓格式以解决类似问题的微软，同意取得该技术的使用授权。<sup>[2](https://learn.microsoft.com/en-us/typography/truetype/history)</sup>

**采用。** 苹果于 1991 年 5 月在 System 7 中加入了完整的 TrueType 支持。微软于 1992 年 4 月首次在 [Windows 3.1](https://www.edgepedia.org/zh/windows-3-1) 中纳入 TrueType，随后为提高效率并修复缺陷重写了光栅化器；新版本 1.5 首次随 [Windows NT 3.1](https://www.edgepedia.org/zh/windows-nt-3-1) 发布，[Windows 95](https://www.edgepedia.org/zh/windows-95) 和 NT 3.51 中的版本为 1.66，增加了字体平滑——技术上是灰度光栅化。<sup>[2](https://learn.microsoft.com/en-us/typography/truetype/history)</sup> 一份当时关于桌面出版业的记述指出，微软虽然获得了苹果 TrueType 的授权，但也认识到，在 1989 年发布公告到 1992 年春季 Windows 3.1 出货之间大约两年半的时间里，它在技术和字体品质上将需要追赶 Adobe 成熟的字体技术。<sup>[8](https://history.computer.org/annals/dtp/fw/index.pdf)</sup> 苹果免费授权微软使用 TrueType，以帮助确保其广泛采用。<sup>[9](https://www.windowscentral.com/software-apps/windows-11/microsoft-turns-50-facts-you-probably-didnt-know-about-windows)</sup>

苹果后来的 TrueType GX 作为 Mac OS 上 QuickDraw GX 图形架构的一部分扩展了该格式，增加了仅限苹果的样式变体（Style Variations）和行布局管理器（Line Layout Manager）扩展。<sup>[2](https://learn.microsoft.com/en-us/typography/truetype/history)</sup>

## 文件格式

TrueType 字体文件将所有信息存储在一系列表中，每个表为特定目的而设计，前面是一个必须出现在文件最前面的字体目录；其余的表可以任意顺序出现。<sup>[4](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)</sup> 表以 uint32 类型的四字符标签标识，较短的名字用尾随空格填充。<sup>[4](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)</sup>

任何有效的 TrueType 字体都需要九个表：'cmap'（字符到字形映射）、'glyf'（字形数据）、'head'（字体头）、'hhea'（水平头）、'hmtx'（水平度量）、'loca'（位置索引）、'maxp'（最大值配置）、'name'（命名）和 'post'（PostScript）。<sup>[4](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)</sup> 可选表支持微调及其他功能，包括 'cvt '（控制值）、'fpgm'（字体程序）、'prep'（控制值程序）和 'gasp'（网格拟合与扫描转换过程）。<sup>[4](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)</sup><sup> • </sup><sup>[10](https://learn.microsoft.com/en-us/typography/opentype/spec/otff)</sup>

苹果区分“TrueType 字体”（指特定的轮廓技术）与“sfnt 承载字体”（指使用相同封装格式的任何字体，包括纯位图字体和 OpenType 字体）。非正式场合下，任何 sfnt 承载字体常被称为 TrueType 字体，但严格来说这不准确。<sup>[4](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)</sup>

字形轮廓由一个或多个轮廓线组成，轮廓线由直线和二次贝塞尔样条定义的曲线构成，使用两种点：曲线上的点和曲线外的点，后者充当控制点。<sup>[3](https://arxiv.org/abs/2502.00250)</sup><sup> • </sup><sup>[11](https://learn.microsoft.com/en-us/typography/opentype/otspec170/ttch01)</sup> 由于二次曲线在数学上比 [PostScript](https://www.edgepedia.org/zh/postscript) 的三次曲线简单，某些形状用更少的点即可描述；一个圆在 PostScript 中需要十二个点，而在 TrueType 中只需八个。<sup>[12](https://www.truetype-typography.com/articles/ttvst1.htm)</sup>

## 光栅化与微调

字体引擎将字形的母轮廓转换为位图分三步：将轮廓缩放至请求的大小，根据其关联指令对缩放后的轮廓进行网格拟合，再对网格拟合后的轮廓进行扫描转换以生成位图。<sup>[13](https://developer-mdn.apple.com/fonts/TrueType-Reference-Manual/RM02/Chap2.html)</sup> 缩放过程中，点从与设备无关的 em 单位（FUnits，em 空间中最小的可测距离）移动到与设备相关的像素坐标。<sup>[13](https://developer-mdn.apple.com/fonts/TrueType-Reference-Manual/RM02/Chap2.html)</sup><sup> • </sup><sup>[4](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)</sup>

**微调**是精确规定哪些像素被点亮、以在小尺寸和低分辨率下创建最佳字符位图的方法。微调指令是添加到字体中的数学指令，用于在特定尺寸下扭曲字符轮廓；若不进行网格拟合，像素坐标只是简单地向上或向下取整，这在低分辨率下会产生笔画粗细不均、衬线细节丢失等缺陷。<sup>[14](https://learn.microsoft.com/en-us/typography/truetype/hinting)</sup>

TrueType 的方法将智能放在微调指令中而非光栅化器中：对轮廓的所有改动都通过字体中包含的指令执行。这带来三个结果。大部分计算发生在字体制作期间而非运行时，使 TrueType 类似于编译型语言，而解释器型技术则在执行时完成工作。字体厂商精确控制最终外观，因为微调由他们施加。工具厂商可以改进微调技术，而用户无需购买新的光栅化器或打印机 ROM。<sup>[14](https://learn.microsoft.com/en-us/typography/truetype/hinting)</sup>

指令集是一台基于栈的虚拟机，拥有 200 多个操作码，大多为几何操作。<sup>[5](https://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-2.html)</sup> 通过这些命令，设计者可以将字形轮廓上的任意点移动任意小的距离或任意大的距离，以点亮或熄灭像素，提供堪比位图编辑器的控制力；命令甚至可以让不同尺寸产生不同形状，低尺寸和高尺寸阈值（切入尺寸）决定哪些尺寸受影响。<sup>[14](https://learn.microsoft.com/en-us/typography/truetype/hinting)</sup> 微软的微调教程指出，其字体在低于 8 ppem 和高于 2048 ppem 时关闭微调。<sup>[15](https://learn.microsoft.com/en-us/typography/truetype/hinting-tutorial/basic-global-tables)</sup>

微调还支持光学缩放——在每个尺寸下调整字形形状以获得正确外观，最高至 2048 ppem——以及非线性缩放——在线性缩放会导致间距或粗细问题的尺寸下加宽或收窄字形的宽度和侧边距。独立的投影向量和移动向量允许对斜笔画进行精细控制，这使 TrueType 字体能够高保真地表现斜体和倾斜字形。<sup>[14](https://learn.microsoft.com/en-us/typography/truetype/hinting)</sup>

## 专利与 FreeType

苹果持有 TrueType 字节码微调若干方面的专利。1999 年，苹果告知 FreeType 项目，其库侵犯了与 TrueType 微调相关的专利；FreeType 默认禁用了字节码解释器，后来改进为仅禁用受专利保护的指令，同时处理其余 95% 以上的指令，并开发了完全不需要微调指令的自动微调器（auto-hinter）。<sup>[16](https://freetype.org/history.html)</sup>

所有与字节码微调相关的专利已于 2010 年 5 月在全球到期，此后不再需要禁用解释器；FreeType 2.4 版默认启用了它。受影响的专利包括 US5155805、US5159668 和 US5325479，涵盖在光栅输出设备上显示数字字体时移动控制点和操作轮廓的方法。与微软 ClearType 颜色滤波相关的专利于 2019 年 8 月到期。<sup>[6](https://freetype.org/patents.html)</sup>

## OpenType 与遗产

OpenType 是作为原始 TrueType 格式的扩展而开发的，使用相同的 'sfnt' 容器结构，并保持与原始 TrueType 规范下创建的字体兼容。它增加了 CFF 和 CFF2 轮廓格式、用于字形替换和定位的 OpenType 布局表、彩色字形以及字体变体——字形轮廓或其他数据沿设计轴参数连续变化。<sup>[7](https://learn.microsoft.com/en-us/typography/opentype/spec/overview)</sup> 使用 TrueType 轮廓的 OpenType 字体复用 TrueType 的表 'glyf'、'loca'、'cvt '、'fpgm'、'prep' 和 'gasp'。<sup>[10](https://learn.microsoft.com/en-us/typography/opentype/spec/otff)</sup> TrueType 轮廓的变体机制最早由苹果在 TrueType GX 中引入，部分 OpenType 变体表改编自苹果早期的规范。<sup>[17](https://learn.microsoft.com/en-us/typography/opentype/otspec180/otvaroverview)</sup> 这一发展脉络始于 TrueType Open——微软为多语言排版所做的扩展——继而发展到与 Adobe 合作的 TrueType Open 第二版，最终成为 OpenType 计划。<sup>[2](https://learn.microsoft.com/en-us/typography/truetype/history)</sup><sup> • </sup><sup>[14](https://learn.microsoft.com/en-us/typography/truetype/hinting)</sup>

**安全。** 字体解析一直是一个反复出现的攻击面。微软 2015 年的公告 MS15-044 描述了 CVE-2015-1671，这是 TrueType 字体解析中的一个远程代码执行漏洞，影响 Windows、.NET Framework、Office、Lync 和 Silverlight，可通过特制文档或嵌入 TrueType 字体的网页加以利用。<sup>[18](https://learn.microsoft.com/en-us/security-updates/securitybulletins/2015/ms15-044)</sup> 更早的 2011 年安全公告涉及一个 TrueType 字体解析漏洞，可能允许权限提升。<sup>[19](https://learn.microsoft.com/en-us/security-updates/securityadvisories/2011/2639658)</sup>

## References

1. [TrueType overview, Microsoft Learn](https://learn.microsoft.com/en-us/typography/truetype/)
2. [A brief history of TrueType, Microsoft Learn](https://learn.microsoft.com/en-us/typography/truetype/history)
3. [Fujioka, T., Tanaka, G. (2025). Transformer-Based Vector Font Classification Using Different Font Formats: TrueType versus PostScript. arXiv.](https://arxiv.org/abs/2502.00250)
4. [Font Tables, TrueType Reference Manual, Apple Developer](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)
5. [FreeType Glyph Conventions](https://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-2.html)
6. [FreeType & Patents, FreeType Project](https://freetype.org/patents.html)
7. [OpenType specification overview (OpenType 1.9.1), Microsoft Learn](https://learn.microsoft.com/en-us/typography/opentype/spec/overview)
8. [Computer History Museum, Annals of the History of Computing: desktop publishing issue](https://history.computer.org/annals/dtp/fw/index.pdf)
9. [10 facts you probably didn't know about Windows, Windows Central](https://www.windowscentral.com/software-apps/windows-11/microsoft-turns-50-facts-you-probably-didnt-know-about-windows)
10. [The OpenType Font File (OpenType 1.9.1), Microsoft Learn](https://learn.microsoft.com/en-us/typography/opentype/spec/otff)
11. [TrueType fundamentals (OpenType 1.7), Microsoft Learn](https://learn.microsoft.com/en-us/typography/opentype/otspec170/ttch01)
12. [TrueType & PostScript Type 1: What's the difference?](https://www.truetype-typography.com/articles/ttvst1.htm)
13. [Font Engine, TrueType Reference Manual, Apple Developer](https://developer-mdn.apple.com/fonts/TrueType-Reference-Manual/RM02/Chap2.html)
14. [TrueType hinting, Microsoft Learn](https://learn.microsoft.com/en-us/typography/truetype/hinting)
15. [TrueType hinting tutorial: Basic global tables, Microsoft Learn](https://learn.microsoft.com/en-us/typography/truetype/hinting-tutorial/basic-global-tables)
16. [FreeType History, FreeType Project](https://freetype.org/history.html)
17. [OpenType Font Variations overview (OpenType 1.8), Microsoft Learn](https://learn.microsoft.com/en-us/typography/opentype/otspec180/otvaroverview)
18. [Microsoft Security Bulletin MS15-044, Microsoft Learn](https://learn.microsoft.com/en-us/security-updates/securitybulletins/2015/ms15-044)
19. [Microsoft Security Advisory 2639658, Microsoft Learn](https://learn.microsoft.com/en-us/security-updates/securityadvisories/2011/2639658)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Data formats and serialization › Text, encodings, and archives

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/truetype

English original: https://www.edgepedia.org/truetype
