diff options
Diffstat (limited to 'core/fpdfapi/fpdf_font')
-rw-r--r-- | core/fpdfapi/fpdf_font/cpdf_cidfont.cpp | 18 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_font/cpdf_cidfont.h | 1 |
2 files changed, 10 insertions, 9 deletions
diff --git a/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp b/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp index af4121da16..317e6ddb01 100644 --- a/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp +++ b/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp @@ -775,34 +775,36 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, FX_BOOL* pVertGlyph) { const uint8_t* pdata = m_pStreamAcc->GetData() + byte_pos; return pdata[0] * 256 + pdata[1]; } + uint32_t CPDF_CIDFont::GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const { return m_pCMap->GetNextChar(pString, nStrLen, offset); } + int CPDF_CIDFont::GetCharSize(uint32_t charcode) const { return m_pCMap->GetCharSize(charcode); } + int CPDF_CIDFont::CountChar(const FX_CHAR* pString, int size) const { return m_pCMap->CountChar(pString, size); } + int CPDF_CIDFont::AppendChar(FX_CHAR* str, uint32_t charcode) const { return m_pCMap->AppendChar(str, charcode); } + FX_BOOL CPDF_CIDFont::IsUnicodeCompatible() const { - if (!m_pCMap->IsLoaded() || !m_pCID2UnicodeMap || - !m_pCID2UnicodeMap->IsLoaded()) { - return m_pCMap->m_Coding != CIDCODING_UNKNOWN; - } - return TRUE; -} -FX_BOOL CPDF_CIDFont::IsFontStyleFromCharCode(uint32_t charcode) const { - return TRUE; + if (m_pCID2UnicodeMap && m_pCID2UnicodeMap->IsLoaded() && m_pCMap->IsLoaded()) + return TRUE; + return m_pCMap->m_Coding != CIDCODING_UNKNOWN; } + void CPDF_CIDFont::LoadSubstFont() { m_Font.LoadSubst(m_BaseFont, !m_bType1, m_Flags, m_StemV * 5, m_ItalicAngle, g_CharsetCPs[m_Charset], IsVertWriting()); } + void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray, CFX_ArrayTemplate<uint32_t>& result, int nElements) { diff --git a/core/fpdfapi/fpdf_font/cpdf_cidfont.h b/core/fpdfapi/fpdf_font/cpdf_cidfont.h index f1c72c65cf..5abb20f7aa 100644 --- a/core/fpdfapi/fpdf_font/cpdf_cidfont.h +++ b/core/fpdfapi/fpdf_font/cpdf_cidfont.h @@ -61,7 +61,6 @@ class CPDF_CIDFont : public CPDF_Font { const uint8_t* GetCIDTransform(uint16_t CID) const; short GetVertWidth(uint16_t CID) const; void GetVertOrigin(uint16_t CID, short& vx, short& vy) const; - virtual FX_BOOL IsFontStyleFromCharCode(uint32_t charcode) const; protected: int GetGlyphIndex(uint32_t unicodeb, FX_BOOL* pVertGlyph); |