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/font/font_int.h" |
8 | 8 |
9 #include "core/fpdfapi/cmaps/cmap_int.h" | 9 #include "core/fpdfapi/cmaps/cmap_int.h" |
10 #include "core/fpdfapi/cpdf_modulemgr.h" | 10 #include "core/fpdfapi/cpdf_modulemgr.h" |
11 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" | 11 #include "core/fpdfapi/font/ttgsubtable.h" |
12 #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" | 12 #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" |
13 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" | 13 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" |
14 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" | 14 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" |
15 #include "core/fpdfapi/fpdf_parser/cpdf_simple_parser.h" | 15 #include "core/fpdfapi/fpdf_parser/cpdf_simple_parser.h" |
16 #include "core/fxcrt/fx_ext.h" | 16 #include "core/fxcrt/fx_ext.h" |
17 #include "core/fxge/fx_freetype.h" | 17 #include "core/fxge/fx_freetype.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 const FX_CHAR* const g_CharsetNames[CIDSET_NUM_SETS] = { | 21 const FX_CHAR* const g_CharsetNames[CIDSET_NUM_SETS] = { |
22 nullptr, "GB1", "CNS1", "Japan1", "Korea1", "UCS"}; | 22 nullptr, "GB1", "CNS1", "Japan1", "Korea1", "UCS"}; |
23 | 23 |
24 | |
25 class CPDF_PredefinedCMap { | 24 class CPDF_PredefinedCMap { |
26 public: | 25 public: |
27 const FX_CHAR* m_pName; | 26 const FX_CHAR* m_pName; |
28 CIDSet m_Charset; | 27 CIDSet m_Charset; |
29 CIDCoding m_Coding; | 28 CIDCoding m_Coding; |
30 CPDF_CMap::CodingScheme m_CodingScheme; | 29 CPDF_CMap::CodingScheme m_CodingScheme; |
31 uint8_t m_LeadingSegCount; | 30 uint8_t m_LeadingSegCount; |
32 uint8_t m_LeadingSegs[4]; | 31 uint8_t m_LeadingSegs[4]; |
33 }; | 32 }; |
34 | 33 |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 m_EmbeddedCount = pFontGlobals->m_EmbeddedToUnicodes[charset].m_Count; | 774 m_EmbeddedCount = pFontGlobals->m_EmbeddedToUnicodes[charset].m_Count; |
776 } | 775 } |
777 | 776 |
778 CIDSet CharsetFromOrdering(const CFX_ByteStringC& ordering) { | 777 CIDSet CharsetFromOrdering(const CFX_ByteStringC& ordering) { |
779 for (size_t charset = 1; charset < FX_ArraySize(g_CharsetNames); ++charset) { | 778 for (size_t charset = 1; charset < FX_ArraySize(g_CharsetNames); ++charset) { |
780 if (ordering == g_CharsetNames[charset]) | 779 if (ordering == g_CharsetNames[charset]) |
781 return CIDSetFromSizeT(charset); | 780 return CIDSetFromSizeT(charset); |
782 } | 781 } |
783 return CIDSET_UNKNOWN; | 782 return CIDSET_UNKNOWN; |
784 } | 783 } |
OLD | NEW |