Berry Blue
Berry Blue

Reputation: 16482

Use system font with CGContextSelectFont

How do I find out the name of the system font to use with CGContextSelectFont on iOS?

Upvotes: 3

Views: 1058

Answers (1)

Christian Di Lorenzo
Christian Di Lorenzo

Reputation: 3612

This should do the trick:

[UIFont systemFontOfSize:12].fontName

However, I wouldn't recommend using the method CGContextSelectFont(), since it will be deprecated in iOS 7 on Sept 18th. Here's what the docs say:

(Deprecated in iOS 7.0. Use Core Text instead.)

Upvotes: 2

Related Questions