diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-30 20:24:22 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-30 20:24:22 +0000 |
commit | 07388cae6fb525ccecc20f66ce530ac52d30d754 (patch) | |
tree | 62c7dfab38220b997566c6e9821de38b886dc11c /core/fxge/cfx_fontmgr.h | |
parent | b6e7d49ad5f3a54b69f70b347bd41108493918b7 (diff) | |
download | pdfium-07388cae6fb525ccecc20f66ce530ac52d30d754.tar.xz |
Use span<> in CFX_FontMgr
Change-Id: I3f811b20399efac1b511e75d950699eee7192c65
Reviewed-on: https://pdfium-review.googlesource.com/41650
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/cfx_fontmgr.h')
-rw-r--r-- | core/fxge/cfx_fontmgr.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fxge/cfx_fontmgr.h b/core/fxge/cfx_fontmgr.h index 24c5ad3b6f..5ac8305d9a 100644 --- a/core/fxge/cfx_fontmgr.h +++ b/core/fxge/cfx_fontmgr.h @@ -12,6 +12,8 @@ #include "core/fxcrt/fx_memory.h" #include "core/fxge/fx_font.h" +#include "third_party/base/optional.h" +#include "third_party/base/span.h" class CFX_FontMapper; class CFX_SubstFont; @@ -45,7 +47,7 @@ class CFX_FontMgr { uint32_t size, int font_offset); FXFT_Face GetFileFace(const char* filename, int face_index); - FXFT_Face GetFixedFace(const uint8_t* pData, uint32_t size, int face_index); + FXFT_Face GetFixedFace(pdfium::span<const uint8_t> span, int face_index); void ReleaseFace(FXFT_Face face); void SetSystemFontInfo(std::unique_ptr<SystemFontInfoIface> pFontInfo); FXFT_Face FindSubstFont(const ByteString& face_name, @@ -55,7 +57,7 @@ class CFX_FontMgr { int italic_angle, int CharsetCP, CFX_SubstFont* pSubstFont); - bool GetBuiltinFont(size_t index, const uint8_t** pFontData, uint32_t* size); + Optional<pdfium::span<const uint8_t>> GetBuiltinFont(size_t index); CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } FXFT_Library GetFTLibrary() const { return m_FTLibrary; } bool FTLibrarySupportsHinting() const { return m_FTLibrarySupportsHinting; } |