From a8937c394d349759ffd28799f3ec5189dc46d3fb Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 19 Jan 2023 14:20:31 +0100 Subject: [PATCH] always transfer font family (#23158) see #23144 only doing this when no font name was given lead to a test failure in richtextctrltest.cpp RichTextCtrlTestCase::Font --- src/osx/carbon/font.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index 017ab5c21e..dd5e50de73 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -258,15 +258,13 @@ wxFontRefData::wxFontRefData(const wxFontInfo& info) { m_info.Init(); + wxFontFamily family = info.GetFamily(); + if (family == wxFONTFAMILY_DEFAULT) + family = wxFONTFAMILY_SWISS; + SetFamily(family); + if ( info.HasFaceName() ) SetFaceName(info.GetFaceName()); - else - { - wxFontFamily family = info.GetFamily(); - if (family == wxFONTFAMILY_DEFAULT) - family = wxFONTFAMILY_SWISS; - SetFamily(family); - } m_info.SetSizeOrDefault(info.GetFractionalPointSize()); SetNumericWeight(info.GetNumericWeight());