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

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

Issue 2003833003: Use unique_ptr in CPDF_CidFont (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | core/fpdfapi/fpdf_font/cpdf_cidfont.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_CIDFONT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_
8 #define CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_ 8 #define CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_
9 9
10 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" 10 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 protected: 63 protected:
64 int GetGlyphIndex(uint32_t unicodeb, FX_BOOL* pVertGlyph); 64 int GetGlyphIndex(uint32_t unicodeb, FX_BOOL* pVertGlyph);
65 void LoadMetricsArray(CPDF_Array* pArray, 65 void LoadMetricsArray(CPDF_Array* pArray,
66 CFX_ArrayTemplate<uint32_t>& result, 66 CFX_ArrayTemplate<uint32_t>& result,
67 int nElements); 67 int nElements);
68 void LoadSubstFont(); 68 void LoadSubstFont();
69 FX_WCHAR GetUnicodeFromCharCode(uint32_t charcode) const; 69 FX_WCHAR GetUnicodeFromCharCode(uint32_t charcode) const;
70 70
71 CPDF_CMap* m_pCMap; 71 CPDF_CMap* m_pCMap;
72 CPDF_CMap* m_pAllocatedCMap; 72 std::unique_ptr<CPDF_CMap> m_pAllocatedCMap;
Lei Zhang 2016/05/20 23:41:28 #include <memory>
Tom Sepez 2016/05/23 18:09:44 Done.
73 CPDF_CID2UnicodeMap* m_pCID2UnicodeMap; 73 CPDF_CID2UnicodeMap* m_pCID2UnicodeMap;
74 CIDSet m_Charset; 74 CIDSet m_Charset;
75 FX_BOOL m_bType1; 75 FX_BOOL m_bType1;
76 CPDF_StreamAcc* m_pCIDToGIDMap;
77 FX_BOOL m_bCIDIsGID; 76 FX_BOOL m_bCIDIsGID;
78 uint16_t m_DefaultWidth; 77 uint16_t m_DefaultWidth;
79 uint16_t* m_pAnsiWidths; 78 std::unique_ptr<CPDF_StreamAcc> m_pCIDToGIDMap;
Lei Zhang 2016/05/20 23:41:28 This is a strangely named variable.
Tom Sepez 2016/05/23 18:09:43 Yeah, really bugged me. Renamed.
79 std::unique_ptr<uint16_t, FxFreeDeleter> m_pAnsiWidths;
Lei Zhang 2016/05/20 23:41:28 std::vector instead?
Tom Sepez 2016/05/23 18:09:44 Done.
80 FX_SMALL_RECT m_CharBBox[256]; 80 FX_SMALL_RECT m_CharBBox[256];
81 CFX_ArrayTemplate<uint32_t> m_WidthList; 81 CFX_ArrayTemplate<uint32_t> m_WidthList;
82 short m_DefaultVY; 82 short m_DefaultVY;
83 short m_DefaultW1; 83 short m_DefaultW1;
84 CFX_ArrayTemplate<uint32_t> m_VertMetrics; 84 CFX_ArrayTemplate<uint32_t> m_VertMetrics;
85 FX_BOOL m_bAdobeCourierStd; 85 FX_BOOL m_bAdobeCourierStd;
86 CFX_CTTGSUBTable* m_pTTGSUBTable; 86 std::unique_ptr<CFX_CTTGSUBTable> m_pTTGSUBTable;
87 }; 87 };
88 88
89 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_ 89 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_CIDFONT_H_
OLDNEW
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_font/cpdf_cidfont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698