| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_FONTMAP_H_ | 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_FONTMAP_H_ |
| 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_FONTMAP_H_ | 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_FONTMAP_H_ |
| 9 | 9 |
| 10 #include "fpdfsdk/include/fxedit/fx_edit.h" | 10 #include "fpdfsdk/include/fxedit/fx_edit.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 CPDF_Font* AddFontToDocument(CPDF_Document* pDoc, | 73 CPDF_Font* AddFontToDocument(CPDF_Document* pDoc, |
| 74 CFX_ByteString& sFontName, | 74 CFX_ByteString& sFontName, |
| 75 uint8_t nCharset); | 75 uint8_t nCharset); |
| 76 static FX_BOOL IsStandardFont(const CFX_ByteString& sFontName); | 76 static FX_BOOL IsStandardFont(const CFX_ByteString& sFontName); |
| 77 CPDF_Font* AddStandardFont(CPDF_Document* pDoc, CFX_ByteString& sFontName); | 77 CPDF_Font* AddStandardFont(CPDF_Document* pDoc, CFX_ByteString& sFontName); |
| 78 CPDF_Font* AddSystemFont(CPDF_Document* pDoc, | 78 CPDF_Font* AddSystemFont(CPDF_Document* pDoc, |
| 79 CFX_ByteString& sFontName, | 79 CFX_ByteString& sFontName, |
| 80 uint8_t nCharset); | 80 uint8_t nCharset); |
| 81 | 81 |
| 82 protected: | 82 protected: |
| 83 void Initial(const FX_CHAR* fontname = NULL); | 83 virtual void Initialize(); |
| 84 CPDF_Document* GetDocument(); | 84 virtual CPDF_Document* GetDocument(); |
| 85 CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset); | 85 virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, |
| 86 void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias); | 86 int32_t nCharset); |
| 87 virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias); |
| 87 | 88 |
| 88 FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word); | 89 FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word); |
| 89 | 90 |
| 90 void Empty(); | 91 void Empty(); |
| 91 int32_t GetFontIndex(const CFX_ByteString& sFontName, | 92 int32_t GetFontIndex(const CFX_ByteString& sFontName, |
| 92 int32_t nCharset, | 93 int32_t nCharset, |
| 93 FX_BOOL bFind); | 94 FX_BOOL bFind); |
| 94 int32_t GetPWLFontIndex(FX_WORD word, int32_t nCharset); | 95 int32_t GetPWLFontIndex(FX_WORD word, int32_t nCharset); |
| 95 int32_t AddFontData(CPDF_Font* pFont, | 96 int32_t AddFontData(CPDF_Font* pFont, |
| 96 const CFX_ByteString& sFontAlias, | 97 const CFX_ByteString& sFontAlias, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 119 CPDF_Document* m_pPDFDoc; | 120 CPDF_Document* m_pPDFDoc; |
| 120 IFX_SystemHandler* m_pSystemHandler; | 121 IFX_SystemHandler* m_pSystemHandler; |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 class CPWL_DocFontMap : public CPWL_FontMap { | 124 class CPWL_DocFontMap : public CPWL_FontMap { |
| 124 public: | 125 public: |
| 125 CPWL_DocFontMap(IFX_SystemHandler* pSystemHandler, | 126 CPWL_DocFontMap(IFX_SystemHandler* pSystemHandler, |
| 126 CPDF_Document* pAttachedDoc); | 127 CPDF_Document* pAttachedDoc); |
| 127 ~CPWL_DocFontMap() override; | 128 ~CPWL_DocFontMap() override; |
| 128 | 129 |
| 129 virtual CPDF_Document* GetDocument(); | 130 private: |
| 131 // CPWL_FontMap: |
| 132 CPDF_Document* GetDocument() override; |
| 130 | 133 |
| 131 private: | |
| 132 CPDF_Document* m_pAttachedDoc; | 134 CPDF_Document* m_pAttachedDoc; |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_FONTMAP_H_ | 137 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_FONTMAP_H_ |
| OLD | NEW |