- case FF_MODERN:
- fontFamily = wxMODERN;
- break;
-
- case FF_DECORATIVE:
- fontFamily = wxDECORATIVE;
- break;
-
- default:
- fontFamily = wxSWISS;
- }
-
- // weight and style
- int fontWeight = wxNORMAL;
- switch ( logFont->lfWeight )
- {
- case FW_LIGHT:
- fontWeight = wxLIGHT;
- break;
-
- default:
- case FW_NORMAL:
- fontWeight = wxNORMAL;
- break;
-
- case FW_BOLD:
- fontWeight = wxBOLD;
- break;
- }
-
- int fontStyle = logFont->lfItalic ? wxITALIC : wxNORMAL;
-
- bool fontUnderline = logFont->lfUnderline != 0;
-
- wxString fontFace = logFont->lfFaceName;
-
- // remember that 1pt = 1/72inch
- int height = abs(logFont->lfHeight);
-
-#if wxUSE_SCREEN_DPI
- HDC dc = ::GetDC(NULL);
- static const int ppInch = GetDeviceCaps(dc, LOGPIXELSY);
- ::ReleaseDC(NULL, dc);
-#else
- static const int ppInch = 96;
-#endif
- int fontPoints = (int) (((72.0*((double)height))/(double) ppInch) + 0.5);