#include "inc/Main.h"
#include "inc/CmapCache.h"
#include "inc/Face.h"
#include "inc/TtfTypes.h"
#include "inc/TtfUtil.h"
usingnamespacegraphite2;
const void * bmp_subtable(const Face::Table & cmap)
{ … }
const void * smp_subtable(const Face::Table & cmap)
{ … }
template <unsigned int (*NextCodePoint)(const void *, unsigned int, int *),
uint16 (*LookupCodePoint)(const void *, unsigned int, int)>
bool cache_subtable(uint16 * blocks[], const void * cst, const unsigned int limit)
{ … }
CachedCmap::CachedCmap(const Face & face)
: … { … }
CachedCmap::~CachedCmap() throw()
{ … }
uint16 CachedCmap::operator [] (const uint32 usv) const throw()
{
if ((m_isBmpOnly && usv > 0xFFFF) || (usv > 0x10FFFF))
return 0;
const uint32 block = 0xFFFF & (usv >> 8);
if (m_blocks[block])
return m_blocks[block][usv & 0xFF];
return 0;
};
operator bool()
DirectCmap::DirectCmap(const Face & face)
: … { … }
uint16 DirectCmap::operator [] (const uint32 usv) const throw()
{ … }
operator bool()