From a3ee6a0081ab16a2034b36d1d0f9b6907aec67d2 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Tue, 22 May 2018 13:45:08 +0000 Subject: Fix spaces too wide in XFA Dropdown. CFGAS_PDFFontMgr::GetCharWidth() is only used for spaces, for no good reason I could find. It's broken in this case too, returning a default value of 600 for any character. This CL removes this method and its only usage that led to finding this issue. Bug: pdfium:1083 Change-Id: I954de45101715b5af05169612fb5eca1b1a170b4 Reviewed-on: https://pdfium-review.googlesource.com/32740 Commit-Queue: dsinclair Reviewed-by: dsinclair --- xfa/fxfa/cxfa_fontmgr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/cxfa_fontmgr.cpp b/xfa/fxfa/cxfa_fontmgr.cpp index c35b10c9bc..8bacf07742 100644 --- a/xfa/fxfa/cxfa_fontmgr.cpp +++ b/xfa/fxfa/cxfa_fontmgr.cpp @@ -74,10 +74,9 @@ RetainPtr CXFA_FontMgr::GetFont( } if (pFont) { - if (pPDFFont) { + if (pPDFFont) pMgr->SetFont(pFont, pPDFFont); - pFont->SetFontProvider(pMgr); - } + m_FontMap[bsKey] = pFont; } return pFont; -- cgit v1.2.3