Search code examples
phpencodingtcpdffontforge

Fixing FONTFORGE Open type font validation errors / TCPDF


I am running into problems when preparing a custom OTF-font and AFM-file (Postscript type 1 resource) for PHP usage with TCPDF.

PHP programmatically the slots are not printed fontfontge has validation errors on, so i think my task is fixing the font with fontforge, but i don't know how to be honest.

Opening the source font with fontforge gives me the following validation-errors:

 The glyph named mu is mapped to U+00B5
  But It's name indicates it should be mapped to U+03BC
 The glyph named Delta is mapped to U+2206
  But It's name indicates it should be mapped to U+0394
 The glyph named fi is mapped to U+F001
  But It's name indicates it should be mapped to U+FB01
 The glyph named fl is mapped to U+F002
  But It's name indicates it should be mapped to U+FB02

Can you guys lend me a helping hand on this and make these characters "visible" for my PHP script?

Thanks


Solution

  • i was a little mislead on tracking the error. The validation errors still do occure, but i had to adjust my TCPDF object with

     $pdf->setFontSubsetting(false);
    

    to prevent compacting the font.