I want to add GillSans-Bold font to a UILabel. I have set it in the xib file , and I'm also setting it up in my class as follows :
[label setFont:[UIFont fontWithName:@"GillSans-Bold" size:18]];
But , it doesn't seem to work for me. Any suggestions ?
Does the font GillSans-Bold exist? Check if
[UIFont fontWithName:@"GillSans-Bold" size:18]
returns anUIFont
, notnull
.iPhone 4.3 doesn't have Gill Sans, but iPad has it since 3.2.1.
See this list comparing fonts for iPad 4.3 and iPhone 4.3. To be sure, this is how you get the list of fonts available on your device:
If it says
then
[UIFont fontWithName:@"GillSans-Bold" size:18]
should return a valid font.For this to be working I had to add this font in my project directory , and added this font in the Info.Plist file