mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 03:42:47 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62550 954022d7-b5bf-4e40-9824-e11837661b57
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
#ifndef _PDF_READER_FONT_FILE_BASE_H
|
|
#define _PDF_READER_FONT_FILE_BASE_H
|
|
|
|
namespace PdfReader
|
|
{
|
|
typedef void(*FontFileOutputFunc)(void *pStream, char *sData, int nLen);
|
|
|
|
//------------------------------------------------------------------------
|
|
// CFontFileBase
|
|
//------------------------------------------------------------------------
|
|
|
|
class CFontFileBase
|
|
{
|
|
public:
|
|
|
|
virtual ~CFontFileBase();
|
|
|
|
protected:
|
|
|
|
CFontFileBase(char *sFile, int nLen, bool bFreeFileData);
|
|
|
|
static char *ReadFile(wchar_t *wsFileName, int *pnFileLen);
|
|
|
|
// S = signed / U = unsigned
|
|
// 8/16/32/Var = word length, in bytes
|
|
// BE = big endian
|
|
int GetS8(int nPos, bool *pbSuccess);
|
|
int GetU8(int nPos, bool *pbSuccess);
|
|
int GetS16BE(int nPos, bool *pbSuccess);
|
|
int GetU16BE(int nPos, bool *pbSuccess);
|
|
int GetS32BE(int nPos, bool *pbSuccess);
|
|
unsigned int GetU32BE(int nPos, bool *pbSuccess);
|
|
unsigned int GetUVarBE(int nPos, int nSize, bool *pbSuccess);
|
|
|
|
bool CheckRegion(int nPos, int nSize);
|
|
|
|
protected:
|
|
|
|
unsigned char *m_sFileData;
|
|
unsigned char *m_sFile;
|
|
int m_nLen;
|
|
bool m_bFreeFileData;
|
|
|
|
};
|
|
}
|
|
|
|
#endif // _PDF_READER_FONT_FILE_BASE_H
|