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/fpdf_font/cpdf_cidfont.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" | 12 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" |
| 13 #include "core/fpdfapi/fpdf_font/cpdf_fontencoding.h" |
13 #include "core/fpdfapi/fpdf_font/font_int.h" | 14 #include "core/fpdfapi/fpdf_font/font_int.h" |
14 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" | |
15 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" | 15 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" |
16 #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" | 16 #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" |
17 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 17 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
18 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" | 18 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" |
19 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" | 19 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" |
20 #include "core/fpdfapi/include/cpdf_modulemgr.h" | 20 #include "core/fpdfapi/include/cpdf_modulemgr.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 |
(...skipping 818 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 |