- Added the workaround to pin the window to desktop in Vista/7 with Aero.

- Added !RainmeterSetTransparency, !RainmeterShowFade, !RainmeterHideFade, !RainmeterToggleFade.

- Added the function to log the installed font families to the log file when Debug=1 is set.

- Added the workaround for issue 145. The wrong drawing position was fixed when AntiAlias=0 is set.
This commit is contained in:
spx
2010-03-20 19:40:30 +00:00
parent 015062bddb
commit 06ec730bfd
15 changed files with 1453 additions and 621 deletions

View File

@ -717,4 +717,60 @@ std::wstring StringToProper(std::wstring str)
return str;//return the converted string
}
/*
** EnumerateInstalledFontFamilies
**
** Static helper to log all installed font families.
**
*/
void CMeterString::EnumerateInstalledFontFamilies()
{
INT fontCount;
InstalledFontCollection fontCollection;
if (Ok == fontCollection.GetLastStatus())
{
fontCount = fontCollection.GetFamilyCount();
if (fontCount > 0)
{
INT fontFound;
FontFamily* fontFamilies = new FontFamily[fontCount];
if (Ok == fontCollection.GetFamilies(fontCount, fontFamilies, &fontFound))
{
std::wstring fonts;
for (INT i = 0; i < fontCount; i++)
{
WCHAR familyName[LF_FACESIZE];
if (Ok == fontFamilies[i].GetFamilyName(familyName))
{
fonts += familyName;
}
else
{
fonts += L"***";
}
fonts += L", ";
}
LSLog(LOG_DEBUG, L"Rainmeter", fonts.c_str());
}
else
{
LSLog(LOG_DEBUG, L"Rainmeter", L"Failed to enumerate installed font families: GetFamilies() failed.");
}
delete [] fontFamilies;
}
else
{
LSLog(LOG_DEBUG, L"Rainmeter", L"There are no installed font families!");
}
}
else
{
LSLog(LOG_DEBUG, L"Rainmeter", L"Failed to enumerate installed font families: InstalledFontCollection() failed.");
}
}
// EOF