| 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_truetypefont.h" | 7 #include "core/fpdfapi/fpdf_font/cpdf_truetypefont.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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 FXFT_Get_Char_Index(m_Font.GetFace(), unicode); | 105 FXFT_Get_Char_Index(m_Font.GetFace(), unicode); |
| 106 if (m_GlyphIndex[charcode]) { | 106 if (m_GlyphIndex[charcode]) { |
| 107 break; | 107 break; |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 } else if (m_Encoding.m_Unicodes[charcode]) { | 110 } else if (m_Encoding.m_Unicodes[charcode]) { |
| 111 if (bMSUnicode) { | 111 if (bMSUnicode) { |
| 112 m_GlyphIndex[charcode] = FXFT_Get_Char_Index( | 112 m_GlyphIndex[charcode] = FXFT_Get_Char_Index( |
| 113 m_Font.GetFace(), m_Encoding.m_Unicodes[charcode]); | 113 m_Font.GetFace(), m_Encoding.m_Unicodes[charcode]); |
| 114 } else if (bMacRoman) { | 114 } else if (bMacRoman) { |
| 115 FX_DWORD maccode = FT_CharCodeFromUnicode( | 115 uint32_t maccode = FT_CharCodeFromUnicode( |
| 116 FXFT_ENCODING_APPLE_ROMAN, m_Encoding.m_Unicodes[charcode]); | 116 FXFT_ENCODING_APPLE_ROMAN, m_Encoding.m_Unicodes[charcode]); |
| 117 if (!maccode) { | 117 if (!maccode) { |
| 118 m_GlyphIndex[charcode] = | 118 m_GlyphIndex[charcode] = |
| 119 FXFT_Get_Name_Index(m_Font.GetFace(), (char*)name); | 119 FXFT_Get_Name_Index(m_Font.GetFace(), (char*)name); |
| 120 } else { | 120 } else { |
| 121 m_GlyphIndex[charcode] = | 121 m_GlyphIndex[charcode] = |
| 122 FXFT_Get_Char_Index(m_Font.GetFace(), maccode); | 122 FXFT_Get_Char_Index(m_Font.GetFace(), maccode); |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 } | 125 } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 } | 216 } |
| 217 } | 217 } |
| 218 if (bGotOne) { | 218 if (bGotOne) { |
| 219 return; | 219 return; |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 for (int charcode = 0; charcode < 256; charcode++) { | 222 for (int charcode = 0; charcode < 256; charcode++) { |
| 223 m_GlyphIndex[charcode] = charcode; | 223 m_GlyphIndex[charcode] = charcode; |
| 224 } | 224 } |
| 225 } | 225 } |
| OLD | NEW |