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

Side by Side Diff: core/fxge/android/cfpf_skiafontmgr.h

Issue 2448293002: Name core/fxge/android files appropriately and use one file per class (Closed)
Patch Set: Fix build Created 4 years, 1 month 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
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_ANDROID_CFPF_SKIAFONTMGR_H_
8 #define CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_
9
10 #include <map>
11 #include <vector>
12
13 #include "core/fxcrt/fx_stream.h"
14 #include "core/fxcrt/fx_string.h"
15 #include "core/fxge/fx_font.h"
16
17 #define FPF_MATCHFONT_REPLACEANSI 1
18
19 class CFPF_SkiaFont;
20 class CFPF_SkiaFontDescriptor;
21
22 class CFPF_SkiaFontMgr {
23 public:
24 CFPF_SkiaFontMgr();
25 ~CFPF_SkiaFontMgr();
26
27 void LoadSystemFonts();
28 CFPF_SkiaFont* CreateFont(const CFX_ByteStringC& bsFamilyname,
29 uint8_t uCharset,
30 uint32_t dwStyle,
31 uint32_t dwMatch = 0);
32
33 bool InitFTLibrary();
34 FXFT_Face GetFontFace(IFX_SeekableReadStream* pFileRead,
35 int32_t iFaceIndex = 0);
36 FXFT_Face GetFontFace(const CFX_ByteStringC& bsFile, int32_t iFaceIndex = 0);
37 FXFT_Face GetFontFace(const uint8_t* pBuffer,
38 size_t szBuffer,
39 int32_t iFaceIndex = 0);
40
41 private:
42 void ScanPath(const CFX_ByteString& path);
43 void ScanFile(const CFX_ByteString& file);
44 void ReportFace(FXFT_Face face, CFPF_SkiaFontDescriptor* pFontDesc);
45
46 bool m_bLoaded;
47 FXFT_Library m_FTLibrary;
48 std::vector<CFPF_SkiaFontDescriptor*> m_FontFaces;
49 std::map<uint32_t, CFPF_SkiaFont*> m_FamilyFonts;
50 };
51
52 #endif // CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698