Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: core/fxge/ge/cttfontdesc.h

Issue 2292503002: Refactor fx_font part 4 (Closed)
Patch Set: Comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fxge/ge/cfx_substfont.cpp ('k') | core/fxge/ge/cttfontdesc.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « core/fxge/ge/cfx_substfont.cpp ('k') | core/fxge/ge/cttfontdesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698