1 /* 2 * PROJECT: ReactOS Font Shell Extension 3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 * PURPOSE: font list cache handling 5 * COPYRIGHT: Copyright 2019 Mark Jansen (mark.jansen@reactos.org) 6 */ 7 8 #pragma once 9 10 11 class CFontInfo 12 { 13 private: 14 CStringW m_Name; 15 CStringW m_File; 16 bool m_FileRead; 17 public: 18 CFontInfo(LPCWSTR name = L""); 19 20 const CStringW& Name() const; 21 const CStringW& File(); 22 const bool Valid() const; 23 }; 24 25 26 class CFontCache 27 { 28 private: 29 CAtlArray<CFontInfo> m_Fonts; 30 31 protected: 32 CFontCache(); 33 34 void Insert(CAtlList<CFontInfo>& fonts, const CStringW& KeyName); 35 void Read(); 36 37 public: 38 size_t Size(); 39 CStringW Name(size_t Index); 40 CStringW Filename(const FontPidlEntry* fontEntry); 41 42 friend class CFontExtModule; 43 }; 44 45 46 extern CFontCache* g_FontCache; 47 48 49