Swift at Apple: Migrating the TrueType hinting interpreter
DASD
182 points
71 comments
June 12, 2026
Related Discussions
Found 5 related stories in 106.6ms across 10,324 title embeddings via pgvector HNSW
- Expanding Swift's IDE Support frizlab · 100 pts · April 08, 2026 · 60% similar
- Swift 6.3 ingve · 307 pts · March 26, 2026 · 53% similar
- Show HN: TTF-DOOM – A raycaster running inside TrueType font hinting 4RH1T3CT0R · 40 pts · April 06, 2026 · 52% similar
- Swift 6.3 Released frizlab · 12 pts · March 24, 2026 · 51% similar
- Ask HN: Those building Swift apps without touching Xcode, what is your workflow? p5v · 13 pts · May 03, 2026 · 48% similar
Discussion Highlights (13 comments)
pjmlp
During the State of Platform keynote, on the subject of Swift adoption across macOS, several examples were given, not only TrueType engine. RIS is happening across all OS levels, if the keynote is to be believed.
troupo
I think these are the types of things Apple should've focused on instead of half-heartedly barging ahead with SwiftUI and breaking the language in the process
saagarjha
Interesting that this is published under the MIT, rather than Apple’s more favorite Apache 2, license
mrpippy
The author discussed this a bit on Mastodon as well: https://xoxo.zone/@numist/116716469017975106
weinzierl
Back in 2023 there was talks about Microsoft rewriting the font stuff in Rust for similar reasons Apple is now doing the Swift move. I'm not sure what became of it and if it ever shipped. If anyone knows I'd be curious.
LoganDark
I'm surprised the code has visible LLM smells. Though, I shouldn't be surprised. I hope the important bits are still human-controlled (and the same for Apple's many operating systems that absolutely deserve to remain stable and understood).
airstrike
As much as I enjoyed Swift, one can only wonder what the world would look like if they had gone with Rust as their default language instead.
raphlinus
Welcome to the club of doing high performance text in a memory safe language!
wg0
No mention of AI? Hand written code?
AndriyKunitsyn
What's funny is from 2023 (I think), macOS just draws the UI unhinted. You have a 1080p display and you don't want to see the letters in the UI blurred to death? Tough luck, 1080p is incompatible with macOS, everybody needs "retina", and nobody cares that Windows and all Linux DEs look on 1080p just fine. It looks like this hinter will be used only in rendering PDFs, because that's where they test the performance.
jacquesgt
If you want to help improve the security of OS software through the magic of memory safe languages, the team that did this work is hiring: https://jobs.apple.com/en-us/search?search=Spear&sort=releva... Knowledge of Swift not required. If you know your way around OS software, can reason about the security of the code you write, and are excited about writing exhaustively tested software, we’d love to talk to you. We’re hiring for roles in kernel/systems and userspace. Like the Platforms SOTU mentioned, we’re using Swift at all layers of the software stack now. https://www.youtube.com/live/yl2jsIoMfDU I had the pleasure of leading the effort to ship Swift in the Secure Enclave back in 2022. Now I have multiple teams working on accelerating the transition to memory safe languages. We’re showing that with good planning and a relentless focus on testing, we can improve security, performance, and functionality. And we get to have a ton of fun working with some amazing colleagues. It’s the most enjoyable and impactful work I’ve ever done in my career.
comex
Beware: As of a few months ago, when I tried to use the lifetime features shown off in this post, I ran into constant compiler crashes with very simple programs, until I gave up and wrote off the features as unusable. This happened on both stable and nightly compilers. I guess they work well enough for this TrueType interpreter, but I suspect they’re using a narrow subset of what the features are supposed to support. Or maybe things have been fixed very recently. That said, I’m looking forward to using Swift lifetimes once they actually work!
ks2048
So, hinting only takes place at low resolutions, I believe. How often is it used, eg viewing “typical” PDFs on “typical” screens?