Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to use Custom Font in UIButton

I am trying to use a custom font in my application, which is of ttf format. In the Project settings, I have addd that font name like below .

enter image description here

And I have added that font in my resources folder like below

enter image description here

And the font Which I am trying to use is this one enter image description here

_enterButton.titleLabel.font =  [UIFont fontWithName:@"Venus Rising" size:45.0];

If I use Arial or some other font, it works fine. But when I am trying to use this font, it is not at all working. Can anyone tell me why ??

like image 960
Perseus Avatar asked Dec 31 '25 01:12

Perseus


2 Answers

I downloaded the font and as I thought it has different name than what is the name of the file. Look at this image.

enter image description here

Also don't forget on adding the name to the Info.plist of your app, under the key "Fonts provided by application". Hope it helps! :)

like image 86
Dominik Hadl Avatar answered Jan 02 '26 14:01

Dominik Hadl


You missed extension of font in info.plist, I mean in Info.plist, "Fonts provided by application" you need to set "Venus Rising.ttf" then your problem will be solved

like image 34
user917256 Avatar answered Jan 02 '26 15:01

user917256



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!