Files
core/PdfReader/Src/BuiltinFont.h
Ilya.Kirillov 65d72ae4ec Убраны лишние файлы. Все файлы сконвертированы в UTF8.
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62550 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-21 00:02:55 +03:00

46 lines
1.0 KiB
C++

#ifndef _PDF_READER_BUILT_INFONT_H
#define _PDF_READER_BUILT_INFONT_H
namespace PdfReader
{
struct BuiltinFont;
class BuiltinFontWidths;
//------------------------------------------------------------------------
struct BuiltinFontWidth
{
char *sName;
unsigned short unWidth;
BuiltinFontWidth *pNext;
};
struct BuiltinFont
{
char *sName;
char **ppDefaultBaseEncoding;
short nAscent;
short nDescent;
short arrBBox[4];
BuiltinFontWidth *pWidths;
int nSize;
};
//------------------------------------------------------------------------
static bool BuiltinFontGetWidth(BuiltinFont *pFont, char *sName, unsigned short *punWidth)
{
for (int nIndex = 0; nIndex < pFont->nSize; nIndex++)
{
BuiltinFontWidth oWitdh = pFont->pWidths[nIndex];
if (!strcmp(oWitdh.sName, sName))
{
*punWidth = oWitdh.unWidth;
return true;
}
}
return false;
}
}
#endif // _PDF_READER_BUILT_INFONT_H