Skip to content

Font error with 2.5 and Adobe Acrobat #1347

@Skulli

Description

@Skulli

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions