Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: core/fpdfapi/fpdf_font/cpdf_cidfont.cpp

Issue 2376153004: Move core/fpdfapi/include to core/fpdfapi (Closed)
Patch Set: Rebase to master Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp ('k') | core/fpdfapi/fpdf_font/cpdf_font.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/cpdf_modulemgr.h"
12 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" 13 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h"
13 #include "core/fpdfapi/fpdf_font/cpdf_fontencoding.h" 14 #include "core/fpdfapi/fpdf_font/cpdf_fontencoding.h"
14 #include "core/fpdfapi/fpdf_font/font_int.h" 15 #include "core/fpdfapi/fpdf_font/font_int.h"
15 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" 16 #include "core/fpdfapi/fpdf_font/ttgsubtable.h"
16 #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" 17 #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h"
17 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" 18 #include "core/fpdfapi/fpdf_parser/cpdf_array.h"
18 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" 19 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h"
19 #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" 20 #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.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
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
27 const struct CIDTransform { 27 const struct CIDTransform {
28 uint16_t cid; 28 uint16_t cid;
29 uint8_t a; 29 uint8_t a;
30 uint8_t b; 30 uint8_t b;
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp ('k') | core/fpdfapi/fpdf_font/cpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698