summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/android/cfpf_skiafontmgr.cpp5
-rw-r--r--core/fxge/android/fpf_skiafontmgr.h5
-rw-r--r--core/fxge/fx_font.h2
-rw-r--r--core/fxge/ge/cfx_font.cpp7
4 files changed, 11 insertions, 8 deletions
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index 290551bedf..2deb327392 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -26,7 +26,8 @@ static unsigned long FPF_SkiaStream_Read(FXFT_Stream stream,
unsigned long offset,
unsigned char* buffer,
unsigned long count) {
- IFX_FileRead* pFileRead = (IFX_FileRead*)stream->descriptor.pointer;
+ IFX_SeekableReadStream* pFileRead =
+ (IFX_SeekableReadStream*)stream->descriptor.pointer;
if (!pFileRead)
return 0;
if (count > 0) {
@@ -355,7 +356,7 @@ CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const CFX_ByteStringC& bsFamilyname,
return nullptr;
}
-FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_FileRead* pFileRead,
+FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_SeekableReadStream* pFileRead,
int32_t iFaceIndex) {
if (!pFileRead)
return nullptr;
diff --git a/core/fxge/android/fpf_skiafontmgr.h b/core/fxge/android/fpf_skiafontmgr.h
index bd586204c5..74e7adeb5a 100644
--- a/core/fxge/android/fpf_skiafontmgr.h
+++ b/core/fxge/android/fpf_skiafontmgr.h
@@ -75,7 +75,7 @@ class CFPF_SkiaFileFont : public CFPF_SkiaFontDescriptor {
// CFPF_SkiaFontDescriptor
int32_t GetType() const override { return FPF_SKIAFONTTYPE_File; }
- IFX_FileRead* m_pFile;
+ IFX_SeekableReadStream* m_pFile;
};
class CFPF_SkiaBufferFont : public CFPF_SkiaFontDescriptor {
@@ -101,7 +101,8 @@ class CFPF_SkiaFontMgr {
uint32_t dwMatch = 0);
bool InitFTLibrary();
- FXFT_Face GetFontFace(IFX_FileRead* pFileRead, int32_t iFaceIndex = 0);
+ FXFT_Face GetFontFace(IFX_SeekableReadStream* pFileRead,
+ int32_t iFaceIndex = 0);
FXFT_Face GetFontFace(const CFX_ByteStringC& bsFile, int32_t iFaceIndex = 0);
FXFT_Face GetFontFace(const uint8_t* pBuffer,
size_t szBuffer,
diff --git a/core/fxge/fx_font.h b/core/fxge/fx_font.h
index 8dda12af50..a562795784 100644
--- a/core/fxge/fx_font.h
+++ b/core/fxge/fx_font.h
@@ -110,7 +110,7 @@ class CFX_Font {
CFX_SubstFont* GetSubstFont() const { return m_pSubstFont.get(); }
#ifdef PDF_ENABLE_XFA
- FX_BOOL LoadFile(IFX_FileRead* pFile,
+ FX_BOOL LoadFile(IFX_SeekableReadStream* pFile,
int nFaceIndex = 0,
int* pFaceCount = nullptr);
diff --git a/core/fxge/ge/cfx_font.cpp b/core/fxge/ge/cfx_font.cpp
index f58462479f..d1c31d0f51 100644
--- a/core/fxge/ge/cfx_font.cpp
+++ b/core/fxge/ge/cfx_font.cpp
@@ -39,7 +39,8 @@ unsigned long FTStreamRead(FXFT_Stream stream,
if (count == 0)
return 0;
- IFX_FileRead* pFile = static_cast<IFX_FileRead*>(stream->descriptor.pointer);
+ IFX_SeekableReadStream* pFile =
+ static_cast<IFX_SeekableReadStream*>(stream->descriptor.pointer);
return pFile->ReadBlock(buffer, offset, count) ? count : 0;
}
@@ -47,7 +48,7 @@ void FTStreamClose(FXFT_Stream stream) {}
FX_BOOL LoadFileImp(FXFT_Library library,
FXFT_Face* Face,
- IFX_FileRead* pFile,
+ IFX_SeekableReadStream* pFile,
int32_t faceIndex,
std::unique_ptr<FXFT_StreamRec>* stream) {
std::unique_ptr<FXFT_StreamRec> stream1(new FXFT_StreamRec());
@@ -331,7 +332,7 @@ void CFX_Font::LoadSubst(const CFX_ByteString& face_name,
}
#ifdef PDF_ENABLE_XFA
-FX_BOOL CFX_Font::LoadFile(IFX_FileRead* pFile,
+FX_BOOL CFX_Font::LoadFile(IFX_SeekableReadStream* pFile,
int nFaceIndex,
int* pFaceCount) {
m_bEmbedded = FALSE;