VFont – iOS Variable Font Integration
VFont is a brilliant library which simplifies working with variable fonts in iOS projects.
If you’ve never heard about variable fonts, I’d recommend reading this article Variable fonts in real life: how to use and love them by @romashamin
What does the VFont make easier?
First of all, I wondered if variable fonts are supported in iOS. Nowadays, developers use the top-level
UIFont class to work individually with Light, Regular, Medium, Bold, and other font styles. I discovered that VF support had already been added in
iOS 3.2. However, it was implemented using low level code in the
CTFont class in the
CoreText library. This leads to extra work in order to get to variable fonts using
First, you need to add the custom variable font to your project. If you’ve never done this, I recommend reading this tutorial.
Be aware that the font file name can be different from the actual font name! To get the correct full font name, upload the font file to fontgauntlet.com.
// First, you have to get information about the variable font (axes names, IDs, and allowed values). But the current axis value isn't there
Mobile App Development Best Practices – 27.03
iOS Working with percentages in SwiftUI layout Flyweight Design Pattern Improving multiplatform SwiftUI code iOS Concurrency Types Dynamic Features in...
Spoiler View Example – A spoiler feature from Telegram in SwiftUI
An example project for Implementing spoilers in SwiftUI article.
MilitaryJet – Bug-proof Jetpack Compose UI tests
This repo includes production ready samples that showcase my unopinionated way of simply writing military-grade bug-proof Jetpack Compose UI tests....
Mobile App Development Best Practices – 23.03
iOS TextEffects With SwiftUI and Physics MVVM, SwiftUI, Async/Await, and Combine: The Ultimate API Call Dream Team An Aurora Gradient...
Epic launches Unreal Editor for Fortnite and will pay creators 40% of revenue
Epic Games has announced a new payment system for the creators of Fortnite, the popular free-to-play battle royale game.
Circuit – A Compose-driven architecture for Kotlin and Android applications
Circuit is a simple, lightweight, and extensible framework for building Kotlin applications that’s Compose from the ground up. Compose itself...