| OLD | NEW |
| (Empty) | |
| 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/include/fx_system.h" |
| 11 #include "core/fxge/include/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: |
| 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 union { |
| 32 struct { |
| 33 FX_BOOL m_bItalic; |
| 34 FX_BOOL m_bBold; |
| 35 FXFT_Face m_pFace; |
| 36 } m_SingleFace; |
| 37 struct { |
| 38 FXFT_Face m_pFaces[16]; |
| 39 } m_TTCFace; |
| 40 }; |
| 41 uint8_t* m_pFontData; |
| 42 int m_RefCount; |
| 43 }; |
| 44 |
| 45 #endif // CORE_FXGE_GE_CTTFONTDESC_H_ |
| OLD | NEW |