dompdf / php-font-lib

A library to read, parse, export and make subsets of different types of font files.
GNU Lesser General Public License v2.1
1.73k stars 256 forks source link

unpack(): Type n: not enough input, need 2, have 0 #51

Closed samhibberd closed 4 years ago

samhibberd commented 8 years ago

Hi There,

We are running into issues with our custom fonts (which strangely have been working before) when both installing automatically and using the dompdf load_fonts.php utility by @bsweeney

It looks like the error we hit is in php-font-lib, here is the console output:

Sams-iMac:dompdf samhibberd$ php load_font.php NMSyms /Users/samhibberd/Desktop/NMSyms.ttf

Unable to find bold face file. Unable to find italic face file. Unable to find bold_italic face file. Copying /Users/samhibberd/Desktop/NMSyms.ttf to /Users/samhibberd/Sites/vasco-web/craft/plugins/vasco/vendor/dompdf/dompdf/lib/fonts/NMSyms.ttf... Generating Adobe Font Metrics for /Users/samhibberd/Sites/vasco-web/craft/plugins/vasco/vendor/dompdf/dompdf/lib/fonts/NMSyms...

Warning: unpack(): Type n: not enough input, need 2, have 0 in /Users/samhibberd/Sites/vasco-web/craft/plugins/vasco/vendor/phenx/php-font-lib/src/FontLib/BinaryStream.php on line 183

Warning: unpack(): Type n: not enough input, need 2, have 0 in /Users/samhibberd/Sites/vasco-web/craft/plugins/vasco/vendor/phenx/php-font-lib/src/FontLib/BinaryStream.php on line 183

NB. I have removed some date() and strftime() warnings as they appear to have fallback values.

Any ideas??

Thanks.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

bsweeney commented 8 years ago

(also see #47)

bsweeney commented 4 years ago

closing, please subscribe to 47 for updates

lucianoo6 commented 3 years ago

infelizmente esse erro e devido a um falta de caractere porem eu uso o @ pra suprimir o erro pois ainda não encontrei outra solução exemplo:

`$answerHeader    = @unpack('ntype/nclass/Nttl/nlength', $answerHeaderBin);`