fix font styles

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton 2004-09-26 16:34:12 +00:00
parent 5a9b59346b
commit 810d800e3c

View File

@ -122,15 +122,13 @@ pascal OSStatus wxFontDialogEventHandler( EventHandlerCallRef inHandlerCallRef,
theFont.SetFamily(wxDEFAULT);
//TODOTODO: Get other styles? Font weight?
theFont.SetStyle(0 +
((fontstyle & bold) ? wxFONTFLAG_BOLD : 0) +
((fontstyle & italic) ? wxFONTFLAG_ITALIC : 0) +
((fontstyle & underline) ? wxFONTFLAG_UNDERLINED : 0)
);
theFont.SetStyle(((fontstyle & italic) ? wxFONTSTYLE_ITALIC : 0));
theFont.SetWeight((fontstyle & bold) ? wxBOLD : wxNORMAL);
theFont.SetUnderlined(((fontstyle & underline) ? true : false));
//for debugging
//wxPrintf(wxT("FaceName:%s\nSize:%i\n"), theFont.GetFaceName().c_str(), theFont.GetPointSize());
//wxPrintf(wxT("FaceName:%s\nSize:%i\nStyle:%i\n"), theFont.GetFaceName().c_str(), theFont.GetPointSize(),
//theFont.GetStyle());
//phew!! We're done - set the chosen font
theFontData.SetChosenFont(theFont);