[Libreoffice-bugs] [Bug 143095] Export of ODT document with "Liberation Serif" font to PDF, on round-trip the font is shown as "LiberationSerif" when PDF filter imported into Draw
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Jun 29 12:57:52 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=143095
--- Comment #6 from Kevin Suo <suokunlong at 126.com> ---
See the function familyNameOverride in codes prior to the following commit;
https://cgit.freedesktop.org/libreoffice/core/commit/?id=abe4d7bd0a1ec4b5a31cc5622080952e4cd53ebf
This map was removed in that commit, but this is perfect to resolve this bug.
The related code for the setting of font family name is in the following line
https://opengrok.libreoffice.org/xref/core/sdext/source/pdfimport/tree/drawtreevisiting.cxx?r=e6dfaf9f#830
At this moment, the family name as represened by;
aFontProps[ "fo:font-family" ] = rFont.familyName;
is the wrong name without space.
This family name was passed here after been processed by
LineParser::parseFontFamilyName in:
https://opengrok.libreoffice.org/xref/core/sdext/source/pdfimport/wrapper/wrapper.cxx?r=12362fc4#511
After this line, the PDF font names is interpreted as the following and is then
shown on Draw:
LiberationSerif (should be "Liberation Serif" in ODF XML stream)
TimesNewRommanBold (should be "Times New Roman" and the isBold should be true)
SimSun (should be Chinese name "宋体")
...
--
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/20210629/090084e2/attachment.htm>
More information about the Libreoffice-bugs
mailing list