Extract this function from wxWidgetCocoaImpl::SetFont() to allow its reuse. No changes, this is a pure refactoring.