Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font error with 2.5 and Adobe Acrobat #1347

Open
Skulli opened this issue Apr 8, 2024 · 4 comments
Open

Font error with 2.5 and Adobe Acrobat #1347

Skulli opened this issue Apr 8, 2024 · 4 comments

Comments

@Skulli
Copy link

Skulli commented Apr 8, 2024

Since 2.5 i get an error with documents including the -character and using a custom font.

Ruby-Code is

pdf.font_families.update(
  name.capitalize => {
      normal: Rails.root.join("vendor/assets/fonts", name, "#{name.capitalize}-Regular.ttf"),
      bold: Rails.root.join("vendor/assets/fonts", name, "#{name.capitalize}-Bold.ttf"),
      italic: Rails.root.join("vendor/assets/fonts", name, "#{name.capitalize}-Italic.ttf"),
      bold_italic: Rails.root.join("vendor/assets/fonts", name, "#{name.capitalize}-BoldItalic.ttf")
  }
)
pdf.font name.capitalize

with name = 'arimo'

With < 2.5 it looks like that
working

and with 2.5

error_font_text
error means that the font could not be obtained and sone characters may not be visible.

error_font_1

error_font_2
ssets/218423/02024c30-0456-4c37-8e8d-28b2d87d1f59)

In Adobe Acrobat the is missing. Chrome/Safari/Mac OS Viewer dont show any errors.

Surely related to #1322

Any ideas?

@spovich
Copy link

spovich commented Apr 8, 2024

We are seeing the same issue with prawn 2.5 PDF's when viewed in Acrobat (2024.001.20643). Some characters randomly disappear. PDF looks fine in Mac OS PDF preview.
CleanShot 2024-04-08 at 14 26 08@2x

@tonymarklove
Copy link

For cross reference, I added some comments to this old issue a few weeks back, about the same problem: #1206 (comment)

It has a small, reproducible example.

@hoshy
Copy link

hoshy commented Apr 9, 2024

We have the same problem since updating to prawn 2.5.0 and ttfunk 1.8.0.
Rolling back to prawn 2.4.0 and ttfunk 1.7.0 solved it for us.

@ashkulz
Copy link

ashkulz commented Apr 12, 2024

The issue is the upgrade to ttfunk 1.8.0, see prawnpdf/ttfunk#102

Also a duplicate of #1346 but might be worth it to keep open...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants