| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/cpdf_cidfont.h" | 7 #include "core/fpdfapi/font/cpdf_cidfont.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "core/fpdfapi/cmaps/cmap_int.h" | 12 #include "core/fpdfapi/cmaps/cmap_int.h" |
| 13 #include "core/fpdfapi/cpdf_modulemgr.h" | 13 #include "core/fpdfapi/cpdf_modulemgr.h" |
| 14 #include "core/fpdfapi/fpdf_font/cpdf_fontencoding.h" | 14 #include "core/fpdfapi/font/cpdf_fontencoding.h" |
| 15 #include "core/fpdfapi/fpdf_font/font_int.h" | 15 #include "core/fpdfapi/font/font_int.h" |
| 16 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" | 16 #include "core/fpdfapi/font/ttgsubtable.h" |
| 17 #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" | 17 #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" |
| 18 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" | 18 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" |
| 19 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" | 19 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" |
| 20 #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" | 20 #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" |
| 21 #include "third_party/base/numerics/safe_math.h" | 21 #include "third_party/base/numerics/safe_math.h" |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const uint16_t g_CharsetCPs[CIDSET_NUM_SETS] = {0, 936, 950, 932, 949, 1200}; | 25 const uint16_t g_CharsetCPs[CIDSET_NUM_SETS] = {0, 936, 950, 932, 949, 1200}; |
| 26 | 26 |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) | 843 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) |
| 844 return nullptr; | 844 return nullptr; |
| 845 | 845 |
| 846 const auto* pEnd = g_Japan1_VertCIDs + FX_ArraySize(g_Japan1_VertCIDs); | 846 const auto* pEnd = g_Japan1_VertCIDs + FX_ArraySize(g_Japan1_VertCIDs); |
| 847 const auto* pTransform = std::lower_bound( | 847 const auto* pTransform = std::lower_bound( |
| 848 g_Japan1_VertCIDs, pEnd, CID, | 848 g_Japan1_VertCIDs, pEnd, CID, |
| 849 [](const CIDTransform& entry, uint16_t cid) { return entry.cid < cid; }); | 849 [](const CIDTransform& entry, uint16_t cid) { return entry.cid < cid; }); |
| 850 return (pTransform < pEnd && CID == pTransform->cid) ? &pTransform->a | 850 return (pTransform < pEnd && CID == pTransform->cid) ? &pTransform->a |
| 851 : nullptr; | 851 : nullptr; |
| 852 } | 852 } |
| OLD | NEW |