CommunityNews

CommunityNews

Swift at Apple: Migrating the TrueType Hinting Interpreter

TrueType is a widely used vector font standard for rendering text in web pages, PDFs, operating systems, and applications. Familiar fonts like Helvetica, Garamond, and Monaco are all built on TrueType outlines. The format specifies a hinting interpreter intended to help outlines rasterize faithfully on low-resolution displays. Modern high-resolution displays enable beautiful typography from outlines alone, but TrueType fonts that need hinting to render legibly remain in use and we continue to support them.

Font parsers process data from untrusted sources, making the TrueType hinting interpreter a security-critical attack surface. To make the format more resilient on Apple platforms, we rewrote its hinting interpreter from C to memory-safe Swift for the Fall 2025 releases. In addition to memory safety, we also improved performance: on average, our Swift interpreter runs 13% faster than the C interpreter it replaced.

To accompany this post, we’ve also published the source code of the Swift TrueType hinting interpreter. We hope sharing our experience helps others doing similar work in Swift.

Read in full here:

https://www.swift.org/blog/migrating-truetype-hinting-to-swift/

Where Next?

Popular Ios topics Top

First poster: bot
Structured concurrency is a new term for most Swift developers. This is an attempt to decipher its meaning.
New
First poster: bot
Cisco IOS Scripting with TCL Configuration Guide, Cisco IOS XE Amsterdam 17.x - Cisco IOS XE Scripting with Tcl [Cisco IOS XE Amsterdam...
New
First poster: bot
Design the next iPhone. Apple is running out of ideas and needs your help.
New
First poster: bot
New iPhone software will bring lock screen changes, passkeys, and app updates.
New
First poster: bot
Swift was always going to be part of the OS. Someone complained that putting Swift in the OS has only made things worse for developers. ...
New
CommunityNews
Raw identifiers, backtraces, task naming, and more.
New
CommunityNews
A reaction and assorted observations about Apple’s September 9 Awe-Dropping event.
New
CommunityNews
TL;DR: My iPhone 16 Pro Max produces garbage output when running MLX LLMs. An iPhone 15 Pro runs the same code perfectly. A MacBook Pro ...
New
CommunityNews
Apple is letting users build their own Wallet passes in iOS 27. After 14 years of PassKit, the supply-side problem is finally being solve...
New
CommunityNews
TrueType is a widely used vector font standard for rendering text in web pages, PDFs, operating systems, and applications. Familiar fonts...
New

Other popular topics Top

PragmaticBookshelf
Instantly view the changes you make to an app with stateful hot reload, and define a declarative UI in the same language as the app logic...
New
PragmaticBookshelf
Andy and Dave wrote this influential, classic book to help their clients create better software and rediscover the joy of coding. Almost ...
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
PragmaticBookshelf
From finance to artificial intelligence, genetic algorithms are a powerful tool with a wide array of applications. But you don't need an ...
New
PragmaticBookshelf
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
New
PragmaticBookshelf
25 puzzles that will make you a better C programmer by challenging your knowledge of the language, and explaining the technical details o...
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New
PragmaticBookshelf
Quickly turn complex problems into simple, working solutions using functional programming, safe concurrency, and the expressive tools of ...
New