How to get a condensed San Francisco UIFont?
How to get a condensed San Francisco UIFont?
- Subject: How to get a condensed San Francisco UIFont?
- From: David Hoerl <email@hidden>
- Date: Wed, 07 Oct 2015 19:01:12 -0400
I'd like to do is get a condensed - or better yet - a bold (semi-bold)
condensed version of the "San Francisco" system font.
What I propose to do is get a "starter" font:
let font = UIFont.preferredFontForTextStyle(UIFontTextStyleHeadline)
then get the font descriptor:
let fd1 = font.fontDescriptor()
then add a "condensed" attribute:
let fd2 = fd1.fontDescriptorByAddingAttributes[ the magic sauce ]
let finalFont = UIFont(descriptor: fd2, size: 0)
My only problem is I don't know the "magic sauce", and there is a darth
of information on fontDescriptorByAddingAttributes (google it yourself).
I sure would appreciate anyone who can tell me, or point me in the right
direction, so I can find the "magic sauce" formula.
- David
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden