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

Unified Diff: core/fxge/ge/cttfontdesc.h

Issue 2292503002: Refactor fx_font part 4 (Closed)
Patch Set: Comments Created 4 years, 4 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/ge/cttfontdesc.h
diff --git a/core/fxge/ge/cttfontdesc.h b/core/fxge/ge/cttfontdesc.h
new file mode 100644
index 0000000000000000000000000000000000000000..05cafde980b2e10edc8b75295892314a3bab3a0a
--- /dev/null
+++ b/core/fxge/ge/cttfontdesc.h
@@ -0,0 +1,45 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_FXGE_GE_CTTFONTDESC_H_
+#define CORE_FXGE_GE_CTTFONTDESC_H_
+
+#include "core/fxcrt/include/fx_system.h"
+#include "core/fxge/include/fx_font.h"
+
+#define FX_FONT_FLAG_SERIF 0x01
+#define FX_FONT_FLAG_FIXEDPITCH 0x02
+#define FX_FONT_FLAG_ITALIC 0x04
+#define FX_FONT_FLAG_BOLD 0x08
+#define FX_FONT_FLAG_SYMBOLIC_SYMBOL 0x10
+#define FX_FONT_FLAG_SYMBOLIC_DINGBATS 0x20
+#define FX_FONT_FLAG_MULTIPLEMASTER 0x40
+
+class CTTFontDesc {
+ public:
+ CTTFontDesc() : m_Type(0), m_pFontData(nullptr), m_RefCount(0) {}
+ ~CTTFontDesc();
+ // ret < 0, releaseface not appropriate for this object.
+ // ret == 0, object released
+ // ret > 0, object still alive, other referrers.
+ int ReleaseFace(FXFT_Face face);
+
+ int m_Type;
+ union {
+ struct {
+ FX_BOOL m_bItalic;
+ FX_BOOL m_bBold;
+ FXFT_Face m_pFace;
+ } m_SingleFace;
+ struct {
+ FXFT_Face m_pFaces[16];
+ } m_TTCFace;
+ };
+ uint8_t* m_pFontData;
+ int m_RefCount;
+};
+
+#endif // CORE_FXGE_GE_CTTFONTDESC_H_
« 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