| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "core/fpdfapi/fpdf_font/font_int.h" | 7 #include "core/fpdfapi/fpdf_font/font_int.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" | 9 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" |
| 10 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" | 10 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" |
| (...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1577 } | 1577 } |
| 1578 void CPDF_CIDFont::LoadSubstFont() { | 1578 void CPDF_CIDFont::LoadSubstFont() { |
| 1579 m_Font.LoadSubst(m_BaseFont, !m_bType1, m_Flags, m_StemV * 5, m_ItalicAngle, | 1579 m_Font.LoadSubst(m_BaseFont, !m_bType1, m_Flags, m_StemV * 5, m_ItalicAngle, |
| 1580 g_CharsetCPs[m_Charset], IsVertWriting()); | 1580 g_CharsetCPs[m_Charset], IsVertWriting()); |
| 1581 } | 1581 } |
| 1582 void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray, | 1582 void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray, |
| 1583 CFX_DWordArray& result, | 1583 CFX_DWordArray& result, |
| 1584 int nElements) { | 1584 int nElements) { |
| 1585 int width_status = 0; | 1585 int width_status = 0; |
| 1586 int iCurElement = 0; | 1586 int iCurElement = 0; |
| 1587 int first_code = 0, last_code; | 1587 int first_code = 0; |
| 1588 int last_code = 0; |
| 1588 FX_DWORD count = pArray->GetCount(); | 1589 FX_DWORD count = pArray->GetCount(); |
| 1589 for (FX_DWORD i = 0; i < count; i++) { | 1590 for (FX_DWORD i = 0; i < count; i++) { |
| 1590 CPDF_Object* pObj = pArray->GetElementValue(i); | 1591 CPDF_Object* pObj = pArray->GetElementValue(i); |
| 1591 if (!pObj) | 1592 if (!pObj) |
| 1592 continue; | 1593 continue; |
| 1593 | 1594 |
| 1594 if (CPDF_Array* pArray = pObj->AsArray()) { | 1595 if (CPDF_Array* pArray = pObj->AsArray()) { |
| 1595 if (width_status != 1) | 1596 if (width_status != 1) |
| 1596 return; | 1597 return; |
| 1597 | 1598 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 | 1667 |
| 1667 const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const { | 1668 const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const { |
| 1668 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) | 1669 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) |
| 1669 return nullptr; | 1670 return nullptr; |
| 1670 | 1671 |
| 1671 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch( | 1672 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch( |
| 1672 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs), | 1673 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs), |
| 1673 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform); | 1674 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform); |
| 1674 return found ? &found->a : nullptr; | 1675 return found ? &found->a : nullptr; |
| 1675 } | 1676 } |
| OLD | NEW |