- case wxSCRIPT: ff_family = FF_SCRIPT ;
- ff_face = "Script" ;
- break ;
- case wxDECORATIVE: ff_family = FF_DECORATIVE;
- break;
- case wxROMAN: ff_family = FF_ROMAN;
- ff_face = "Times New Roman" ;
- break;
- case wxTELETYPE:
- case wxMODERN: ff_family = FF_MODERN;
- ff_face = "Courier New" ;
- break;
- case wxSWISS: ff_family = FF_SWISS;
- ff_face = "Arial";
- break;
- case wxDEFAULT:
- default: ff_family = FF_SWISS;
- ff_face = "MS Sans Serif" ;
- }
-
- if (font->GetStyle() == wxITALIC || font->GetStyle() == wxSLANT)
- ff_italic = 1;
- else
- ff_italic = 0;
-
- if (font->GetWeight() == wxNORMAL)
- ff_weight = FW_NORMAL;
- else if (font->GetWeight() == wxLIGHT)
- ff_weight = FW_LIGHT;
- else if (font->GetWeight() == wxBOLD)
- ff_weight = FW_BOLD;
-
- // Have to get screen DC Caps, because a metafile will return 0.
- HDC dc2 = ::GetDC(NULL);
- int ppInch = ::GetDeviceCaps(dc2, LOGPIXELSY);
- ::ReleaseDC(NULL, dc2);
-
- // New behaviour: apparently ppInch varies according to
- // Large/Small Fonts setting in Windows. This messes
- // up fonts. So, set ppInch to a constant 96 dpi.
- ppInch = 96;
-
-#if wxFONT_SIZE_COMPATIBILITY
- // Incorrect, but compatible with old wxWindows behaviour
- int nHeight = (font->GetPointSize()*ppInch/72);
-#else
- // Correct for Windows compatibility
- int nHeight = - (font->GetPointSize()*ppInch/72);
-#endif
+ wxRGBToColour(m_fontData.fontColour, chooseFontStruct.rgbColors);
+ m_fontData.chosenFont = wxCreateFontFromLogFont(&logFont);
+ m_fontData.EncodingInfo().facename = logFont.lfFaceName;
+ m_fontData.EncodingInfo().charset = logFont.lfCharSet;