• 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
Re: 10.11 Issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 10.11 Issues


  • Subject: Re: 10.11 Issues
  • From: Ron Reuter <email@hidden>
  • Date: Sun, 14 Jun 2015 17:10:53 -0500

Doug,

> NSFont.monospacedDigitsSystemFontOfSize(SIZE weight:WEIGHT)

That’s the Swift code for creating a font on the fly that has the desired glyphs. In ObjC, an example usage would be

NSFont *myFont = [NSFont monospacedDigitSystemFontOfSize:12.0 weight:NSFontWeightRegular];

You would then have to assign myFont to a control or otherwise cause it to be drawn to see how it looks.
While this compiles on my machine using Xcode beta 7, I can’t test it yet.
Curiously, while you might think NSFontWeightRegular would be backed by an integer, it is actually a CGFloat!

— Ron

On Jun 14, 2015, at 4:29 PM, Doug Adams <email@hidden> wrote:

The switch mentioned in the video is:

NSFont.monospacedDigitsSystemFontOfSize(SIZE weight:WEIGHT)

How does one use that in ASOC? Or does one?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: 10.11 Issues
      • From: Doug Adams <email@hidden>
References: 
 >Re: 10.11 Issues (From: Doug Adams <email@hidden>)
 >Re: 10.11 Issues (From: Ron Reuter <email@hidden>)
 >Re: 10.11 Issues (From: Doug Adams <email@hidden>)
 >Re: 10.11 Issues (From: Doug Adams <email@hidden>)

  • Prev by Date: Re: 10.11 Issues
  • Next by Date: Re: 10.11 Issues
  • Previous by thread: Re: 10.11 Issues
  • Next by thread: Re: 10.11 Issues
  • Index(es):
    • Date
    • Thread