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

Side by Side Diff: core/src/fxge/android/fpf_skiafontmgr.h

Issue 1088733002: Kill CFX_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase. Created 5 years, 8 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/src/fxge/android/fpf_skiafont.h ('k') | core/src/fxge/android/fpf_skiamodule.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef _FPF_SKIA_FONTMGR_H_ 7 #ifndef _FPF_SKIA_FONTMGR_H_
8 #define _FPF_SKIA_FONTMGR_H_ 8 #define _FPF_SKIA_FONTMGR_H_
9 #if _FX_OS_ == _FX_ANDROID_ 9 #if _FX_OS_ == _FX_ANDROID_
10 #define FPF_SKIAFONTTYPE_Unknown 0 10 #define FPF_SKIAFONTTYPE_Unknown 0
11 #define FPF_SKIAFONTTYPE_Path 1 11 #define FPF_SKIAFONTTYPE_Path 1
12 #define FPF_SKIAFONTTYPE_File 2 12 #define FPF_SKIAFONTTYPE_File 2
13 #define FPF_SKIAFONTTYPE_Buffer 3 13 #define FPF_SKIAFONTTYPE_Buffer 3
14 class CFPF_SkiaFontDescriptor : public CFX_Object 14 class CFPF_SkiaFontDescriptor
15 { 15 {
16 public: 16 public:
17 CFPF_SkiaFontDescriptor() : m_pFamily(NULL), m_dwStyle(0), m_iFaceIndex(0), m_dwCharsets(0), m_iGlyphNum(0) {} 17 CFPF_SkiaFontDescriptor() : m_pFamily(NULL), m_dwStyle(0), m_iFaceIndex(0), m_dwCharsets(0), m_iGlyphNum(0) {}
18 virtual ~CFPF_SkiaFontDescriptor() 18 virtual ~CFPF_SkiaFontDescriptor()
19 { 19 {
20 if (m_pFamily) { 20 if (m_pFamily) {
21 FX_Free(m_pFamily); 21 FX_Free(m_pFamily);
22 } 22 }
23 } 23 }
24 virtual FX_INT32 GetType() const 24 virtual FX_INT32 GetType() const
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 { 81 {
82 public: 82 public:
83 CFPF_SkiaBufferFont() : m_pBuffer(NULL), m_szBuffer(0) {} 83 CFPF_SkiaBufferFont() : m_pBuffer(NULL), m_szBuffer(0) {}
84 virtual FX_INT32 GetType() const 84 virtual FX_INT32 GetType() const
85 { 85 {
86 return FPF_SKIAFONTTYPE_Buffer; 86 return FPF_SKIAFONTTYPE_Buffer;
87 } 87 }
88 FX_LPVOID m_pBuffer; 88 FX_LPVOID m_pBuffer;
89 size_t m_szBuffer; 89 size_t m_szBuffer;
90 }; 90 };
91 class CFPF_SkiaFontMgr : public IFPF_FontMgr, public CFX_Object 91 class CFPF_SkiaFontMgr : public IFPF_FontMgr
92 { 92 {
93 public: 93 public:
94 CFPF_SkiaFontMgr(); 94 CFPF_SkiaFontMgr();
95 virtual ~CFPF_SkiaFontMgr(); 95 virtual ~CFPF_SkiaFontMgr();
96 FX_BOOL InitFTLibrary(); 96 FX_BOOL InitFTLibrary();
97 virtual void LoadSystemFonts(); 97 virtual void LoadSystemFonts();
98 virtual void LoadPrivateFont(IFX_FileRead* pFontFile) ; 98 virtual void LoadPrivateFont(IFX_FileRead* pFontFile) ;
99 virtual void LoadPrivateFont(FX_BSTR bsFileName); 99 virtual void LoadPrivateFont(FX_BSTR bsFileName);
100 virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_ t szBuffer); 100 virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_ t szBuffer);
101 101
102 virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, FX_BYTE uCharse t, FX_DWORD dwStyle, FX_DWORD dwMatch = 0); 102 virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, FX_BYTE uCharse t, FX_DWORD dwStyle, FX_DWORD dwMatch = 0);
103 FXFT_Face GetFontFace(IFX_FileRead *pFileRead, FX_ INT32 iFaceIndex = 0); 103 FXFT_Face GetFontFace(IFX_FileRead *pFileRead, FX_ INT32 iFaceIndex = 0);
104 FXFT_Face GetFontFace(FX_BSTR bsFile, FX_INT32 iFa ceIndex = 0); 104 FXFT_Face GetFontFace(FX_BSTR bsFile, FX_INT32 iFa ceIndex = 0);
105 FXFT_Face GetFontFace(FX_LPCBYTE pBuffer, size_t s zBuffer, FX_INT32 iFaceIndex = 0); 105 FXFT_Face GetFontFace(FX_LPCBYTE pBuffer, size_t s zBuffer, FX_INT32 iFaceIndex = 0);
106 protected: 106 protected:
107 void ScanPath(FX_BSTR path); 107 void ScanPath(FX_BSTR path);
108 void ScanFile(FX_BSTR file); 108 void ScanFile(FX_BSTR file);
109 void ReportFace(FXFT_Face face, CFPF_SkiaFont Descriptor *pFontDesc); 109 void ReportFace(FXFT_Face face, CFPF_SkiaFont Descriptor *pFontDesc);
110 void OutputSystemFonts(); 110 void OutputSystemFonts();
111 FX_BOOL m_bLoaded; 111 FX_BOOL m_bLoaded;
112 CFX_PtrArray m_FontFaces; 112 CFX_PtrArray m_FontFaces;
113 FXFT_Library m_FTLibrary; 113 FXFT_Library m_FTLibrary;
114 CFX_MapPtrToPtr m_FamilyFonts; 114 CFX_MapPtrToPtr m_FamilyFonts;
115 }; 115 };
116 #endif 116 #endif
117 #endif 117 #endif
OLDNEW
« no previous file with comments | « core/src/fxge/android/fpf_skiafont.h ('k') | core/src/fxge/android/fpf_skiamodule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698