From d601e0efd878abedf77c99759ea5b484469c6223 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Fri, 22 May 2015 03:12:41 +0400 Subject: [PATCH] Fix OS X compilation with wxOSX_USE_ATSU_TEXT==1 Not all wxNativeFontInfo::Init calls were changed to pass the strike-through parameter, add it. Also 'strikethrough' is not an existing enum member in the system headers (unlike e.g. 'bold' and 'italic'). As such the strike-through property can't be stored in the QD Style member. Both compile errors were introduced in 79fb4e22. --- src/osx/carbon/font.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index ef25652ecc..8eaafca8f7 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -360,6 +360,7 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size) wxFontStyle fontstyle = wxFONTSTYLE_NORMAL; wxFontWeight fontweight = wxFONTWEIGHT_NORMAL; bool underlined = false; + bool strikethrough = false; if ( style & bold ) fontweight = wxFONTWEIGHT_BOLD ; @@ -370,7 +371,8 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size) if ( style & underline ) underlined = true ; - m_info.Init(fontSize,wxFONTFAMILY_DEFAULT,fontstyle,fontweight,underlined, + m_info.Init(fontSize,wxFONTFAMILY_DEFAULT,fontstyle, + fontweight,underlined, strikethrough, wxMacMakeStringFromPascal( qdFontName ), wxFONTENCODING_DEFAULT); } } @@ -1088,8 +1090,6 @@ void wxNativeFontInfo::EnsureValid() m_qdFontStyle |= italic; if (m_underlined) m_qdFontStyle |= underline; - if (m_strikethrough) - m_qdFontStyle |= strikethrough; // we try to get as much styles as possible into ATSU