summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--samples/DEPS2
-rw-r--r--xfa/src/fgas/src/font/fx_stdfontmgr.cpp11
2 files changed, 8 insertions, 5 deletions
diff --git a/samples/DEPS b/samples/DEPS
index 18ab975611..e77312f4bb 100644
--- a/samples/DEPS
+++ b/samples/DEPS
@@ -1,6 +1,6 @@
include_rules = [
'+public',
- '+third_party/libpng',
+ '+third_party/libpng16',
'+third_party/zlib_v128',
'+v8',
]
diff --git a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp
index e8b8f49d59..755d7e0c31 100644
--- a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp
+++ b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp
@@ -4,10 +4,11 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/src/fxcrt/extension.h"
+#include "core/include/fxcrt/fx_stream.h"
#include "xfa/src/fgas/src/fgas_base.h"
-#include "fx_stdfontmgr.h"
-#include "fx_fontutils.h"
+#include "xfa/src/fgas/src/font/fx_fontutils.h"
+#include "xfa/src/fgas/src/font/fx_stdfontmgr.h"
+
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
IFX_FontMgr* IFX_FontMgr::Create(FX_LPEnumAllFonts pEnumerator,
FX_LPMatchFont pMatcher,
@@ -1055,6 +1056,7 @@ FXFT_Face CFX_FontMgrImp::LoadFace(IFX_FileRead* pFontStream,
FXFT_Set_Pixel_Sizes(pFace, 0, 64);
return pFace;
}
+
IFX_FileRead* CFX_FontMgrImp::CreateFontStream(
CFX_FontMapper* pFontMapper,
IFX_SystemFontInfo* pSystemFontInfo,
@@ -1069,8 +1071,9 @@ IFX_FileRead* CFX_FontMgrImp::CreateFontStream(
return nullptr;
uint8_t* pBuffer = FX_Alloc(uint8_t, dwFileSize + 1);
dwFileSize = pSystemFontInfo->GetFontData(hFont, 0, pBuffer, dwFileSize);
- return new CFX_MemoryStream(pBuffer, dwFileSize, TRUE);
+ return FX_CreateMemoryStream(pBuffer, dwFileSize, TRUE);
}
+
IFX_FileRead* CFX_FontMgrImp::CreateFontStream(
const CFX_ByteString& bsFaceName) {
CFX_FontMgr* pFontMgr = CFX_GEModule::Get()->GetFontMgr();