diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-12 10:51:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-12 10:51:04 -0700 |
commit | ea98238666e33cd16b69cb23dcaca047c21c9998 (patch) | |
tree | c1a947e835a219872dfacd905188a14b57dc8294 /xfa/fxfa/app | |
parent | 6d689942f295565563253e9697a043f87b3796c2 (diff) | |
download | pdfium-ea98238666e33cd16b69cb23dcaca047c21c9998.tar.xz |
Record all fonts, not just one per charset.
Attempting to open bug_434.pdf on my Linux box would fail with:
../../xfa/fxfa/app/xfa_fwltheme.cpp:96: virtual FWL_ERR
CXFA_FWLTheme::Initialize(): Assertion `__null != m_pCalendarFont' failed.
I tracked the regression back to [1].
The issue seems to be in CFX_FontManager::AddInstalledFont we will only add
one font for a given Charset. In my case I end up loading 6 charsets, but the
fonts are all strange ones. When I open the PDF, it fails to find 'Arial'
because I've registered these other fonts.
To fix this I changed the m_FaceArray into a struct of {name, chraset}. Then
we record all fonts into this list and search over that list for the charset
when needed. This allows bug_434.pdf to open and the test to pass successfully.
1- https://pdfium.googlesource.com/pdfium/+/fe73e7849b8b4ce49408d2f52f3fc29b370b82b5
Review URL: https://codereview.chromium.org/1874433002
Diffstat (limited to 'xfa/fxfa/app')
0 files changed, 0 insertions, 0 deletions