Home | History | Annotate | Download | only in font
      1 // Copyright 2017 PDFium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
      6 
      7 #ifndef XFA_FGAS_FONT_CFGAS_DEFAULTFONTMANAGER_H_
      8 #define XFA_FGAS_FONT_CFGAS_DEFAULTFONTMANAGER_H_
      9 
     10 #include <vector>
     11 
     12 #include "core/fxcrt/fx_string.h"
     13 #include "core/fxcrt/retain_ptr.h"
     14 #include "xfa/fgas/font/cfgas_gefont.h"
     15 
     16 class CFGAS_DefaultFontManager {
     17  public:
     18   CFGAS_DefaultFontManager();
     19   ~CFGAS_DefaultFontManager();
     20 
     21   RetainPtr<CFGAS_GEFont> GetFont(CFGAS_FontMgr* pFontMgr,
     22                                   const WideStringView& wsFontFamily,
     23                                   uint32_t dwFontStyles);
     24   RetainPtr<CFGAS_GEFont> GetDefaultFont(CFGAS_FontMgr* pFontMgr,
     25                                          const WideStringView& wsFontFamily,
     26                                          uint32_t dwFontStyles);
     27 
     28  private:
     29   std::vector<RetainPtr<CFGAS_GEFont>> m_CacheFonts;
     30 };
     31 
     32 #endif  // XFA_FGAS_FONT_CFGAS_DEFAULTFONTMANAGER_H_
     33