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

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

Issue 2185533006: Splitting fx_ge_fontmap.cpp (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add missing includes 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 unified diff | Download patch
« no previous file with comments | « core/fxge/apple/fx_mac_imp.cpp ('k') | core/fxge/ge/cfx_folderfontinfo.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_CFX_FOLDERFONTINFO_H_
8 #define CORE_FXGE_GE_CFX_FOLDERFONTINFO_H_
9
10 #include <map>
11 #include <vector>
12
13 #include "core/fxge/include/cfx_fontmapper.h"
14 #include "core/fxge/include/ifx_systemfontinfo.h"
15 #include "core/fxge/include/fx_font.h"
16
17 class CFX_FolderFontInfo : public IFX_SystemFontInfo {
18 public:
19 CFX_FolderFontInfo();
20 ~CFX_FolderFontInfo() override;
21
22 void AddPath(const CFX_ByteStringC& path);
23
24 // IFX_SytemFontInfo:
25 FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override;
26 void* MapFont(int weight,
27 FX_BOOL bItalic,
28 int charset,
29 int pitch_family,
30 const FX_CHAR* face,
31 int& bExact) override;
32 #ifdef PDF_ENABLE_XFA
33 void* MapFontByUnicode(uint32_t dwUnicode,
34 int weight,
35 FX_BOOL bItalic,
36 int pitch_family) override;
37 #endif // PDF_ENABLE_XFA
38 void* GetFont(const FX_CHAR* face) override;
39 uint32_t GetFontData(void* hFont,
40 uint32_t table,
41 uint8_t* buffer,
42 uint32_t size) override;
43 void DeleteFont(void* hFont) override;
44 FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override;
45 FX_BOOL GetFontCharset(void* hFont, int& charset) override;
46
47 protected:
48 void ScanPath(const CFX_ByteString& path);
49 void ScanFile(const CFX_ByteString& path);
50 void ReportFace(const CFX_ByteString& path,
51 FXSYS_FILE* pFile,
52 uint32_t filesize,
53 uint32_t offset);
54 void* GetSubstFont(const CFX_ByteString& face);
55 void* FindFont(int weight,
56 FX_BOOL bItalic,
57 int charset,
58 int pitch_family,
59 const FX_CHAR* family,
60 FX_BOOL bMatchName);
61
62 std::map<CFX_ByteString, CFX_FontFaceInfo*> m_FontList;
63 std::vector<CFX_ByteString> m_PathList;
64 CFX_FontMapper* m_pMapper;
65 };
66
67 #endif // CORE_FXGE_GE_CFX_FOLDERFONTINFO_H_
OLDNEW
« no previous file with comments | « core/fxge/apple/fx_mac_imp.cpp ('k') | core/fxge/ge/cfx_folderfontinfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698