• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 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_FXGE_GE_CTTFONTDESC_H_
8 #define CORE_FXGE_GE_CTTFONTDESC_H_
9 
10 #include "core/fxcrt/fx_system.h"
11 #include "core/fxge/fx_font.h"
12 
13 #define FX_FONT_FLAG_SERIF 0x01
14 #define FX_FONT_FLAG_FIXEDPITCH 0x02
15 #define FX_FONT_FLAG_ITALIC 0x04
16 #define FX_FONT_FLAG_BOLD 0x08
17 #define FX_FONT_FLAG_SYMBOLIC_SYMBOL 0x10
18 #define FX_FONT_FLAG_SYMBOLIC_DINGBATS 0x20
19 #define FX_FONT_FLAG_MULTIPLEMASTER 0x40
20 
21 class CTTFontDesc {
22  public:
CTTFontDesc()23   CTTFontDesc() : m_Type(0), m_pFontData(nullptr), m_RefCount(0) {}
24   ~CTTFontDesc();
25   // ret < 0, releaseface not appropriate for this object.
26   // ret == 0, object released
27   // ret > 0, object still alive, other referrers.
28   int ReleaseFace(FXFT_Face face);
29 
30   int m_Type;
31 
32   union {
33     FXFT_Face m_SingleFace;
34     FXFT_Face m_TTCFaces[16];
35   };
36   uint8_t* m_pFontData;
37   int m_RefCount;
38 };
39 
40 #endif  // CORE_FXGE_GE_CTTFONTDESC_H_
41