Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone UIFont boldFont With name

I have looked at the headers for UIFont but it has all class methods and only one instance method and some useless properties. I would like to know how to set the font to have a font name, and bold font weight kinda like [[UIFont alloc] initWithFontName:@"Courier New" weight:@"Bold" size:14];. Thanks for any help in advance!

~Thommy

like image 819
NoodleOfDeath Avatar asked Dec 05 '25 15:12

NoodleOfDeath


1 Answers

I figured out the answer, and that was to use the font-family's bolded version of the font: CourierNewPS-BoldMT and that worked :

I found this out by using the [UIFont fontNamesForFamilyName:@"Courier New"] method which returned an array of all the different variations of Courier New including, Bolded and Italic etc.

like image 153
NoodleOfDeath Avatar answered Dec 07 '25 05:12

NoodleOfDeath



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!