Chromium Code Reviews| 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 "font_int.h" | 7 #include "core/src/fpdfapi/fpdf_font/font_int.h" |
| 8 | 8 |
| 9 #include "core/include/fpdfapi/fpdf_module.h" | 9 #include "core/include/fpdfapi/fpdf_module.h" |
| 10 #include "core/include/fpdfapi/fpdf_page.h" | 10 #include "core/include/fpdfapi/fpdf_page.h" |
| 11 #include "core/include/fpdfapi/fpdf_resource.h" | 11 #include "core/include/fpdfapi/fpdf_resource.h" |
| 12 #include "core/include/fxcrt/fx_ext.h" | 12 #include "core/include/fxcrt/fx_ext.h" |
| 13 #include "core/include/fxge/fx_freetype.h" | 13 #include "core/include/fxge/fx_freetype.h" |
| 14 #include "core/include/fxge/fx_ge.h" | 14 #include "core/include/fxge/fx_ge.h" |
| 15 #include "core/src/fpdfapi/fpdf_cmaps/cmap_int.h" | 15 #include "core/src/fpdfapi/fpdf_cmaps/cmap_int.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1030 return 0; | 1030 return 0; |
| 1031 } | 1031 } |
| 1032 | 1032 |
| 1033 void CPDF_CID2UnicodeMap::Load(CPDF_CMapManager* pMgr, | 1033 void CPDF_CID2UnicodeMap::Load(CPDF_CMapManager* pMgr, |
| 1034 CIDSet charset, | 1034 CIDSet charset, |
| 1035 FX_BOOL bPromptCJK) { | 1035 FX_BOOL bPromptCJK) { |
| 1036 m_Charset = charset; | 1036 m_Charset = charset; |
| 1037 FPDFAPI_LoadCID2UnicodeMap(charset, m_pEmbeddedMap, m_EmbeddedCount); | 1037 FPDFAPI_LoadCID2UnicodeMap(charset, m_pEmbeddedMap, m_EmbeddedCount); |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 #include "ttgsubtable.h" | 1040 #include "core/src/fpdfapi/fpdf_font/ttgsubtable.h" |
|
Tom Sepez
2016/02/17 21:32:26
move to top.
dsinclair
2016/02/17 21:54:00
Done.
| |
| 1041 CPDF_CIDFont::CPDF_CIDFont() : CPDF_Font(PDFFONT_CIDFONT) { | 1041 CPDF_CIDFont::CPDF_CIDFont() : CPDF_Font(PDFFONT_CIDFONT) { |
| 1042 m_pCMap = NULL; | 1042 m_pCMap = NULL; |
| 1043 m_pAllocatedCMap = NULL; | 1043 m_pAllocatedCMap = NULL; |
| 1044 m_pCID2UnicodeMap = NULL; | 1044 m_pCID2UnicodeMap = NULL; |
| 1045 m_pAnsiWidths = NULL; | 1045 m_pAnsiWidths = NULL; |
| 1046 m_pCIDToGIDMap = NULL; | 1046 m_pCIDToGIDMap = NULL; |
| 1047 m_bCIDIsGID = FALSE; | 1047 m_bCIDIsGID = FALSE; |
| 1048 m_bAdobeCourierStd = FALSE; | 1048 m_bAdobeCourierStd = FALSE; |
| 1049 m_pTTGSUBTable = NULL; | 1049 m_pTTGSUBTable = NULL; |
| 1050 FXSYS_memset(m_CharBBox, 0xff, 256 * sizeof(FX_SMALL_RECT)); | 1050 FXSYS_memset(m_CharBBox, 0xff, 256 * sizeof(FX_SMALL_RECT)); |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1716 | 1716 |
| 1717 const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const { | 1717 const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const { |
| 1718 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) | 1718 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) |
| 1719 return nullptr; | 1719 return nullptr; |
| 1720 | 1720 |
| 1721 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch( | 1721 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch( |
| 1722 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs), | 1722 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs), |
| 1723 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform); | 1723 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform); |
| 1724 return found ? &found->a : nullptr; | 1724 return found ? &found->a : nullptr; |
| 1725 } | 1725 } |
| OLD | NEW |