- wxFont font(fontSize, wxDEFAULT, fontStyle, fontWeight, underlined, fontFaceName, encoding);
+ int fontFamily = wxFONTFAMILY_DEFAULT;
+ if (HasFontFamily())
+ fontFamily = GetFontFamily();
+
+ wxFont font(fontSize, fontFamily, fontStyle, fontWeight, underlined, fontFaceName, encoding);