Bug 125264 - Fonts with ligature (e.g. tt, ti) break URL when printing to virtual PDF printer
Summary: Fonts with ligature (e.g. tt, ti) break URL when printing to virtual PDF printer
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
6.2.3.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2019-05-13 15:32 UTC by wroot
Modified: 2023-07-02 08:35 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Printed to PDF - no URL (10.37 KB, application/pdf)
2020-03-29 10:30 UTC, Johnny_M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wroot 2019-05-13 15:32:46 UTC
Description:
When printing odt document with URL links to a virtual PDF printer and using Calibri font links are not clickable in resulting pdf.

Steps to Reproduce:
1. Create a document with a link using http
2. Change font for the whole document (select all) to Calibri (if Liberation Sans is used as default)
3. Print document to a virtual PDF printer (PDFCreator, Nitro PDF, etc.)

Actual Results:
When you open such pdf document in a pdf viewer (Adobe Acrobat Reader DC, Chrome) links with http are not clickable.

Expected Results:
Links should work.


Reproducible: Always


User Profile Reset: No



Additional Info:
Based on discussion on PDFCreator forums https://forums.pdfforge.org/t/links-do-not-work-when-using-calibri-font it seems that when using Calibri (and maybe other fonts) Libre is sending tt as a special character and not as t twice. And such character then can't be used in the url.

This doesn't happen when using Liberation Sans (maybe other fonts). Also doesn't happen when saving to pdf using Libre's built-in option (even if using Calibri font).

Sending same document to print via MS Word doesn't produce such issue.
Comment 1 V Stuart Foote 2019-05-14 01:49:58 UTC
Confirming behavior on Windows 10 Home 64-bit en-US with
Version: 6.2.3.2 (x64)
Build ID: aecc05fe267cc68dde00352a451aa867b3b546ac
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

Printing of ligatures (e.g. tt, ti, ffi) to gs based PDF generators can corrupt URLs for some fonts.

OTF ligature support was not enabled, but on printing for some strings of URLs ligatures are used and corrupt the URL (noticed "tt" in http or https, and at least a "ti" (from time), "ffi" (from office).

No solid reporducer--maybe autocorrect recognition of URL, while writer shell is unaware of ligature use disrupts URL?
Comment 2 Johnny_M 2020-03-29 10:30:36 UTC
Created attachment 159113 [details]
Printed to PDF - no URL

The difference between *exporting* to PDF in LO and *printing* to PDF is that in the former case a *URL link* is exported, while in the latter case just the *text*. So, essentially, it is then up to the PDF reader, to interpret the "http://..." text as a URL or not.

==> What happens if you copy the printed URL and paste it into a browser - does it get opened correctly?

I tried it with a gs-based PDF printer on Linux and it does, even though the URL text does contain ligatures after printing. In this case, one PDF reader (Atril viewer) does not interpret the text as URL, while another (PDF-XChange Editor, via WINE) does. Used font is Carlito, which also supports ligatures.

I'm not sure if Word disables font ligatures or not, but in LO they can be disabled by appending “:-liga” to the font name would work around the "issue".
Comment 3 QA Administrators 2022-03-30 04:04:39 UTC Comment hidden (obsolete)
Comment 4 wroot 2022-03-30 18:32:04 UTC
Just tested again, this time printed PDF using Microsoft Print to PDF (Windows 10, originally it was reported when using Windows 7 and i used PDFCreator and Nitro virtual PDF printers). The issue is still present.

Version: 7.3.1.3 (x64) / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: lt-LT (lt_LT); UI: en-US
Calc: threaded
Comment 5 ⁨خالد حسني⁩ 2023-07-02 08:35:35 UTC
The PDFs printed to PDF virtual printers don’t contain hyperlinks, and whether a hyperlink is auto detected or not is up to the PDF viewer and we can’t do anything about it. If you want fully functional PDFs, export them directly from LibreOffice.

If you want to disable ligatures, you can do so from the Font Features dialog.