• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The PDFium Authors
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 CORE_FPDFAPI_FONT_CFX_STOCKFONTARRAY_H_
8 #define CORE_FPDFAPI_FONT_CFX_STOCKFONTARRAY_H_
9 
10 #include <array>
11 
12 #include "core/fxcrt/retain_ptr.h"
13 #include "core/fxge/cfx_fontmapper.h"
14 
15 class CPDF_Font;
16 
17 class CFX_StockFontArray {
18  public:
19   CFX_StockFontArray();
20   ~CFX_StockFontArray();
21 
22   RetainPtr<CPDF_Font> GetFont(CFX_FontMapper::StandardFont index) const;
23   void SetFont(CFX_FontMapper::StandardFont index, RetainPtr<CPDF_Font> pFont);
24 
25  private:
26   std::array<RetainPtr<CPDF_Font>, 14> m_StockFonts;
27 };
28 
29 #endif  // CORE_FPDFAPI_FONT_CFX_STOCKFONTARRAY_H_
30