diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-29 23:53:53 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-29 23:53:53 +0000 |
commit | 20c41a5a47b2460277897a1059789fc9e184e3ab (patch) | |
tree | a60b9695de7242be833c4119bb9815bd39b297ca /core/fpdfapi/font/cpdf_font.cpp | |
parent | 8020fd856805ed5c5f48a7a5f3a346ea6948355f (diff) | |
download | pdfium-20c41a5a47b2460277897a1059789fc9e184e3ab.tar.xz |
Use pdfium::span<>/UnownedPtr in CFX_Font.
Move some platform-specific ifdefs so the come last in each
section as it is easier to read, perhaps.
Change-Id: Ic1c2652c46ecebc63b66213735ed6d94737a7f32
Reviewed-on: https://pdfium-review.googlesource.com/41630
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_font.cpp')
-rw-r--r-- | core/fpdfapi/font/cpdf_font.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp index 9b83733eea..298911e2cd 100644 --- a/core/fpdfapi/font/cpdf_font.cpp +++ b/core/fpdfapi/font/cpdf_font.cpp @@ -208,9 +208,7 @@ void CPDF_Font::LoadFontDescriptor(const CPDF_Dictionary* pFontDesc) { if (!m_pFontFile) return; - const uint8_t* pFontData = m_pFontFile->GetData(); - uint32_t dwFontSize = m_pFontFile->GetSize(); - if (!m_Font.LoadEmbedded(pFontData, dwFontSize)) { + if (!m_Font.LoadEmbedded(m_pFontFile->GetSpan())) { m_pDocument->GetPageData()->MaybePurgeFontFileStreamAcc( m_pFontFile->GetStream()->AsStream()); m_pFontFile = nullptr; |