I have custom fonts in my project. But i detected some of the fonts that comes also with XCode have the same problem. For unknown reason the if i set accents to a capital letter (which is very common in Spain, like Álgreba) the top of the text is cutting of.
For other fonts is more clear since i can't even see half accent. I can do a trick which is with UILabel setting a height constraint, but this trick doesn't apply to UIButton or to the title of the navigationBar. I tried also in UILabel calling sizeToFiT with no succeed.
i had same problem using a button with an image and custom font. this worked out
btn.contentVerticalAlignment = .fill
btn.contentMode = .center
btn.imageView?.contentMode = .scaleAspectFit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With