---
agent:
  instructions: "Search published articles with space-separated keywords. All terms must occur in the article text. Results are Markdown excerpts with canonical links, newest first."
  endpoint: "https://www.zaihua.news/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://www.zaihua.news/docs/api/#agent-search"
---

# 🍏 Apple 用 Swift 重写 TrueType 字体解释器，比 C 版本快 13%

Source: https://www.zaihua.news/article/41929/

[返回新闻流](https://www.zaihua.news/)
2026年6月13日 · 11:45 · [在花新闻](https://www.zaihua.news/about/)

# Apple 用 Swift 重写 TrueType 字体解释器，比 C 版本快 13%

Apple 在 2025 年秋季发布的系统更新中，将 TrueType 字体 hinting 解释器从 C 重写为 Swift。新解释器消除了内存安全隐患，平均运行速度比 C 原版快 13%，且通过像素级对比测试确保渲染结果完全一致。

开发团队大量使用 ~Copyable 值类型、Span 和投影类型等技术，减少了跨语言数据拷贝与动态分发开销。Apple 已将这部分生产级 Swift 代码开源至 GitHub，并计划把迁移经验用于更多 C/C++ 转 Swift 的系统级项目。

[Swift](https://swift.org/blog/migrating-truetype-hinting-to-swift/)

🌸 [在花频道](http://t.me/ZaiHuaPd) · [备用频道](https://t.me/zaihuatg) · [投稿通道](http://t.me/ZaiHuabot)

https://cdn.zaihua.news/main/41929/AQADIA9rG8GZYVF8.jpg

[上一条《凡人修仙传》动画新年番 6 月 13 日在 B站开播 目前超 50 万人在线观看](https://www.zaihua.news/article/41928/)[下一条《云顶之弈》将于 8 月 12 日迁移至虚幻引擎，后续推出独立客户端](https://www.zaihua.news/article/41930/)
