| 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/fpdf_font/font_int.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" | 9 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" |
| 10 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" | 10 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 ? CPDF_CMap::TwoBytes | 433 ? CPDF_CMap::TwoBytes |
| 434 : CPDF_CMap::OneByte; | 434 : CPDF_CMap::OneByte; |
| 435 } | 435 } |
| 436 m_Status = 0; | 436 m_Status = 0; |
| 437 } else { | 437 } else { |
| 438 if (word.GetLength() == 0 || word.GetAt(0) != '<') { | 438 if (word.GetLength() == 0 || word.GetAt(0) != '<') { |
| 439 return; | 439 return; |
| 440 } | 440 } |
| 441 if (m_CodeSeq % 2) { | 441 if (m_CodeSeq % 2) { |
| 442 CMap_CodeRange range; | 442 CMap_CodeRange range; |
| 443 if (CMap_GetCodeRange(range, m_LastWord.AsByteStringC(), word)) { | 443 if (CMap_GetCodeRange(range, m_LastWord.AsStringC(), word)) { |
| 444 m_CodeRanges.Add(range); | 444 m_CodeRanges.Add(range); |
| 445 } | 445 } |
| 446 } | 446 } |
| 447 m_CodeSeq++; | 447 m_CodeSeq++; |
| 448 } | 448 } |
| 449 } | 449 } |
| 450 m_LastWord = word; | 450 m_LastWord = word; |
| 451 } | 451 } |
| 452 | 452 |
| 453 // Static. | 453 // Static. |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 FPDFAPI_LoadCID2UnicodeMap(charset, m_pEmbeddedMap, m_EmbeddedCount); | 788 FPDFAPI_LoadCID2UnicodeMap(charset, m_pEmbeddedMap, m_EmbeddedCount); |
| 789 } | 789 } |
| 790 | 790 |
| 791 CIDSet CharsetFromOrdering(const CFX_ByteString& ordering) { | 791 CIDSet CharsetFromOrdering(const CFX_ByteString& ordering) { |
| 792 for (size_t charset = 1; charset < FX_ArraySize(g_CharsetNames); ++charset) { | 792 for (size_t charset = 1; charset < FX_ArraySize(g_CharsetNames); ++charset) { |
| 793 if (ordering == CFX_ByteStringC(g_CharsetNames[charset])) | 793 if (ordering == CFX_ByteStringC(g_CharsetNames[charset])) |
| 794 return CIDSetFromSizeT(charset); | 794 return CIDSetFromSizeT(charset); |
| 795 } | 795 } |
| 796 return CIDSET_UNKNOWN; | 796 return CIDSET_UNKNOWN; |
| 797 } | 797 } |
| OLD | NEW |