inter
inter copied to clipboard
Text copied from a PDF is reversed when pasted
Describe the bug Text copied from a PDF is reversed when pasted. This only happens with PDFs that are generated from Chrome/Chromium and opened with macOS Preview.
To Reproduce Steps to reproduce the behavior:
- Save https://rsms.me/inter/ as a PDF file in Chrome/Chromium
- Open PDF file with Macos Preview
- Copy any text block from the page
- Paste the text somewhere
Expected behavior The pasted text block should be the same as the copied one.
Screenshots
https://user-images.githubusercontent.com/11428771/128847161-ff252f7a-d5d9-417b-9b94-d446aaab04d1.mp4
Environment
- OS: macOS 11.4
- App that renders the font: macOS Preview (exported by Chrome)
- Version of font [e.g. "Inter Regular 3.018;git-588b23468" — you can use fontdrop.info to find out the version]
Additional context I'm not sure if the issue is in the font, Chromium or macOS preview.
This doesn’t sound like an issue with the Inter fonts but rather with the software combination.
This is not related to font If you can reproduce this issues with other pdf files, please close your issue
Stumbled upon this issue.. happens with a PDF generated with the marp vscode extension as well.
Same problem here when printing to PDF from Chrome. PDF looks normal when viewed in MacOS "Preview" app, but selected & copied text pastes characters in reverse order.
Same problem here when printing to PDF from Chrome.
Please attach an example PDF which exhibits this behavior.
Please attach an example PDF which exhibits this behavior.
Thanks!
Please attach an example PDF which exhibits this behavior.
Thanks!
The PDF is quite a mess. No fonts embedded properly at all. And the text is kind of a jumble, and depending on which PDF editor is used I got differing text. Some looked OK, some was caps only. Just a mess. Says it was created by: Skia/PDF m97 So as @rsms mentioned above - appears to be an issue with the software. Not a problem with the fonts.
So as @rsms mentioned above - appears to be an issue with the software.
Thanks for the feedback! Doesn't always happen, but weird when it does…
I have the same issue. PDFs created with Skia/PDF are corrupted in Preview & Safari, but work fine in other apps like PDF Expert & Chrome.
The error is only reproductible with MacOS finder preview for PDF and it is related to variable fonts
.
In my case it was with Mulish font https://fonts.google.com/specimen/Mulish.
I downloaded the source.ttf
and included the non variable
version to make it work properly.
I downloaded the
source.ttf
and included thenon variable
version to make it work properly.
Thanks for the feedback!
related to variable fonts
Confirming that the non-variable Inter Display worked when exported as PDF from Chrome on MacOS. Copied text is not reversed.
Note: for strange reasons, some symbols (e.g. +, -, (, ~) are not copied properly from the exported PDF in Mac Preview (see screenshot), which wan't the case when using other fonts.
Same issue happen for us. We noticed PDF created from Chrome when various font-feature-settings
are on, those alternate chars replaced with ?
when copied from PDF. We had to disable font-feature-settings
specifically for printing because of that. Happens with both v3.19 and v4.
Sounds like the Chrome PDF library is not properly handling embedding the characters when an OpenType substitution has been made. If the glyph does not appear at all, that is one problem. If the copy-and-paste is wrong (even if the correct glyph appears), that means the ToUnicode table is not correct. Either way that is a Chrome issue which should be reported there.
And the work-around is to disable the OpenType features.