mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Reconciled all changes by Rainy and the branch with MattKing's LocalFont function. The trunk now contains all current code changes.
Added changes to RANDOM function based on Rainy's input. If there were multiple RANDOM statements in multiple CALC measure, they would all get the same random number. Fixed. Added new RANDOM function and LocalFont to the help files and History.htm
This commit is contained in:
@ -109,11 +109,29 @@ void CMeterString::Initialize()
|
||||
if(m_FontFamily) delete m_FontFamily;
|
||||
m_FontFamily = new FontFamily(m_FontFace.c_str());
|
||||
Status status = m_FontFamily->GetLastStatus();
|
||||
//===================================================
|
||||
/* Matt King Code */
|
||||
// It couldn't find the font family
|
||||
// Therefore we look in the privatefontcollection of this meters MeterWindow
|
||||
if(Ok != status)
|
||||
{
|
||||
delete m_FontFamily;
|
||||
m_FontFamily = NULL;
|
||||
m_FontFamily = new FontFamily(m_FontFace.c_str(), m_MeterWindow->GetPrivateFontCollection());
|
||||
status = m_FontFamily->GetLastStatus();
|
||||
|
||||
// It couldn't find the font family: Log it.
|
||||
if(Ok != status)
|
||||
{
|
||||
std::wstring error = L"Error: Couldn't load font family: ";
|
||||
error += m_FontFace;
|
||||
DebugLog(error.c_str());
|
||||
|
||||
delete m_FontFamily;
|
||||
m_FontFamily = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
/* Matt King end */
|
||||
//===================================================
|
||||
|
||||
FontStyle style = FontStyleRegular;
|
||||
|
||||
|
Reference in New Issue
Block a user