Jump to content
You must now use your email address to sign in [click for more info] ×

Publisher 2.5.5 Export of PDF containing Small Caps is un-copy-pastable and un-searchable


Recommended Posts

In Publisher 2.5.5, exporting a PDF document with Small Caps results in those small caps characters being un-copy-pastable -- they get garbled in translation.  They display correctly in Acrobat and SumatraPDF, but cannot be copied out of the document nor searched with Ctrl+F.  This occurs whether or not I have 'subset fonts' enabled on export.  For giggles, I also disabled 'rasterize unsupported', with no joy. It appears this bug has existed for a while, based on a forum search.  I assume this also causes all kinds of havoc for screen readers.

Attached is a sample document and .afpub file.  Quickest test is trying to copy the header "Monster Target Priority" on page 1.  It pastes like this: M������ T����� P�������.  Searching for 'monster target priority' also returns nothing, but the garbled string can be searched and returns correctly.

riftbreakers_tables.afpub riftbreakers_tables.pdf

Link to comment
Share on other sites

Hi @gatesphere,

This appears to be specfic to Cambria which I believe is an old Microoft font licenced from Monotype... It also affects Caps to Small Caps and All Small Caps though All Caps works as expected with PDF Readers...

I've seen similar reports about Cambria Bold Small Caps not working with LaTeX as well so there is clearly something unsual about the font itself...

When substituted for an alternative font search works on the Small Caps...

I didn't have any specific issues with copy and paste, though copy/paste from Acrobat Reader results in font names being displayed as ? 0-a, ? `!q, ? a'h etc...

I'm sure @kenmcd will be able to enlighten us as to what is going on... I've attahed the version of Cambria downloaded from Github....

https://github.com/jondot/dotfiles2/tree/master/.fonts

Cambria.zip

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

@gatesphere What version of Cambria Bold are you using?

This probably another case of APub not handling CID fonts correctly. The cmap is correct but the ToUnicode is not.

There was another issue with CID font in the last week or two where it appeared we may have identified why some CID fonts work and some do not. Have to find that post.

On my phone at the gym right now so I will not be able to look closely at this for few hours. 

Also I can convert this from a CID font to a name font to test. Think that will make it work. Will try this later. 

Link to comment
Share on other sites

6 minutes ago, kenmcd said:

@gatesphere What version of Cambria Bold are you using?

Hi @kenmcd, I'm using whatever version of Cambria Bold ships with Windows 10.  I did not install this font separately to the best of my knowledge.  It appears Microsoft offers this info on their version of Cambria: https://learn.microsoft.com/en-us/typography/font-list/cambria

Link to comment
Share on other sites

The versions (attached in the previous post) downloaded from Github are Regular and Bold v1.01, Italic and Bold Italic v1.02...

The versions installed by default on Windows 10 are Regular v6.99, Italic, Bold and Bold Italic v6.98 but both exhibit the same problem, i.e., as 'Caps to Small Caps', 'All Small Caps' and 'Small Caps' the font is non-searchable in a PDF...

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

@gatesphere

Font is not the problem - it is Affinity not handling it correctly.
Modifying the font to change the glyph names to "production names" worked.
But FontLab "fixes" or changes other stuff so not sure exactly what helped.
FL deleted the old EBDT table (with old bitmap characters).
And it deleted the old legacy kern table.
And rebuilt the cmaps.
So not sure exactly what the problem is that this fixed for Affinity to work properly.
It is still a CID font.

In another issue Affinity was using glyph names as a sort of shortcut in another OpenType problem with ligatures which were not working properly.
Maybe the glyph names confused APub.
Or it just does not understand CID fonts 100%.
Dunno.

I will send you the test font via PM so you can test yourself. Works for me.
The name is changed so you can install it at the same time as the original.

Note: This works, but APub still does not work correctly.
If you copy "Mineral" from the document (with the small caps),
you should get "Mineral" - with upper and lower case.
But you instead get "MINERAL" - which is wrong.
This is something APub annoyingly does with various OpenType features - it actually replaces the underlying characters rather than just the glyph displayed.
 

Link to comment
Share on other sites

12 hours ago, gatesphere said:

What exactly did you do to 'fix' the font so that Affinity plays more nicely with it?

I set FontLab to change the glyph names to "friendly names" on import (opening) of the font.
Then I changed the font name and had FL recalculate all the name fields properly.
These alone are not going to "fix" anything.
The default settings on export are to set the glyph names to "production names."
This also means FL is going to rebuild all the character maps (in cmap table).
And FL is going to delete things and fix things automatically to improve the font.
I do not know which exact "fix" enables APub to work correctly.

So open the font, change the name, and re-export the font - should work with the FL defaults.

FontCreator has similar defaults.
So you should be able to do the same thing.
Just a little more complicated to change the font name correctly.

Note: again, the problem is not the font.
The problem is APub not handling some CID fonts correctly.
This is not the only CID font which does not export to PDF properly.
Other text engines have no problem with this font.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.