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

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

Issue 2392773003: Move core/fpdfapi/fpdf_font to core/fpdfapi/font (Closed)
Patch Set: Created 4 years, 2 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/font/cpdf_simplefont.h ('k') | core/fpdfapi/font/cpdf_truetypefont.h » ('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/font/cpdf_simplefont.h"
8 8
9 #include "core/fpdfapi/fpdf_font/font_int.h" 9 #include "core/fpdfapi/font/font_int.h"
10 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" 10 #include "core/fpdfapi/fpdf_parser/cpdf_array.h"
11 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" 11 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h"
12 #include "core/fxge/fx_freetype.h" 12 #include "core/fxge/fx_freetype.h"
13 #include "third_party/base/numerics/safe_math.h" 13 #include "third_party/base/numerics/safe_math.h"
14 14
15 CPDF_SimpleFont::CPDF_SimpleFont() : m_BaseEncoding(PDFFONT_ENCODING_BUILTIN) { 15 CPDF_SimpleFont::CPDF_SimpleFont() : m_BaseEncoding(PDFFONT_ENCODING_BUILTIN) {
16 FXSYS_memset(m_CharWidth, 0xff, sizeof(m_CharWidth)); 16 FXSYS_memset(m_CharWidth, 0xff, sizeof(m_CharWidth));
17 FXSYS_memset(m_GlyphIndex, 0xff, sizeof(m_GlyphIndex)); 17 FXSYS_memset(m_GlyphIndex, 0xff, sizeof(m_GlyphIndex));
18 FXSYS_memset(m_ExtGID, 0xff, sizeof(m_ExtGID)); 18 FXSYS_memset(m_ExtGID, 0xff, sizeof(m_ExtGID));
19 for (size_t i = 0; i < FX_ArraySize(m_CharBBox); ++i) 19 for (size_t i = 0; i < FX_ArraySize(m_CharBBox); ++i)
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 return CFX_WideString(); 207 return CFX_WideString();
208 return ret; 208 return ret;
209 } 209 }
210 210
211 uint32_t CPDF_SimpleFont::CharCodeFromUnicode(FX_WCHAR unicode) const { 211 uint32_t CPDF_SimpleFont::CharCodeFromUnicode(FX_WCHAR unicode) const {
212 uint32_t ret = CPDF_Font::CharCodeFromUnicode(unicode); 212 uint32_t ret = CPDF_Font::CharCodeFromUnicode(unicode);
213 if (ret) 213 if (ret)
214 return ret; 214 return ret;
215 return m_Encoding.CharCodeFromUnicode(unicode); 215 return m_Encoding.CharCodeFromUnicode(unicode);
216 } 216 }
OLDNEW
« no previous file with comments | « core/fpdfapi/font/cpdf_simplefont.h ('k') | core/fpdfapi/font/cpdf_truetypefont.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698