• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to get a condensed San Francisco UIFont?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to get a condensed San Francisco UIFont?
      • From: Kevin Meaney <email@hidden>
    • Re: How to get a condensed San Francisco UIFont?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: AVMetadataItem key
  • Next by Date: Re: How to get a condensed San Francisco UIFont?
  • Previous by thread: Re: Custom UIView receiving no touch events?
  • Next by thread: Re: How to get a condensed San Francisco UIFont?
  • Index(es):
    • Date
    • Thread