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

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

Issue 2248453002: Use a std::vector in fpdf_font code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 years, 4 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_simplefont.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 #ifndef CORE_FPDFAPI_FPDF_FONT_CPDF_SIMPLEFONT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_FONT_CPDF_SIMPLEFONT_H_
8 #define CORE_FPDFAPI_FPDF_FONT_CPDF_SIMPLEFONT_H_ 8 #define CORE_FPDFAPI_FPDF_FONT_CPDF_SIMPLEFONT_H_
9 9
10 #include <vector>
11
10 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" 12 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
11 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" 13 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h"
12 #include "core/fxcrt/include/fx_string.h" 14 #include "core/fxcrt/include/fx_string.h"
13 #include "core/fxcrt/include/fx_system.h" 15 #include "core/fxcrt/include/fx_system.h"
14 16
15 class CPDF_SimpleFont : public CPDF_Font { 17 class CPDF_SimpleFont : public CPDF_Font {
16 public: 18 public:
17 CPDF_SimpleFont(); 19 CPDF_SimpleFont();
18 ~CPDF_SimpleFont() override; 20 ~CPDF_SimpleFont() override;
19 21
(...skipping 10 matching lines...) Expand all
30 protected: 32 protected:
31 virtual void LoadGlyphMap() = 0; 33 virtual void LoadGlyphMap() = 0;
32 34
33 FX_BOOL LoadCommon(); 35 FX_BOOL LoadCommon();
34 void LoadSubstFont(); 36 void LoadSubstFont();
35 void LoadCharMetrics(int charcode); 37 void LoadCharMetrics(int charcode);
36 38
37 CPDF_FontEncoding m_Encoding; 39 CPDF_FontEncoding m_Encoding;
38 uint16_t m_GlyphIndex[256]; 40 uint16_t m_GlyphIndex[256];
39 uint16_t m_ExtGID[256]; 41 uint16_t m_ExtGID[256];
40 CFX_ByteString* m_pCharNames; 42 std::vector<CFX_ByteString> m_CharNames;
41 int m_BaseEncoding; 43 int m_BaseEncoding;
42 uint16_t m_CharWidth[256]; 44 uint16_t m_CharWidth[256];
43 FX_SMALL_RECT m_CharBBox[256]; 45 FX_SMALL_RECT m_CharBBox[256];
44 FX_BOOL m_bUseFontWidth; 46 FX_BOOL m_bUseFontWidth;
45 }; 47 };
46 48
47 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_SIMPLEFONT_H_ 49 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_SIMPLEFONT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_font.cpp ('k') | core/fpdfapi/fpdf_font/cpdf_simplefont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698