mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Added cache for the fonts.
Fixed a memory leak in the string meter. Changed the library project to use precompiled headers.
This commit is contained in:
@ -40,6 +40,8 @@ public:
|
||||
virtual bool Draw(Gdiplus::Graphics& graphics);
|
||||
virtual void BindMeasure(std::list<CMeasure*>& measures);
|
||||
|
||||
static void FreeFontCache();
|
||||
|
||||
private:
|
||||
enum TEXTSTYLE
|
||||
{
|
||||
@ -83,6 +85,10 @@ private:
|
||||
|
||||
std::vector<std::wstring> m_MeasureNames;
|
||||
std::vector<CMeasure*> m_Measures;
|
||||
|
||||
static std::wstring FontPropertiesToString(Gdiplus::REAL size, Gdiplus::FontStyle style);
|
||||
static std::map<std::wstring, Gdiplus::FontFamily*> c_FontFamilies; // Cache for the font families
|
||||
static std::map<std::wstring, Gdiplus::Font*> c_Fonts; // Cache for the fonts
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user