惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
B
Blog
V
V2EX
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
博客园 - 聂微东
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
J
Java Code Geeks
H
Help Net Security
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
D
Docker
L
LangChain Blog
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
WordPress大学
WordPress大学
V
Visual Studio Blog

Michael Tsai

Michael Tsai - Blog - Taphouse 1.5 Michael Tsai - Blog - StopTheMadness Pro 26 Michael Tsai - Blog - Mac External Display Support Reference Michael Tsai - Blog - Bartender Pro Michael Tsai - Blog - ARC Overhead in Swift Sorting Michael Tsai - Blog - Iris 1.0 Michael Tsai - Blog - Halide Mark III Michael Tsai - Blog - !Camera Michael Tsai - Blog - Project Indigo Michael Tsai - Blog - Unpro Camera Michael Tsai - Blog - Iris Rejected From the App Store Michael Tsai - Blog - OpenAI Model’s Proof of Erdős Unit Distance Problem Michael Tsai - Blog - Apps for YouTube℠™®•! Michael Tsai - Blog - Google’s Intelligent Search Box Michael Tsai - Blog - Apple Asks Supreme Court to Review Epic Ruling Michael Tsai - Blog - Stats Visualization in Apple Sports Michael Tsai - Blog - Cleve Moler, RIP Michael Tsai - Blog - Steve Jobs in Exile Michael Tsai - Blog - Leaving CloudKit Michael Tsai - Blog - Lawsuits Claim OpenAI and Perplexity Shared User Data for Advertising Michael Tsai - Blog - Inkwell Rejected From the App Store Michael Tsai - Blog - Hijacking Apps Using Archive Utility Michael Tsai - Blog - Core Data Lab 3.0 Michael Tsai - Blog - Updating Shared Shortcuts Michael Tsai - Blog - Apple vs. Indian Antitrust Regulator Michael Tsai - Blog - Apple’s 2026 Accessibility Feature Preview Michael Tsai - Blog - How Fake Contacts Can Fix Dictation’s Proper Noun Problems Michael Tsai - Blog - Fantastical at 15 Michael Tsai - Blog - Fortnite Returns to the App Store Except in Australia Michael Tsai - Blog - Kickstart 1.0
Michael Tsai - Blog - Rewriting Apple’s TrueType Hinting ...
Michael J. Tsai · 2026-06-13 · via Michael Tsai

Scott Perry:

My team rewrote Apple's TrueType hinting interpreter in Swift, ask me anything.

[…]

I feel like naming just one would be a disservices to all of the features that made this effort possible (C interop, generics, noncopyable/nonescapable types) but at the end of the day I think the star of the show was the optimizer; despite being faster than the code it replaced, the new code is super readable and that was only possible because the optimizer was able to completely eliminate all of our abstractions.

The new version is faster, but the main motivation was security concerns.

Dmitrii Kalianov:

Is hinting useful/being used in the days of hi-dpi displays? I was under impression that Apple switched to grayscale anti-aliasing and ditched hinting.

Scott Perry:

For the most part hinting isn’t really necessary anymore, but thanks to being Turing-complete it has been Hyrum’s law-ed by at least one CJK font that uses hinting to lay out strokes in its characters.

Alex Rosenberg:

There were three major TrueType implementations at Apple IIRC:

  • The original 68K one
  • A rewrite for Copland that lived with ATS/ATSUI after Copland was cancelled
  • iPhone shipped one derived from heavily-modified FreeType that was current until today

Scott Perry:

One of the axioms for this project was that I wanted my team to write the most boring code possible—nearly identical structurally to the code it was replacing, because to do otherwise would introduce binary compatibility risk. The other axiom was 100% test coverage for all new code as it landed, with the same units testing both interpreters.

Rosyna Keller:

Is the font parsing code itself still C++?

Scott Perry:

There is also a “Safe Font Parser” for WebKit in Lockdown Mode, but it supports a subset of all the myriad features provided by font formats.

Previously:

2 Comments