• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 CORE_FPDFAPI_FONT_CFX_STOCKFONTARRAY_H_
8 #define CORE_FPDFAPI_FONT_CFX_STOCKFONTARRAY_H_
9 
10 #include <memory>
11 
12 #include "core/fpdfapi/font/cpdf_font.h"
13 
14 class CFX_StockFontArray {
15  public:
16   CFX_StockFontArray();
17   ~CFX_StockFontArray();
18 
19   // Takes ownership of |pFont|, returns unowned pointer to it.
20   CPDF_Font* SetFont(uint32_t index, std::unique_ptr<CPDF_Font> pFont);
21   CPDF_Font* GetFont(uint32_t index) const;
22 
23  private:
24   std::unique_ptr<CPDF_Font> m_StockFonts[14];
25 };
26 
27 #endif  // CORE_FPDFAPI_FONT_CFX_STOCKFONTARRAY_H_
28