<div dir="ltr">Found this: <a href="http://stackoverflow.com/questions/39395237/why-is-nsfontmanager-availablemembersoffontfamily-crashing-in-xcode-8-gm">http://stackoverflow.com/questions/39395237/why-is-nsfontmanager-availablemembersoffontfamily-crashing-in-xcode-8-gm</a><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 8, 2016 at 8:37 AM, Jens Persson <span dir="ltr"><<a href="mailto:jens@bitcycle.com" target="_blank">jens@bitcycle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>It crashes runtime except when the given string is not an existing font family name, in which case it returns nil (as expected).</div><div><br></div><div>So I'm unable to use it.</div><div><br></div><div>Here's a REPL session demo of the issue, but it's the same in Xcode 8 and 8.1 beta 1 (haven't tried any other versions):</div><div><br></div><div>Welcome to Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38). Type :help for assistance.<br></div><div> 1> import AppKit</div><div> 2> NSFontManager.shared().<wbr>availableMembers(ofFontFamily: "Blahblah")</div><div>$R0: [[Any]]? = nil</div><div> 3> NSFontManager.shared().<wbr>availableMembers(ofFontFamily: "Georgia")</div><div>Execution interrupted. Enter code to recover and continue.</div><div>Enter LLDB commands to investigate (type :help for assistance.)</div><div> 4> NSFontManager.shared().<wbr>availableMembers(ofFontFamily: "Times")</div><div>Execution interrupted. Enter code to recover and continue.</div><div>Enter LLDB commands to investigate (type :help for assistance.)</div><div> 5> NSFontManager.shared().<wbr>availableMembers(ofFontFamily: "Timeeess")</div><div>$R1: [[Any]]? = nil</div><div> 6> </div><div><br></div><div>Any ideas and/or workarounds?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>/Jens</div></font></span></div>
</blockquote></div><br></div>