Chromium Code Reviews| 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(); |