Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3839

Certificates with embedded fonts display with strange characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 2.2.3
    • Module: Certificate
    • MOODLE_22_STABLE

      We're having a font problem with certificates issued after we upgraded to Moodle 2.2. Newly issued certificates that are set to use an embedded font layout are opening in some PDF viewers with garbled text. It's not a different language, but just useless characters like squares where there should be English letters. Non-embedded certificate formats do not have this problem.

      The problem is visible in certain PDF viewers like Foxit 4. Foxit 5 and the latest Adobe Reader on Windows do not have the problem. Preview on OS X Lion does not have the problem but the iPad with the latest iOS 5 does have the problem.

      Googling led to the conclusion that this is caused by font subsetting. There is a code workaround to turn off font subsetting and embed the whole font:

      $pdf->setFontSubsetting(false); 

      I tested that and it does resolve the problem for all users and PDF viewers.

      There are also user workarounds that may or may not be possible:
      1. User upgrades PDF viewer to the latest version. This may not be possible (lab computers at school, etc) or there may not be an upgrade available to fix this (iPad).
      2. Instructor or course creator creates certificate activities with non-embedded format.

      I couldn't find an existing ticket for this problem so we wanted to make it known and see if the setFontSubsetting() fix is something that Mark wants to consider adding to the certificate code.

            markn Mark Nelson
            cfollin Chris Follin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.