Closed jakejackson1 closed 10 months ago
mPDF memory limit is being hit while processing the GSUB Ligatures.
Here is the spec: https://learn.microsoft.com/en-us/typography/opentype/spec/
Reviewing it and the mPDF code might yield answers for the faulty data.
Haven't been able to replicate with latest version of Gravity PDF
Description
The Noto Sans Bold TTF font file (downloaded direct from fonts.google.com) causes a PHP fatal error due to a max memory issue upon adding to the Font Manager.
The reasons for the fatal error is when mPDF is parsing the font file the OTL Ligature set data extracted from the file is creating some very large loops. This suggests there is an underlying issue with mPDF's font reader, but I don't know enough about working with binary font files in PHP, or their structure, to make any sort of determination.
The workaround I have come up with is to disable the OTL checker if the installation fails and the user selects retry. This will prevent the Ligature set from being extracted from the OTL font data, and stop the fatal error.
Step To Reproduce Steps to reproduce the behavior:
Expected behavior The font successfully saves.