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

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

Issue 2443723002: Rename IFX_ stream names (Closed)
Patch Set: Nits 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
« no previous file with comments | « core/fxge/android/cfpf_skiafontmgr.cpp ('k') | core/fxge/fx_font.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 CORE_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ 7 #ifndef CORE_FXGE_ANDROID_FPF_SKIAFONTMGR_H_
8 #define CORE_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ 8 #define CORE_FXGE_ANDROID_FPF_SKIAFONTMGR_H_
9 9
10 #include "core/fxcrt/fx_system.h" 10 #include "core/fxcrt/fx_system.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 FX_CHAR* m_pPath; 69 FX_CHAR* m_pPath;
70 }; 70 };
71 71
72 class CFPF_SkiaFileFont : public CFPF_SkiaFontDescriptor { 72 class CFPF_SkiaFileFont : public CFPF_SkiaFontDescriptor {
73 public: 73 public:
74 CFPF_SkiaFileFont() : m_pFile(nullptr) {} 74 CFPF_SkiaFileFont() : m_pFile(nullptr) {}
75 75
76 // CFPF_SkiaFontDescriptor 76 // CFPF_SkiaFontDescriptor
77 int32_t GetType() const override { return FPF_SKIAFONTTYPE_File; } 77 int32_t GetType() const override { return FPF_SKIAFONTTYPE_File; }
78 IFX_FileRead* m_pFile; 78 IFX_SeekableReadStream* m_pFile;
79 }; 79 };
80 80
81 class CFPF_SkiaBufferFont : public CFPF_SkiaFontDescriptor { 81 class CFPF_SkiaBufferFont : public CFPF_SkiaFontDescriptor {
82 public: 82 public:
83 CFPF_SkiaBufferFont() : m_pBuffer(nullptr), m_szBuffer(0) {} 83 CFPF_SkiaBufferFont() : m_pBuffer(nullptr), m_szBuffer(0) {}
84 84
85 // CFPF_SkiaFontDescriptor 85 // CFPF_SkiaFontDescriptor
86 int32_t GetType() const override { return FPF_SKIAFONTTYPE_Buffer; } 86 int32_t GetType() const override { return FPF_SKIAFONTTYPE_Buffer; }
87 87
88 void* m_pBuffer; 88 void* m_pBuffer;
89 size_t m_szBuffer; 89 size_t m_szBuffer;
90 }; 90 };
91 91
92 class CFPF_SkiaFontMgr { 92 class CFPF_SkiaFontMgr {
93 public: 93 public:
94 CFPF_SkiaFontMgr(); 94 CFPF_SkiaFontMgr();
95 ~CFPF_SkiaFontMgr(); 95 ~CFPF_SkiaFontMgr();
96 96
97 void LoadSystemFonts(); 97 void LoadSystemFonts();
98 CFPF_SkiaFont* CreateFont(const CFX_ByteStringC& bsFamilyname, 98 CFPF_SkiaFont* CreateFont(const CFX_ByteStringC& bsFamilyname,
99 uint8_t uCharset, 99 uint8_t uCharset,
100 uint32_t dwStyle, 100 uint32_t dwStyle,
101 uint32_t dwMatch = 0); 101 uint32_t dwMatch = 0);
102 102
103 bool InitFTLibrary(); 103 bool InitFTLibrary();
104 FXFT_Face GetFontFace(IFX_FileRead* pFileRead, int32_t iFaceIndex = 0); 104 FXFT_Face GetFontFace(IFX_SeekableReadStream* pFileRead,
105 int32_t iFaceIndex = 0);
105 FXFT_Face GetFontFace(const CFX_ByteStringC& bsFile, int32_t iFaceIndex = 0); 106 FXFT_Face GetFontFace(const CFX_ByteStringC& bsFile, int32_t iFaceIndex = 0);
106 FXFT_Face GetFontFace(const uint8_t* pBuffer, 107 FXFT_Face GetFontFace(const uint8_t* pBuffer,
107 size_t szBuffer, 108 size_t szBuffer,
108 int32_t iFaceIndex = 0); 109 int32_t iFaceIndex = 0);
109 110
110 private: 111 private:
111 void ScanPath(const CFX_ByteString& path); 112 void ScanPath(const CFX_ByteString& path);
112 void ScanFile(const CFX_ByteString& file); 113 void ScanFile(const CFX_ByteString& file);
113 void ReportFace(FXFT_Face face, CFPF_SkiaFontDescriptor* pFontDesc); 114 void ReportFace(FXFT_Face face, CFPF_SkiaFontDescriptor* pFontDesc);
114 115
115 bool m_bLoaded; 116 bool m_bLoaded;
116 FXFT_Library m_FTLibrary; 117 FXFT_Library m_FTLibrary;
117 std::vector<CFPF_SkiaFontDescriptor*> m_FontFaces; 118 std::vector<CFPF_SkiaFontDescriptor*> m_FontFaces;
118 std::map<uint32_t, CFPF_SkiaFont*> m_FamilyFonts; 119 std::map<uint32_t, CFPF_SkiaFont*> m_FamilyFonts;
119 }; 120 };
120 121
121 #endif // _FX_OS_ == _FX_ANDROID_ 122 #endif // _FX_OS_ == _FX_ANDROID_
122 123
123 #endif // CORE_FXGE_ANDROID_FPF_SKIAFONTMGR_H_ 124 #endif // CORE_FXGE_ANDROID_FPF_SKIAFONTMGR_H_
OLDNEW
« no previous file with comments | « core/fxge/android/cfpf_skiafontmgr.cpp ('k') | core/fxge/fx_font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698