mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 08:22:08 +08:00
49 lines
964 B
C++
49 lines
964 B
C++
#ifndef _FONT_FILE_H
|
|
#define _FONT_FILE_H
|
|
|
|
class CFontEngine;
|
|
class CFont;
|
|
|
|
//-------------------------------------------------------------------------------------------------------------------------------
|
|
// CFontFile
|
|
//-------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
class CFontFile
|
|
{
|
|
public:
|
|
|
|
virtual ~CFontFile();
|
|
|
|
// Ñîçäàåì íîâûé îáúåêò CFont, äëÿ äàííîãî FontFile.
|
|
virtual CFont *MakeFont() = 0;
|
|
|
|
// Ñ÷åò÷èê ññûëîê. Óäàëÿåì îáúåêò åñëè ñ÷åò÷èê ðàâåí 0.
|
|
void AddRef();
|
|
void Release();
|
|
|
|
CStringW GetFontPath() const
|
|
{
|
|
return m_wsFileName;
|
|
}
|
|
|
|
long GetFontIndex() const
|
|
{
|
|
return m_lIndex;
|
|
}
|
|
|
|
protected:
|
|
|
|
CFontFile(wchar_t *wsFileName, long lIndex);
|
|
|
|
private:
|
|
|
|
CStringW m_wsFileName; // Ïóòü ê ôàéëó
|
|
long m_lIndex; // Íîìåð øðèôòà â ôàéëå
|
|
|
|
int m_nRef; // Ñ÷åòê÷èê ññûëîê
|
|
|
|
friend class CFontEngine;
|
|
};
|
|
|
|
#endif /* _FONT_FILE_H */
|