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

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

Issue 2384853002: Detect resursive loading of type3 font char to avoid infinite loop (Closed)
Patch Set: address comments Created 4 years, 2 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_cidfont.cpp ('k') | core/fpdfapi/fpdf_font/cpdf_simplefont.h » ('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_FONT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_FONT_CPDF_FONT_H_
8 #define CORE_FPDFAPI_FPDF_FONT_CPDF_FONT_H_ 8 #define CORE_FPDFAPI_FPDF_FONT_CPDF_FONT_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 void GetFontBBox(FX_RECT& rect) const { rect = m_FontBBox; } 85 void GetFontBBox(FX_RECT& rect) const { rect = m_FontBBox; }
86 int GetTypeAscent() const { return m_Ascent; } 86 int GetTypeAscent() const { return m_Ascent; }
87 int GetTypeDescent() const { return m_Descent; } 87 int GetTypeDescent() const { return m_Descent; }
88 int GetItalicAngle() const { return m_ItalicAngle; } 88 int GetItalicAngle() const { return m_ItalicAngle; }
89 int GetStemV() const { return m_StemV; } 89 int GetStemV() const { return m_StemV; }
90 int GetStringWidth(const FX_CHAR* pString, int size); 90 int GetStringWidth(const FX_CHAR* pString, int size);
91 uint32_t FallbackFontFromCharcode(uint32_t charcode); 91 uint32_t FallbackFontFromCharcode(uint32_t charcode);
92 int FallbackGlyphFromCharcode(int fallbackFont, uint32_t charcode); 92 int FallbackGlyphFromCharcode(int fallbackFont, uint32_t charcode);
93 93
94 virtual int GetCharWidthF(uint32_t charcode, int level = 0) = 0; 94 virtual int GetCharWidthF(uint32_t charcode) = 0;
95 virtual FX_RECT GetCharBBox(uint32_t charcode, int level = 0) = 0; 95 virtual FX_RECT GetCharBBox(uint32_t charcode) = 0;
96 96
97 CPDF_Document* m_pDocument; 97 CPDF_Document* m_pDocument;
98 CFX_Font m_Font; 98 CFX_Font m_Font;
99 std::vector<std::unique_ptr<CFX_Font>> m_FontFallbacks; 99 std::vector<std::unique_ptr<CFX_Font>> m_FontFallbacks;
100 100
101 protected: 101 protected:
102 CPDF_Font(); 102 CPDF_Font();
103 103
104 virtual bool Load() = 0; 104 virtual bool Load() = 0;
105 105
(...skipping 17 matching lines...) Expand all
123 mutable bool m_bToUnicodeLoaded; 123 mutable bool m_bToUnicodeLoaded;
124 int m_Flags; 124 int m_Flags;
125 FX_RECT m_FontBBox; 125 FX_RECT m_FontBBox;
126 int m_StemV; 126 int m_StemV;
127 int m_Ascent; 127 int m_Ascent;
128 int m_Descent; 128 int m_Descent;
129 int m_ItalicAngle; 129 int m_ItalicAngle;
130 }; 130 };
131 131
132 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_FONT_H_ 132 #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_FONT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_cidfont.cpp ('k') | core/fpdfapi/fpdf_font/cpdf_simplefont.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698