Properties
Update Font init method to directly use the system font
when possible.
Prior to this commit OSX 10.11 and higher (systems that use
the San Francisco font) can render with unusual spacing. The
root cause seems to be that the system font has an unusual
baseline when a system font is manipulated or obtained by
name.
Specifically:
- Calling `NSFont.systemFontOfSize` will return a font that
renders correctly.
- Calling `NSFont.boldSystemFontOfSize` will return a font
that renders correctly.
- Calling `NSFont.systemFontOfSize` followed by `NSFontManager
.convertFont` will return a font that renders too low.
- Calling `NSFont.fontWithName(".SF NS Text")` will return
a font that sometimes renders too low (things seem to
consistently go wrong when it's called after a
`convertFont` call).
The `Font.init` now attempts to deduce if the font requested
is actually a system font and use direct system font handles.
This update also seems to fix issue 486734.
Change-Id:Ic613f72b911822385dfb9f0b32f82d8a5d895c77
Signed-off-by: pwebb@pivotal.io
Signed-off-by: Lakshmi Shanmugam <lshanmug@in.ibm.com>