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

Unified Diff: core/include/fpdfapi/fpdf_resource.h

Issue 1060813003: Set m_FontType in CPDF_Font() constructor. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_resource.h
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index 86084d0b7232004ce3e77db17abd3e3f63e1dc11..2e3a9d477cab22faf66dd08ce80174464f37a38f 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -86,13 +86,8 @@ public:
virtual ~CPDF_Font();
-
-
-
- int GetFontType() const
- {
- return m_FontType;
- }
+ bool IsFontType(int fonttype) const { return fonttype == m_FontType; }
+ int GetFontType() const { return m_FontType; }
CFX_ByteString GetFontTypeName() const;
@@ -256,9 +251,9 @@ public:
class CFX_PathData* LoadGlyphPath(FX_DWORD charcode, int dest_width = 0);
CFX_Font m_Font;
-protected:
- CPDF_Font();
+protected:
+ CPDF_Font(int fonttype);
Lei Zhang 2015/04/17 19:40:59 explicit, also CPDF_SimpleFont below
Tom Sepez 2015/04/17 19:50:26 Done.
FX_BOOL Initialize();
@@ -285,8 +280,6 @@ protected:
- int m_FontType;
-
CFX_ByteString m_BaseFont;
CPDF_StreamAcc* m_pFontFile;
@@ -312,6 +305,8 @@ protected:
int m_ItalicAngle;
+private:
+ int m_FontType;
Lei Zhang 2015/04/17 19:40:59 This can be const since we never change it, right?
Tom Sepez 2015/04/17 19:50:26 Done.
};
#define PDFFONT_ENCODING_BUILTIN 0
#define PDFFONT_ENCODING_WINANSI 1
@@ -355,8 +350,7 @@ public:
class CPDF_SimpleFont : public CPDF_Font
{
public:
-
- CPDF_SimpleFont();
+ CPDF_SimpleFont(int fonttype);
virtual ~CPDF_SimpleFont();
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698