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
Introduction to structured concurrency in Swift: continuations, tasks, and cancellation 14 January, 2021 This article is a part of my se...
New
First poster: bot
Extracting WhatsApp messages from an iOS backup - Yasoob Khalid. Hi everyone! :wave: I was recently exploring how to get a local backup ...
New
First poster: bot
Ouch, Safari on iOS can overlap multiple full-screen videos. I just discovered an annoying behavior of Safari on iOS: full-screen videos...
New
First poster: bot
Design the next iPhone. Apple is running out of ideas and needs your help.
New
New
First poster: bot
It’s not fast, but it’s free—and it runs locally on pocket-sized hardware.
New
CommunityNews
Raw identifiers, backtraces, task naming, and more.
New
CommunityNews
A week ago, I knew absolutely nothing about Swift. Today, I have a working iOS app sitting on my Mac and my test device
New
CommunityNews
‎RidePods – The World’s First Earbuds-Controlled Motorcycle Racing Game RidePods brings a brand-new way to experience motorcycle racing....
New
CommunityNews
The XNU kernel is the basis of Apple’s operating systems. Although labeled as a hybrid kernel, it is found to generally operate in a mono...
New

Other popular topics Top

New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
PragmaticBookshelf
Create efficient, elegant software tests in pytest, Python's most powerful testing framework. Brian Okken @brianokken Edited by Kat...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
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
Get the comprehensive, insider information you need for Rails 8 with the new edition of this award-winning classic. Sam Ruby @rubys ...
New
PragmaticBookshelf
Fight complexity and reclaim the original spirit of agility by learning to simplify how you develop software. The result: a more humane a...
New
CommunityNews
Open-source implementation of the classic GTA engine now running directly in your browser. Experience the reVC technology demo on DOS.Zon...
New