summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-10 21:49:05 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-10 21:49:05 +0000
commitcd7b4ab7519c31a27c8d31e0cb694257fea84fd1 (patch)
tree73d83daf91d73efb38ae142273c00b53363d1c9f /core/fpdfapi/font
parentbdcd6bf72ef7dd682b9f144d2b438d60fd598f09 (diff)
downloadpdfium-cd7b4ab7519c31a27c8d31e0cb694257fea84fd1.tar.xz
Load CIDToGIDMap stream for CID fonts if it exists.
BUG=chromium:813705 Change-Id: I57265aad11d8f717f6ce33cc09241f4bef6381db Reviewed-on: https://pdfium-review.googlesource.com/29710 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
index 4d3ffdf41f..77cc6735b5 100644
--- a/core/fpdfapi/font/cpdf_cidfont.cpp
+++ b/core/fpdfapi/font/cpdf_cidfont.cpp
@@ -407,20 +407,13 @@ bool CPDF_CIDFont::Load() {
if (!IsEmbedded())
LoadSubstFont();
- if (m_pFontFile) {
- CPDF_Object* pmap = pCIDFontDict->GetDirectObjectFor("CIDToGIDMap");
- if (pmap) {
- if (CPDF_Stream* pStream = pmap->AsStream()) {
- m_pStreamAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pStream);
- m_pStreamAcc->LoadAllDataFiltered();
- } else if (pmap->GetString() == "Identity") {
-#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
- if (m_pFontFile)
- m_bCIDIsGID = true;
-#else
- m_bCIDIsGID = true;
-#endif
- }
+ CPDF_Object* pmap = pCIDFontDict->GetDirectObjectFor("CIDToGIDMap");
+ if (pmap) {
+ if (CPDF_Stream* pStream = pmap->AsStream()) {
+ m_pStreamAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pStream);
+ m_pStreamAcc->LoadAllDataFiltered();
+ } else if (m_pFontFile && pmap->GetString() == "Identity") {
+ m_bCIDIsGID = true;
}
}