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

Side by Side Diff: core/fpdfapi/fpdf_font/include/cpdf_font.h

Issue 2045033002: Avoid const-cast in CPDF_Font (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Stray file. 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
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_font.cpp ('k') | no next file » | 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_INCLUDE_CPDF_FONT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_
8 #define CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_ 8 #define CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_
9 9
10 #include "core/fxcrt/include/fx_string.h" 10 #include "core/fxcrt/include/fx_string.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 CPDF_Document* m_pDocument; 93 CPDF_Document* m_pDocument;
94 CFX_Font m_Font; 94 CFX_Font m_Font;
95 95
96 protected: 96 protected:
97 CPDF_Font(); 97 CPDF_Font();
98 98
99 virtual FX_BOOL Load() = 0; 99 virtual FX_BOOL Load() = 0;
100 100
101 FX_BOOL Initialize(); 101 FX_BOOL Initialize();
102 void LoadUnicodeMap(); 102 void LoadUnicodeMap() const; // logically const only.
103 void LoadPDFEncoding(CPDF_Object* pEncoding, 103 void LoadPDFEncoding(CPDF_Object* pEncoding,
104 int& iBaseEncoding, 104 int& iBaseEncoding,
105 CFX_ByteString*& pCharNames, 105 CFX_ByteString*& pCharNames,
106 FX_BOOL bEmbedded, 106 FX_BOOL bEmbedded,
107 FX_BOOL bTrueType); 107 FX_BOOL bTrueType);
108 void LoadFontDescriptor(CPDF_Dictionary* pDict); 108 void LoadFontDescriptor(CPDF_Dictionary* pDict);
109 void CheckFontMetrics(); 109 void CheckFontMetrics();
110 110
111 const FX_CHAR* GetAdobeCharName(int iBaseEncoding, 111 const FX_CHAR* GetAdobeCharName(int iBaseEncoding,
112 const CFX_ByteString* pCharNames, 112 const CFX_ByteString* pCharNames,
113 int charcode); 113 int charcode);
114 114
115 CFX_ByteString m_BaseFont; 115 CFX_ByteString m_BaseFont;
116 CPDF_StreamAcc* m_pFontFile; 116 CPDF_StreamAcc* m_pFontFile;
117 CPDF_Dictionary* m_pFontDict; 117 CPDF_Dictionary* m_pFontDict;
118 CPDF_ToUnicodeMap* m_pToUnicodeMap; 118 mutable CPDF_ToUnicodeMap* m_pToUnicodeMap;
119 FX_BOOL m_bToUnicodeLoaded; 119 mutable FX_BOOL m_bToUnicodeLoaded;
120 int m_Flags; 120 int m_Flags;
121 FX_RECT m_FontBBox; 121 FX_RECT m_FontBBox;
122 int m_StemV; 122 int m_StemV;
123 int m_Ascent; 123 int m_Ascent;
124 int m_Descent; 124 int m_Descent;
125 int m_ItalicAngle; 125 int m_ItalicAngle;
126 }; 126 };
127 127
128 #endif // CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_ 128 #endif // CORE_FPDFAPI_FPDF_FONT_INCLUDE_CPDF_FONT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_font.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698