diff options
author | Kevin Suo <suokunlong@126.com> | 2021-07-10 11:47:39 +0800 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-03-25 20:49:57 +0100 |
commit | dc24c4cbf5f7720318032849b693f0661ead0c57 (patch) | |
tree | 2b171a2771f9cbae7d3ab015535238366f57dfba /configure.ac | |
parent | 04260d3dc7e6d15a1e353dc842ce59e058925ba8 (diff) |
tdf#78427 sdext.pdfimport: No need to read a font file for the purpose of...
...determining the bold/italic/underline etc.
The purpose for reading a font file is that in case the font attributes determined by the xpdfimport process is not enough, then we use the lo core font classes which read in the font file and then determine whether it is bold, italic etc.
However, while this works in some cases, it does not work in many cases when the font file was actually a subset and a toUnicode map is followed in the PDF, see tdf#78427.
In addition, in case the information collected from the xpdfimport process is enough, there is no need to read the font file.
This commit removes the read of font file part. Also, this commit uses gfxFont->getNameWithoutSubsetTag() to get the font name with the subset tags removed, thus simplified the code in wrapper.cxx while also improves performace as the remove of subset tags is only run when the font is a subset (the previous code did this for all the font names).
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118733
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
(cherry picked from commit da59686672fd2bc98f8cb28d5f04dc978b50ac13)
restore compatibility with older popplers
with poppler 20.09:
/home/rene/LibreOffice/git/libreoffice-7-2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx: In member function 'int
pdfi::PDFOutDev::parseFont(long long int, GfxFont*, GfxState*) const':
/home/rene/LibreOffice/git/libreoffice-7-2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx:438:39: error: 'class
GfxFont' has no member named 'getNameWithoutSubsetTag'
https://www.google.com/search?q=getNameWithoutSubsetTag&oq=getNameWithoutSubsetTag&aqs=chrome..69i57.784j0j7&sourceid=chrome&ie=UTF-8 suggests it was added in 20.12
Change-Id: I4eacd2d740cb689ff9b3c6cab59376e01b1ba162
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118977
Tested-by: René Engelhard <rene@debian.org>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 07087041610ca8351d764c838ae07fa58f3bdf9e)
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions