The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K…

Follow publication

Member-only story

UI Programming

Add Curved Text to Your Apps

How to properly add some curved text in your app

Riccardo Cipolleschi
The Startup
Published in
6 min readNov 24, 2020

Another week, another feature for our app. This week I had to make some research about how to add some curved text to our app.

I searched a lot and end up on different resources: from an official (but outdated) Apple example with CoreText, to a post on Stack Overflow written in Swift 2, 3, and 4. However, none of them offered a straightforward, easy to follow, mathematically sound approach.

I made several experiments, trials, and errors, before reaching this solution. I had to properly understand several concepts of how the text can be rendered on the screen and it could be useful to write them on (digital) paper for both the future me and anyone who could need it.

A caveat before starting: this article contains a bit of math, basic geometry, and some concepts of calculus, but nothing extremely complex. I tried to simplify them with graphs and to limit them to the minimum. Don’t be scared!

The Goal

What we want is to draw some text, with custom fonts and colors, on a curved line, rotating the letters so that the result will look like this.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

The Startup
The Startup

Published in The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Riccardo Cipolleschi
Riccardo Cipolleschi

Written by Riccardo Cipolleschi

Hey there, I’m Riccardo. Software engineer at Meta. I have a passion for iOS and I love to share my knowledge with others.

Responses (4)

Write a response