Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1580)

Side by Side Diff: core/fpdfapi/fpdf_font/cpdf_simplefont.cpp

Issue 1841173002: Rename GetElementValue() to GetDirectObject{By,At}(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix test name Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_font.cpp ('k') | core/fpdfapi/fpdf_font/cpdf_type3font.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_simplefont.h" 7 #include "core/fpdfapi/fpdf_font/cpdf_simplefont.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_array.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if (m_pFontFile) { 139 if (m_pFontFile) {
140 if (m_BaseFont.GetLength() > 8 && m_BaseFont[7] == '+') { 140 if (m_BaseFont.GetLength() > 8 && m_BaseFont[7] == '+') {
141 m_BaseFont = m_BaseFont.Mid(8); 141 m_BaseFont = m_BaseFont.Mid(8);
142 } 142 }
143 } else { 143 } else {
144 LoadSubstFont(); 144 LoadSubstFont();
145 } 145 }
146 if (!(m_Flags & PDFFONT_SYMBOLIC)) { 146 if (!(m_Flags & PDFFONT_SYMBOLIC)) {
147 m_BaseEncoding = PDFFONT_ENCODING_STANDARD; 147 m_BaseEncoding = PDFFONT_ENCODING_STANDARD;
148 } 148 }
149 CPDF_Object* pEncoding = m_pFontDict->GetElementValue("Encoding"); 149 CPDF_Object* pEncoding = m_pFontDict->GetDirectObjectBy("Encoding");
150 LoadPDFEncoding(pEncoding, m_BaseEncoding, m_pCharNames, m_pFontFile != NULL, 150 LoadPDFEncoding(pEncoding, m_BaseEncoding, m_pCharNames, m_pFontFile != NULL,
151 m_Font.IsTTFont()); 151 m_Font.IsTTFont());
152 LoadGlyphMap(); 152 LoadGlyphMap();
153 delete[] m_pCharNames; 153 delete[] m_pCharNames;
154 m_pCharNames = NULL; 154 m_pCharNames = NULL;
155 if (!m_Font.GetFace()) 155 if (!m_Font.GetFace())
156 return TRUE; 156 return TRUE;
157 157
158 if (m_Flags & PDFFONT_ALLCAP) { 158 if (m_Flags & PDFFONT_ALLCAP) {
159 unsigned char lowercases[] = {'a', 'z', 0xe0, 0xf6, 0xf8, 0xfd}; 159 unsigned char lowercases[] = {'a', 'z', 0xe0, 0xf6, 0xf8, 0xfd};
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return CFX_WideString(); 213 return CFX_WideString();
214 return ret; 214 return ret;
215 } 215 }
216 216
217 uint32_t CPDF_SimpleFont::CharCodeFromUnicode(FX_WCHAR unicode) const { 217 uint32_t CPDF_SimpleFont::CharCodeFromUnicode(FX_WCHAR unicode) const {
218 uint32_t ret = CPDF_Font::CharCodeFromUnicode(unicode); 218 uint32_t ret = CPDF_Font::CharCodeFromUnicode(unicode);
219 if (ret) 219 if (ret)
220 return ret; 220 return ret;
221 return m_Encoding.CharCodeFromUnicode(unicode); 221 return m_Encoding.CharCodeFromUnicode(unicode);
222 } 222 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_font.cpp ('k') | core/fpdfapi/fpdf_font/cpdf_type3font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698