| 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_type1font.h" | 7 #include "core/fpdfapi/fpdf_font/cpdf_type1font.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_font/font_int.h" | 9 #include "core/fpdfapi/fpdf_font/font_int.h" |
| 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 if (m_Base14Font == 12) | 95 if (m_Base14Font == 12) |
| 96 m_BaseEncoding = PDFFONT_ENCODING_ADOBE_SYMBOL; | 96 m_BaseEncoding = PDFFONT_ENCODING_ADOBE_SYMBOL; |
| 97 else if (m_Base14Font == 13) | 97 else if (m_Base14Font == 13) |
| 98 m_BaseEncoding = PDFFONT_ENCODING_ZAPFDINGBATS; | 98 m_BaseEncoding = PDFFONT_ENCODING_ZAPFDINGBATS; |
| 99 else if (m_Flags & PDFFONT_NONSYMBOLIC) | 99 else if (m_Flags & PDFFONT_NONSYMBOLIC) |
| 100 m_BaseEncoding = PDFFONT_ENCODING_STANDARD; | 100 m_BaseEncoding = PDFFONT_ENCODING_STANDARD; |
| 101 } | 101 } |
| 102 return LoadCommon(); | 102 return LoadCommon(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 int CPDF_Type1Font::GlyphFromCharCodeExt(FX_DWORD charcode) { | 105 int CPDF_Type1Font::GlyphFromCharCodeExt(uint32_t charcode) { |
| 106 if (charcode > 0xff) { | 106 if (charcode > 0xff) { |
| 107 return -1; | 107 return -1; |
| 108 } | 108 } |
| 109 int index = m_ExtGID[(uint8_t)charcode]; | 109 int index = m_ExtGID[(uint8_t)charcode]; |
| 110 if (index == 0xffff) { | 110 if (index == 0xffff) { |
| 111 return -1; | 111 return -1; |
| 112 } | 112 } |
| 113 return index; | 113 return index; |
| 114 } | 114 } |
| 115 | 115 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 m_GlyphIndex[charcode] = 0xffff; | 394 m_GlyphIndex[charcode] = 0xffff; |
| 395 } | 395 } |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ | 398 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ |
| 399 if (!bCoreText) { | 399 if (!bCoreText) { |
| 400 FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256); | 400 FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256); |
| 401 } | 401 } |
| 402 #endif | 402 #endif |
| 403 } | 403 } |
| OLD | NEW |