Use Arial font (if installed) when FontFace is invalid.

This commit is contained in:
Brian Ferguson 2012-09-25 17:37:28 -06:00
parent 7a79e77051
commit 71025aaf51

View File

@ -282,7 +282,17 @@ void CMeterString::Initialize()
}
else
{
m_Font = new Gdiplus::Font(FontFamily::GenericSansSerif (), size, style);
// Use Arial if installed, else use a generic font
FontFamily fFamily(L"Arial");
if (fFamily.IsAvailable())
{
m_Font = new Gdiplus::Font(&fFamily, size, style);
}
else
{
m_Font = new Gdiplus::Font(FontFamily::GenericSansSerif(), size, style);
}
}
Status status = m_Font->GetLastStatus();