a brief primer on OpenType in UIKit (with swift)

Hi everyone, i wrote this blog post the other day about programmatically activating opentype features in UIKit (for iOS) and using Swift. I hadn't seen any post that gently introduces attributedstrings and uifont (and, in my case, activating opentype features), so i wrote it up after i had reached a tipping point of learning, but i wanted to get everyone's feedback here on the post, the technique or anything like that.

I found that, except a 2013 wwdc video, most of this stuff is hard to learn or discover on your own, so mostly it's meant as a starting off point, but again, i'd welcome any feedback you have.



  • Awesome! When my fonts get licensed for iOS apps, the developers often want alternate character or number styles. Until now, I didn't know whether this was possible programmatically on iOS (the developers didn't seem to think it was possible) and have resorted to creating modified versions with certain alternate glyphs as the default. Hopefully, I can point them to this now.
  • glad to be of assistance! i first started looking into opentype support during the transition between iOS3.2 and iOS4 and it was a real mixed bag back then (core text, for example, worked only on the iPad, not the phone even if both were running iOS3.2). I was dubious it would work even now, but i was heartened to learn that most of what i needed was possible even if opaque, so i guess a few years really does make a difference.
  • Chris LozosChris Lozos Posts: 1,080
Sign In or Register to comment.