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_type3font.h" | 7 #include "core/fpdfapi/fpdf_font/cpdf_type3font.h" |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "core/fpdfapi/fpdf_font/cpdf_type3char.h" | 11 #include "core/fpdfapi/fpdf_font/cpdf_type3char.h" |
12 #include "core/fpdfapi/fpdf_page/cpdf_form.h" | 12 #include "core/fpdfapi/fpdf_page/cpdf_form.h" |
13 #include "core/fpdfapi/fpdf_page/pageint.h" | 13 #include "core/fpdfapi/fpdf_page/pageint.h" |
14 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 14 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" |
15 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" | 15 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" |
16 #include "core/fxcrt/include/fx_system.h" | 16 #include "core/fxcrt/include/fx_system.h" |
17 #include "third_party/base/stl_util.h" | 17 #include "third_party/base/stl_util.h" |
18 | 18 |
19 CPDF_Type3Font::CPDF_Type3Font() | 19 CPDF_Type3Font::CPDF_Type3Font() |
20 : m_pCharProcs(nullptr), | 20 : m_pCharProcs(nullptr), |
21 m_pPageResources(nullptr), | 21 m_pPageResources(nullptr), |
22 m_pFontResources(nullptr) { | 22 m_pFontResources(nullptr) { |
23 FXSYS_memset(m_CharWidthL, 0, sizeof(m_CharWidthL)); | 23 FXSYS_memset(m_CharWidthL, 0, sizeof(m_CharWidthL)); |
24 } | 24 } |
25 | 25 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 return m_CharWidthL[charcode]; | 147 return m_CharWidthL[charcode]; |
148 | 148 |
149 const CPDF_Type3Char* pChar = LoadChar(charcode, level); | 149 const CPDF_Type3Char* pChar = LoadChar(charcode, level); |
150 return pChar ? pChar->m_Width : 0; | 150 return pChar ? pChar->m_Width : 0; |
151 } | 151 } |
152 | 152 |
153 FX_RECT CPDF_Type3Font::GetCharBBox(uint32_t charcode, int level) { | 153 FX_RECT CPDF_Type3Font::GetCharBBox(uint32_t charcode, int level) { |
154 const CPDF_Type3Char* pChar = LoadChar(charcode, level); | 154 const CPDF_Type3Char* pChar = LoadChar(charcode, level); |
155 return pChar ? pChar->m_BBox : FX_RECT(); | 155 return pChar ? pChar->m_BBox : FX_RECT(); |
156 } | 156 } |
OLD | NEW |