35: maRangeCodes(
std::move(aRangeCodes))
37, m_bMicrosoftSymbolMap(bMicrosoftSymbolMap)
60static unsigned GetUShort(
const unsigned char* p) {
return((
p[0]<<8) |
p[1]);}
72 if( (nSubTables <= 0) || (nSubTables > (
nLength - 24) / 8) )
75 for (
const unsigned char*
p = pCmap + 4; --nSubTables >= 0;
p += 8)
81 if (nPlatform == 3 && nEncoding == 0)
94 : mpImplFontCharMap(
std::move( pIFCMap ))
135 else if (cMin > rRanges[nRangeMin])
136 nCount -= cMin - rRanges[nRangeMin];
143 nCount -= rRanges[nRangeMax + 1] - cMax - 1;
146 for(
int i = nRangeMin;
i <= nRangeMax;
i+=2 )
147 nCount += rRanges[
i + 1] - rRanges[
i];
155 if (nRange==0 && cChar < mpImplFontCharMap->maRangeCodes[0])
157 return ((nRange & 1) == 0);
201 for (
size_t i = 0;
i < rRanges.size();
i += 2)
206 nCharIndex += cLast - cFirst;
207 else if( cChar >= cFirst )
208 return nCharIndex + (cChar - cFirst);
220 for (
size_t i = 0;
i < rRanges.size();
i += 2)
237 int nMid = rRanges.size() / 2;
238 int nUpper = rRanges.size() - 1;
239 while( nLower < nUpper )
241 if (cChar >= rRanges[nMid])
245 nMid = (nLower + nUpper + 1) / 2;
sal_UCS4 GetFirstChar() const
Get the first character in the font character map.
sal_UCS4 GetCharFromIndex(int nCharIndex) const
Get the character at a particular index in the font character map.
FontCharMap()
A new FontCharMap is created based on a "default" map, which includes all codepoints in the Unicode B...
ImplFontCharMapRef mpImplFontCharMap
bool HasChar(sal_UCS4) const
Does the font character map include the UCS4 character?
int GetIndexFromChar(sal_UCS4 cChar) const
Get the index of a particular character in the font character map.
int CountCharsInRange(sal_UCS4 cMin, sal_UCS4 cMax) const
Returns the number of chars supported by the font, which are inside the unicode range from cMin to cM...
sal_UCS4 GetPrevChar(sal_UCS4 cChar) const
Get the previous character in the font character map.
int findRangeIndex(sal_UCS4) const
sal_UCS4 GetLastChar() const
Get the last character in the font character map.
static FontCharMapRef GetDefaultMap(bool bMicrosoftSymbolMap)
Get the default font character map.
virtual ~FontCharMap() override
bool IsDefaultMap() const
Determines if the font character map is the "default".
sal_UCS4 GetNextChar(sal_UCS4 cChar) const
Get the next character in the font character map.
bool isMicrosoftSymbolMap() const
int GetCharCount() const
Get the number of characters in the font character map.
virtual ~ImplFontCharMap() override
std::vector< sal_uInt32 > maRangeCodes
ImplFontCharMap(bool bMicrosoftSymbolMap, std::vector< sal_uInt32 > aRangeCodes)
bool isDefaultMap() const
static ImplFontCharMapRef const & getDefaultMap(bool bMicrosoftSymbolMap=false)
const std::vector< sal_uInt32 > aDefaultUnicodeRanges
static ImplFontCharMapRef g_pDefaultImplFontCharMap
const std::vector< sal_uInt32 > aDefaultSymbolRanges
bool HasMicrosoftSymbolCmap(const unsigned char *pCmap, int nLength)
static unsigned GetUShort(const unsigned char *p)
tools::SvRef< ImplFontCharMap > ImplFontCharMapRef