Bug 151247 - LO mis-combines the font family and weight when opening a PDF
Summary: LO mis-combines the font family and weight when opening a PDF
Status: RESOLVED DUPLICATE of bug 143095
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.3.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTL-CTL PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2022-09-30 10:02 UTC by Eyal Rozenberg
Modified: 2022-09-30 10:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Original writer document (9.09 KB, application/vnd.oasis.opendocument.text)
2022-09-30 10:03 UTC, Eyal Rozenberg
Details
Exported PDF (4.32 KB, application/pdf)
2022-09-30 10:05 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2022-09-30 10:02:43 UTC
Reproduction instructions:

1. Create a new Writer document
2. Change the input language to Hebrew
3. Ensure the font family is David CLM (that's the default family LO chooses for Hebrew, and is bundled with LO), Regular weight
4. Type a phrase in Hebrew, e.g. שלום עולם
5. Export the document to a PDF (e.g. using File | Export As | Export As PDF)
6. Open the PDF in Writer or in Draw
7. Examine the font Writer uses for the text

Expected result: The opened PDF text is laid out in the David CLM font family, in regular weight.

The PDF may also exhibit bug 104597 (text run flipping), but we don't care about that here.

Actual Results: Writer tries to use a font family named "DavidCLMMedium", not "David CLM". The text is laid out in some fallback font.
Comment 1 Eyal Rozenberg 2022-09-30 10:03:50 UTC
Created attachment 182749 [details]
Original writer document
Comment 2 Eyal Rozenberg 2022-09-30 10:05:18 UTC
Created attachment 182750 [details]
Exported PDF

To see the bug, just open this PDF (in Writer or Impress) and compare the font to what you see in the PDF itself. Or compare against the original document.
Comment 3 Eyal Rozenberg 2022-09-30 10:11:33 UTC
This doesn't happen for _all_ fonts, apparently. I tried some text in Noto Naskh and this didn't happen.

Also, build information:

Version: 7.3.6.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.6-0ubuntu0.22.04.1~bpo20.04.1
Comment 4 Kevin Suo 2022-09-30 10:31:50 UTC
This should be a duplicate of bug 143095.

"DavidCLMMedium" is a PS font name LibreOffice has choosen when it exported to PDF, but failed to map this PS font name to the system font name at the of PDF import.

*** This bug has been marked as a duplicate of bug 143095 ***