Questions tagged fonts

Explore the latest questions and answers asked by our top developers.

Fix line spacing in custom font in SwiftUI

I am using custom font (Catamaran) and it seems like it has big space between lines in it. For example I have this code: Text("Example text that has big space between lines") .lineSpacing(0) .padding(.horizontal) .font(Font.custom(FontNameManager.Catamaran.bold, size: 24.0)) .foregroundColor(.white) .multilineTextAlignment(.center) and it looks like this: As you can see it doesn’t have zero space between lines […]

By Libor Zapletal
Categorised as fonts, ios, line-spacing, swiftui, text Tagged , , , ,

How to apply bold and italics for the applied custom font in the UILabel?

For the UILabel I have applied a custom font and i tried to apply bold and italics for that custom font. But I am unable to achieve it. For default font i am able to achieve it but for custom font i couldn’t. Is it possible to achieve it. The code snippet is provided below: […]

By T Eswaran
Categorised as Uncategorised Tagged , , ,

iOS 13: How can I tweak the leading / descend / line height of a custom font in UIKit / SwiftUI

I’m using a custom font and somehow the rendering screws up the line height, potentially because of misconfigured descent or leading (?), so that g’s and j’s are cut off in the last line of the rendered text. I think it might be a problem with this particular font, because Sketch is also exposing similar […]

By marius
Categorised as fonts, ios, swift, uifont, uikit Tagged , , , ,

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us