Bug 481144 - [Cocoa] Text lowered badly on Widgets in Preference and
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>
4 files changed
tree: fa8642752048f5f8dae1787c7e1b4e3654f70596
  1. bundles/
  2. examples/
  3. features/
  4. local-build/
  5. tests/
  6. .gitignore
  7. pom.xml
  8. README.md
README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

Information regarding source code management, builds, coding standards, and more.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Contact:

Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!