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/include/cpdf_font.h" | 7 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_font/cpdf_truetypefont.h" | 9 #include "core/fpdfapi/fpdf_font/cpdf_truetypefont.h" |
10 #include "core/fpdfapi/fpdf_font/cpdf_type1font.h" | 10 #include "core/fpdfapi/fpdf_font/cpdf_type1font.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 478 |
479 const FX_CHAR* CPDF_Font::GetAdobeCharName(int iBaseEncoding, | 479 const FX_CHAR* CPDF_Font::GetAdobeCharName(int iBaseEncoding, |
480 const CFX_ByteString* pCharNames, | 480 const CFX_ByteString* pCharNames, |
481 int charcode) { | 481 int charcode) { |
482 ASSERT(charcode >= 0 && charcode < 256); | 482 ASSERT(charcode >= 0 && charcode < 256); |
483 if (charcode < 0 || charcode >= 256) | 483 if (charcode < 0 || charcode >= 256) |
484 return nullptr; | 484 return nullptr; |
485 | 485 |
486 const FX_CHAR* name = nullptr; | 486 const FX_CHAR* name = nullptr; |
487 if (pCharNames) | 487 if (pCharNames) |
488 name = pCharNames[charcode]; | 488 name = pCharNames[charcode].c_str(); |
489 if ((!name || name[0] == 0) && iBaseEncoding) | 489 if ((!name || name[0] == 0) && iBaseEncoding) |
490 name = PDF_CharNameFromPredefinedCharSet(iBaseEncoding, charcode); | 490 name = PDF_CharNameFromPredefinedCharSet(iBaseEncoding, charcode); |
491 return name && name[0] ? name : nullptr; | 491 return name && name[0] ? name : nullptr; |
492 } | 492 } |
OLD | NEW |