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
.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user