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

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

Issue 2060973002: Make code compile with clang_use_chrome_plugin (part I) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 6 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
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 "core/fpdfapi/fpdf_font/include/cpdf_font.h" 10 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
11 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" 11 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h"
12 #include "core/fxcrt/include/fx_string.h" 12 #include "core/fxcrt/include/fx_string.h"
13 #include "core/fxcrt/include/fx_system.h" 13 #include "core/fxcrt/include/fx_system.h"
14 14
15 class CPDF_SimpleFont : public CPDF_Font { 15 class CPDF_SimpleFont : public CPDF_Font {
16 public: 16 public:
17 CPDF_SimpleFont(); 17 CPDF_SimpleFont();
18 virtual ~CPDF_SimpleFont(); 18 ~CPDF_SimpleFont() override;
19 19
20 // CPDF_Font: 20 // CPDF_Font
21 int GetCharWidthF(uint32_t charcode, int level = 0) override; 21 int GetCharWidthF(uint32_t charcode, int level = 0) override;
22 FX_RECT GetCharBBox(uint32_t charcode, int level = 0) override; 22 FX_RECT GetCharBBox(uint32_t charcode, int level = 0) override;
23 int GlyphFromCharCode(uint32_t charcode, 23 int GlyphFromCharCode(uint32_t charcode,
24 FX_BOOL* pVertGlyph = nullptr) override; 24 FX_BOOL* pVertGlyph = nullptr) override;
25 FX_BOOL IsUnicodeCompatible() const override; 25 FX_BOOL IsUnicodeCompatible() const override;
26 CFX_WideString UnicodeFromCharCode(uint32_t charcode) const override; 26 CFX_WideString UnicodeFromCharCode(uint32_t charcode) const override;
27 uint32_t CharCodeFromUnicode(FX_WCHAR Unicode) const override; 27 uint32_t CharCodeFromUnicode(FX_WCHAR Unicode) const override;
28 28
29 CPDF_FontEncoding* GetEncoding() { return &m_Encoding; } 29 CPDF_FontEncoding* GetEncoding() { return &m_Encoding; }
30 30
31 protected: 31 protected:
32 virtual void LoadGlyphMap() = 0; 32 virtual void LoadGlyphMap() = 0;
33 33
34 FX_BOOL LoadCommon(); 34 FX_BOOL LoadCommon();
35 void LoadSubstFont(); 35 void LoadSubstFont();
36 void LoadFaceMetrics();
37 void LoadCharMetrics(int charcode); 36 void LoadCharMetrics(int charcode);
38 37
39 CPDF_FontEncoding m_Encoding; 38 CPDF_FontEncoding m_Encoding;
40 uint16_t m_GlyphIndex[256]; 39 uint16_t m_GlyphIndex[256];
41 uint16_t m_ExtGID[256]; 40 uint16_t m_ExtGID[256];
42 CFX_ByteString* m_pCharNames; 41 CFX_ByteString* m_pCharNames;
43 int m_BaseEncoding; 42 int m_BaseEncoding;
44 uint16_t m_CharWidth[256]; 43 uint16_t m_CharWidth[256];
45 FX_SMALL_RECT m_CharBBox[256]; 44 FX_SMALL_RECT m_CharBBox[256];
46 FX_BOOL m_bUseFontWidth; 45 FX_BOOL m_bUseFontWidth;
47 }; 46 };
48 47
49 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_SIMPLEFONT_H_ 48 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_SIMPLEFONT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_edit/include/cpdf_pagecontentgenerator.h ('k') | core/fpdfapi/fpdf_font/font_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698