[Libreoffice-bugs] [Bug 143095] Font handling for PDF import filters does not do enough to match the font PS names in the PDF against what often are locally installed fonts

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Jul 12 09:55:03 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=143095

--- Comment #10 from Kevin Suo <suokunlong at 126.com> ---
Just for those who are interested:

rResult.familyName, as returned by:
LineParser::parseFontFamilyName( FontAttributes& rResult )
in: sdext/source/pdfimport/wrapper/wrapper.cxx

is eventually passed to:

void DrawXmlFinalizer::visit( TextElement& elem, const std::list<
std::unique_ptr<Element> >::const_iterator& )
in:sdext/source/pdfimport/tree/drawtreevisiting.cxx
and:
void WriterXmlFinalizer::visit( TextElement& elem, const std::list<
std::unique_ptr<Element> >::const_iterator& )
in:sdext/source/pdfimport/tree/writertreevisiting.cxx

and eventually is written to an xml stream of ODF XML format and is then
imported to Draw or Writer by
bool xpdf_ImportFromStream(...)
in: sdext/source/pdfimport/wrapper/wrapper.cxx

So, before it is written to the xml stream:
* In case rResult.familyName is "TimesNewRoman", it should be converted to
"Times New Roman";
* In case rResult.familyName is "SimSun", it should be converted to the
localized name "宋体" if the currently locale of the user is Chinese; and should
be "SimSun" if the currently locale is not Chinese.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210712/436c307b/attachment.htm>


More information about the Libreoffice-bugs mailing list