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

Unified Diff: xfa/fxfa/include/xfa_fontmgr.h

Issue 2383593002: Move xfa/fxfa/include to xfa/fxfa (Closed)
Patch Set: Rebase to master Created 4 years, 3 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 | « xfa/fxfa/include/xfa_ffwidgethandler.h ('k') | xfa/fxfa/include/xfa_rendercontext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/include/xfa_fontmgr.h
diff --git a/xfa/fxfa/include/xfa_fontmgr.h b/xfa/fxfa/include/xfa_fontmgr.h
deleted file mode 100644
index a996adc2ede984c885cabf122c10b8294bd557cf..0000000000000000000000000000000000000000
--- a/xfa/fxfa/include/xfa_fontmgr.h
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FXFA_INCLUDE_XFA_FONTMGR_H_
-#define XFA_FXFA_INCLUDE_XFA_FONTMGR_H_
-
-#include <map>
-#include <memory>
-
-#include "core/fxcrt/fx_ext.h"
-#include "core/fxcrt/fx_system.h"
-#include "xfa/fgas/font/fgas_font.h"
-#include "xfa/fxfa/include/fxfa.h"
-
-class CPDF_Font;
-
-struct XFA_FONTINFO {
- uint32_t dwFontNameHash;
- const FX_WCHAR* pPsName;
- const FX_WCHAR* pReplaceFont;
- uint16_t dwStyles;
- uint16_t wCodePage;
-};
-
-class CXFA_DefFontMgr {
- public:
- CXFA_DefFontMgr();
- ~CXFA_DefFontMgr();
-
- CFGAS_GEFont* GetFont(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF);
- CFGAS_GEFont* GetDefaultFont(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF);
-
- protected:
- CFX_ArrayTemplate<CFGAS_GEFont*> m_CacheFonts;
-};
-
-class CXFA_PDFFontMgr {
- public:
- explicit CXFA_PDFFontMgr(CXFA_FFDoc* pDoc);
- ~CXFA_PDFFontMgr();
-
- CFGAS_GEFont* GetFont(const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- CPDF_Font** pPDFFont,
- bool bStrictMatch);
- bool GetCharWidth(const CFGAS_GEFont* pFont,
- FX_WCHAR wUnicode,
- bool bCharCode,
- int32_t* pWidth);
- void SetFont(const CFGAS_GEFont* pFont, CPDF_Font* pPDFFont);
-
- protected:
- CFGAS_GEFont* FindFont(const CFX_ByteString& strFamilyName,
- bool bBold,
- bool bItalic,
- CPDF_Font** pPDFFont,
- bool bStrictMatch);
- CFX_ByteString PsNameToFontName(const CFX_ByteString& strPsName,
- bool bBold,
- bool bItalic);
- bool PsNameMatchDRFontName(const CFX_ByteStringC& bsPsName,
- bool bBold,
- bool bItalic,
- const CFX_ByteString& bsDRFontName,
- bool bStrictMatch);
-
- CXFA_FFDoc* const m_pDoc;
- std::map<const CFGAS_GEFont*, CPDF_Font*> m_FDE2PDFFont;
- std::map<CFX_ByteString, CFGAS_GEFont*> m_FontMap;
-};
-
-class CXFA_FontMgr {
- public:
- CXFA_FontMgr();
- ~CXFA_FontMgr();
-
- CFGAS_GEFont* GetFont(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage = 0xFFFF);
- void LoadDocFonts(CXFA_FFDoc* hDoc);
- void ReleaseDocFonts(CXFA_FFDoc* hDoc);
- void SetDefFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr);
-
- protected:
- std::unique_ptr<CXFA_DefFontMgr> m_pDefFontMgr;
- std::map<CXFA_FFDoc*, std::unique_ptr<CXFA_PDFFontMgr>> m_PDFFontMgrMap;
- std::map<CFX_ByteString, CFGAS_GEFont*> m_FontMap;
-};
-
-#endif // XFA_FXFA_INCLUDE_XFA_FONTMGR_H_
« no previous file with comments | « xfa/fxfa/include/xfa_ffwidgethandler.h ('k') | xfa/fxfa/include/xfa_rendercontext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698